diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go index e25a460fb..c31cb395b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go @@ -2,6 +2,7 @@ package client import ( "math/rand" + "strconv" "sync" "time" @@ -38,6 +39,10 @@ func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration { minTime := 30 throttle := d.shouldThrottle(r) if throttle { + if delay, ok := getRetryDelay(r); ok { + return delay + } + minTime = 500 } @@ -68,12 +73,49 @@ func (d DefaultRetryer) ShouldRetry(r *request.Request) bool { // ShouldThrottle returns true if the request should be throttled. func (d DefaultRetryer) shouldThrottle(r *request.Request) bool { - if r.HTTPResponse.StatusCode == 502 || - r.HTTPResponse.StatusCode == 503 || - r.HTTPResponse.StatusCode == 504 { - return true + switch r.HTTPResponse.StatusCode { + case 429: + case 502: + case 503: + case 504: + default: + return r.IsErrorThrottle() } - return r.IsErrorThrottle() + + return true +} + +// This will look in the Retry-After header, RFC 7231, for how long +// it will wait before attempting another request +func getRetryDelay(r *request.Request) (time.Duration, bool) { + if !canUseRetryAfterHeader(r) { + return 0, false + } + + delayStr := r.HTTPResponse.Header.Get("Retry-After") + if len(delayStr) == 0 { + return 0, false + } + + delay, err := strconv.Atoi(delayStr) + if err != nil { + return 0, false + } + + return time.Duration(delay) * time.Second, true +} + +// Will look at the status code to see if the retry header pertains to +// the status code. +func canUseRetryAfterHeader(r *request.Request) bool { + switch r.HTTPResponse.StatusCode { + case 429: + case 503: + default: + return false + } + + return true } // lockedSource is a thread-safe implementation of rand.Source diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 644bd9b8b..1b1094f13 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -44,6 +44,7 @@ const ( // Service identifiers const ( AcmServiceID = "acm" // Acm. + ApiPricingServiceID = "api.pricing" // ApiPricing. ApigatewayServiceID = "apigateway" // Apigateway. ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. Appstream2ServiceID = "appstream2" // Appstream2. @@ -256,6 +257,17 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "api.pricing": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "pricing", + }, + }, + Endpoints: endpoints{ + "ap-south-1": endpoint{}, + "us-east-1": endpoint{}, + }, + }, "apigateway": service{ Endpoints: endpoints{ @@ -319,6 +331,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -436,10 +450,17 @@ var awsPartition = partition{ "cloudhsmv2": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "cloudsearch": service{ @@ -710,6 +731,7 @@ var awsPartition = partition{ "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -777,6 +799,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -793,6 +816,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -856,7 +880,7 @@ var awsPartition = partition{ }, "elasticloadbalancing": service{ Defaults: endpoint{ - Protocols: []string{"http", "https"}, + Protocols: []string{"https"}, }, Endpoints: endpoints{ "ap-northeast-1": endpoint{}, @@ -973,9 +997,12 @@ var awsPartition = partition{ "firehose": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "gamelift": service{ @@ -1005,6 +1032,7 @@ var awsPartition = partition{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, @@ -1020,6 +1048,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "greengrass": service{ @@ -1028,6 +1058,7 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "us-east-1": endpoint{}, @@ -1340,10 +1371,11 @@ var awsPartition = partition{ "polly": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "rds": service{ @@ -1435,23 +1467,23 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-northeast-1": endpoint{ - Hostname: "s3-ap-northeast-1.amazonaws.com", + Hostname: "s3.ap-northeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{ - Hostname: "s3-ap-southeast-1.amazonaws.com", + Hostname: "s3.ap-southeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ap-southeast-2": endpoint{ - Hostname: "s3-ap-southeast-2.amazonaws.com", + Hostname: "s3.ap-southeast-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{ - Hostname: "s3-eu-west-1.amazonaws.com", + Hostname: "s3.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "eu-west-2": endpoint{}, @@ -1463,7 +1495,7 @@ var awsPartition = partition{ }, }, "sa-east-1": endpoint{ - Hostname: "s3-sa-east-1.amazonaws.com", + Hostname: "s3.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "us-east-1": endpoint{ @@ -1472,11 +1504,11 @@ var awsPartition = partition{ }, "us-east-2": endpoint{}, "us-west-1": endpoint{ - Hostname: "s3-us-west-1.amazonaws.com", + Hostname: "s3.us-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, "us-west-2": endpoint{ - Hostname: "s3-us-west-2.amazonaws.com", + Hostname: "s3.us-west-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, }, @@ -1504,14 +1536,17 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1542,6 +1577,7 @@ var awsPartition = partition{ "snowball": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, @@ -1822,6 +1858,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1874,6 +1911,12 @@ var awscnPartition = partition{ }, }, Services: services{ + "apigateway": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "application-autoscaling": service{ Defaults: endpoint{ Hostname: "autoscaling.{region}.amazonaws.com", @@ -1912,6 +1955,12 @@ var awscnPartition = partition{ "cn-north-1": endpoint{}, }, }, + "cognito-identity": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "config": service{ Endpoints: endpoints{ @@ -1977,7 +2026,7 @@ var awscnPartition = partition{ }, "elasticloadbalancing": service{ Defaults: endpoint{ - Protocols: []string{"http", "https"}, + Protocols: []string{"https"}, }, Endpoints: endpoints{ "cn-north-1": endpoint{}, @@ -1991,6 +2040,7 @@ var awscnPartition = partition{ "cn-north-1": endpoint{}, }, }, + "es": service{}, "events": service{ Endpoints: endpoints{ @@ -2034,6 +2084,12 @@ var awscnPartition = partition{ "cn-north-1": endpoint{}, }, }, + "lambda": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "logs": service{ Endpoints: endpoints{ @@ -2069,6 +2125,12 @@ var awscnPartition = partition{ "cn-north-1": endpoint{}, }, }, + "snowball": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "sns": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -2216,6 +2278,12 @@ var awsusgovPartition = partition{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "dynamodb.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "ec2": service{ @@ -2241,6 +2309,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "elasticbeanstalk": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "elasticloadbalancing": service{ Endpoints: endpoints{ @@ -2344,7 +2418,7 @@ var awsusgovPartition = partition{ }, }, "us-gov-west-1": endpoint{ - Hostname: "s3-us-gov-west-1.amazonaws.com", + Hostname: "s3.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, }, @@ -2392,6 +2466,12 @@ var awsusgovPartition = partition{ }, Endpoints: endpoints{ "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "dynamodb.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "sts": service{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go deleted file mode 100644 index daf9eca43..000000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build appengine plan9 - -package request - -import ( - "strings" -) - -func isErrConnectionReset(err error) bool { - return strings.Contains(err.Error(), "connection reset") -} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index 911c058ee..5c7db4982 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -28,6 +28,10 @@ const ( // during body reads. ErrCodeResponseTimeout = "ResponseTimeout" + // ErrCodeInvalidPresignExpire is returned when the expire time provided to + // presign is invalid + ErrCodeInvalidPresignExpire = "InvalidPresignExpireError" + // CanceledErrorCode is the error code that will be returned by an // API request that was canceled. Requests given a aws.Context may // return this error when canceled. @@ -42,7 +46,6 @@ type Request struct { Retryer Time time.Time - ExpireTime time.Duration Operation *Operation HTTPRequest *http.Request HTTPResponse *http.Response @@ -60,6 +63,11 @@ type Request struct { LastSignedAt time.Time DisableFollowRedirects bool + // A value greater than 0 instructs the request to be signed as Presigned URL + // You should not set this field directly. Instead use Request's + // Presign or PresignRequest methods. + ExpireTime time.Duration + context aws.Context built bool @@ -104,6 +112,8 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers, err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err) } + SanitizeHostForHeader(httpReq) + r := &Request{ Config: cfg, ClientInfo: clientInfo, @@ -250,40 +260,59 @@ func (r *Request) SetReaderBody(reader io.ReadSeeker) { // Presign returns the request's signed URL. Error will be returned // if the signing fails. -func (r *Request) Presign(expireTime time.Duration) (string, error) { - r.ExpireTime = expireTime +// +// It is invalid to create a presigned URL with a expire duration 0 or less. An +// error is returned if expire duration is 0 or less. +func (r *Request) Presign(expire time.Duration) (string, error) { + r = r.copy() + + // Presign requires all headers be hoisted. There is no way to retrieve + // the signed headers not hoisted without this. Making the presigned URL + // useless. r.NotHoist = false - if r.Operation.BeforePresignFn != nil { - r = r.copy() - err := r.Operation.BeforePresignFn(r) - if err != nil { - return "", err - } - } - - r.Sign() - if r.Error != nil { - return "", r.Error - } - return r.HTTPRequest.URL.String(), nil + u, _, err := getPresignedURL(r, expire) + return u, err } // PresignRequest behaves just like presign, with the addition of returning a // set of headers that were signed. // +// It is invalid to create a presigned URL with a expire duration 0 or less. An +// error is returned if expire duration is 0 or less. +// // Returns the URL string for the API operation with signature in the query string, // and the HTTP headers that were included in the signature. These headers must // be included in any HTTP request made with the presigned URL. // // To prevent hoisting any headers to the query string set NotHoist to true on // this Request value prior to calling PresignRequest. -func (r *Request) PresignRequest(expireTime time.Duration) (string, http.Header, error) { - r.ExpireTime = expireTime - r.Sign() - if r.Error != nil { - return "", nil, r.Error +func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) { + r = r.copy() + return getPresignedURL(r, expire) +} + +func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) { + if expire <= 0 { + return "", nil, awserr.New( + ErrCodeInvalidPresignExpire, + "presigned URL requires an expire duration greater than 0", + nil, + ) } + + r.ExpireTime = expire + + if r.Operation.BeforePresignFn != nil { + if err := r.Operation.BeforePresignFn(r); err != nil { + return "", nil, err + } + } + + if err := r.Sign(); err != nil { + return "", nil, err + } + return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil } @@ -579,3 +608,72 @@ func shouldRetryCancel(r *Request) bool { errStr != "net/http: request canceled while waiting for connection") } + +// SanitizeHostForHeader removes default port from host and updates request.Host +func SanitizeHostForHeader(r *http.Request) { + host := getHost(r) + port := portOnly(host) + if port != "" && isDefaultPort(r.URL.Scheme, port) { + r.Host = stripPort(host) + } +} + +// Returns host from request +func getHost(r *http.Request) string { + if r.Host != "" { + return r.Host + } + + return r.URL.Host +} + +// Hostname returns u.Host, without any port number. +// +// If Host is an IPv6 literal with a port number, Hostname returns the +// IPv6 literal without the square brackets. IPv6 literals may include +// a zone identifier. +// +// Copied from the Go 1.8 standard library (net/url) +func stripPort(hostport string) string { + colon := strings.IndexByte(hostport, ':') + if colon == -1 { + return hostport + } + if i := strings.IndexByte(hostport, ']'); i != -1 { + return strings.TrimPrefix(hostport[:i], "[") + } + return hostport[:colon] +} + +// Port returns the port part of u.Host, without the leading colon. +// If u.Host doesn't contain a port, Port returns an empty string. +// +// Copied from the Go 1.8 standard library (net/url) +func portOnly(hostport string) string { + colon := strings.IndexByte(hostport, ':') + if colon == -1 { + return "" + } + if i := strings.Index(hostport, "]:"); i != -1 { + return hostport[i+len("]:"):] + } + if strings.Contains(hostport, "]") { + return "" + } + return hostport[colon+len(":"):] +} + +// Returns true if the specified URI is using the standard port +// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs) +func isDefaultPort(scheme, port string) bool { + if port == "" { + return true + } + + lowerCaseScheme := strings.ToLower(scheme) + if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") { + return true + } + + return false +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go index 4b102f8f2..f1adcf481 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go @@ -7,6 +7,9 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" ) +// EnvProviderName provides a name of the provider when config is loaded from environment. +const EnvProviderName = "EnvConfigCredentials" + // envConfig is a collection of environment values the SDK will read // setup config from. All environment values are optional. But some values // such as credentials require multiple values to be complete or the values @@ -157,7 +160,7 @@ func envConfigLoad(enableSharedConfig bool) envConfig { if len(cfg.Creds.AccessKeyID) == 0 || len(cfg.Creds.SecretAccessKey) == 0 { cfg.Creds = credentials.Value{} } else { - cfg.Creds.ProviderName = "EnvConfigCredentials" + cfg.Creds.ProviderName = EnvProviderName } regionKeys := regionEnvKeys diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index 15da57249..ccc88b4ac 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -268,7 +268,7 @@ type signingCtx struct { // "X-Amz-Content-Sha256" header with a precomputed value. The signer will // only compute the hash if the request header value is empty. func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error) { - return v4.signWithBody(r, body, service, region, 0, signTime) + return v4.signWithBody(r, body, service, region, 0, false, signTime) } // Presign signs AWS v4 requests with the provided body, service name, region @@ -302,10 +302,10 @@ func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region strin // presigned request's signature you can set the "X-Amz-Content-Sha256" // HTTP header and that will be included in the request's signature. func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) { - return v4.signWithBody(r, body, service, region, exp, signTime) + return v4.signWithBody(r, body, service, region, exp, true, signTime) } -func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) { +func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) { currentTimeFn := v4.currentTimeFn if currentTimeFn == nil { currentTimeFn = time.Now @@ -317,7 +317,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi Query: r.URL.Query(), Time: signTime, ExpireTime: exp, - isPresign: exp != 0, + isPresign: isPresign, ServiceName: service, Region: region, DisableURIPathEscaping: v4.DisableURIPathEscaping, @@ -339,6 +339,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi return http.Header{}, err } + ctx.sanitizeHostForHeader() ctx.assignAmzQueryValues() ctx.build(v4.DisableHeaderHoisting) @@ -363,6 +364,10 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi return ctx.SignedHeaderVals, nil } +func (ctx *signingCtx) sanitizeHostForHeader() { + request.SanitizeHostForHeader(ctx.Request) +} + func (ctx *signingCtx) handlePresignRemoval() { if !ctx.isPresign { return @@ -467,7 +472,7 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time } signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(), - name, region, req.ExpireTime, signingTime, + name, region, req.ExpireTime, req.ExpireTime > 0, signingTime, ) if err != nil { req.Error = err diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index deb4b14d0..77c1d9264 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.10.36" +const SDKVersion = "1.12.27" diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go index 524ca952a..5ce9cba32 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go @@ -121,6 +121,10 @@ func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string return nil } + if _, ok := value.Interface().([]byte); ok { + return q.parseScalar(v, value, prefix, tag) + } + // check for unflattened list member if !q.isEC2 && tag.Get("flattened") == "" { if listName := tag.Get("locationNameList"); listName == "" { diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go index b68072721..953b364f3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go @@ -347,13 +347,10 @@ func (c *ACM) GetCertificateRequest(input *GetCertificateInput) (req *request.Re // // Retrieves an ACM Certificate and certificate chain for the certificate specified // by an ARN. The chain is an ordered list of certificates that contains the -// root certificate, intermediate certificates of subordinate CAs, and the ACM -// Certificate. The certificate and certificate chain are base64 encoded. If -// you want to decode the certificate chain to see the individual certificate -// fields, you can use OpenSSL. -// -// Currently, ACM Certificates can be used only with Elastic Load Balancing -// and Amazon CloudFront. +// ACM Certificate, intermediate certificates of subordinate CAs, and the root +// certificate in that order. The certificate and certificate chain are base64 +// encoded. If you want to decode the certificate chain to see the individual +// certificate fields, you can use OpenSSL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -448,7 +445,7 @@ func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *requ // // For more information about importing certificates into ACM, including the // differences between certificates that you import and those that ACM provides, -// see Importing Certificates (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) +// see Importing Certificates (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) // in the AWS Certificate Manager User Guide. // // To import a certificate, you must provide the certificate and the matching @@ -464,6 +461,12 @@ func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *requ // To import a new certificate, omit the CertificateArn field. Include this // field only when you want to replace a previously imported certificate. // +// When you import a certificate by using the CLI or one of the SDKs, you must +// specify the certificate, chain, and private key parameters as file names +// preceded by file://. For example, you can specify a certificate saved in +// the C:\temp folder as C:\temp\certificate_to_import.pem. If you are making +// an HTTP or HTTPS Query request, include these parameters as BLOBs. +// // This operation returns the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the imported certificate. // @@ -868,11 +871,18 @@ func (c *ACM) RequestCertificateRequest(input *RequestCertificateInput) (req *re // // Requests an ACM Certificate for use with other AWS services. To request an // ACM Certificate, you must specify the fully qualified domain name (FQDN) -// for your site. You can also specify additional FQDNs if users can reach your -// site by using other names. For each domain name you specify, email is sent -// to the domain owner to request approval to issue the certificate. After receiving -// approval from the domain owner, the ACM Certificate is issued. For more information, -// see the AWS Certificate Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/). +// for your site in the DomainName parameter. You can also specify additional +// FQDNs in the SubjectAlternativeNames parameter if users can reach your site +// by using other names. +// +// For each domain name you specify, email is sent to the domain owner to request +// approval to issue the certificate. Email is sent to three registered contact +// addresses in the WHOIS database and to five common system administration +// addresses formed from the DomainName you enter or the optional ValidationDomain +// parameter. For more information, see Validate Domain Ownership (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate.html). +// +// After receiving approval from the domain owner, the ACM Certificate is issued. +// For more information, see the AWS Certificate Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go index 0119041f5..8a183a969 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go @@ -16,7 +16,7 @@ // // Using the Client // -// To AWS Certificate Manager with the SDK use the New function to create +// To contact AWS Certificate Manager with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index 88eb40184..eee3d539a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -67,16 +67,25 @@ func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) CreateApiKey(input *CreateApiKeyInput) (*ApiKey, error) { req, out := c.CreateApiKeyRequest(input) @@ -154,14 +163,21 @@ func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateAuthorizer(input *CreateAuthorizerInput) (*Authorizer, error) { req, out := c.CreateAuthorizerRequest(input) @@ -237,14 +253,22 @@ func (c *APIGateway) CreateBasePathMappingRequest(input *CreateBasePathMappingIn // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateBasePathMapping(input *CreateBasePathMappingInput) (*BasePathMapping, error) { req, out := c.CreateBasePathMappingRequest(input) @@ -321,18 +345,29 @@ func (c *APIGateway) CreateDeploymentRequest(input *CreateDeploymentInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The requested service is not available. For details see the accompanying +// error message. Retry after the specified time period. // func (c *APIGateway) CreateDeployment(input *CreateDeploymentInput) (*Deployment, error) { req, out := c.CreateDeploymentRequest(input) @@ -406,16 +441,25 @@ func (c *APIGateway) CreateDocumentationPartRequest(input *CreateDocumentationPa // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateDocumentationPart(input *CreateDocumentationPartInput) (*DocumentationPart, error) { req, out := c.CreateDocumentationPartRequest(input) @@ -489,16 +533,25 @@ func (c *APIGateway) CreateDocumentationVersionRequest(input *CreateDocumentatio // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateDocumentationVersion(input *CreateDocumentationVersionInput) (*DocumentationVersion, error) { req, out := c.CreateDocumentationVersionRequest(input) @@ -574,12 +627,19 @@ func (c *APIGateway) CreateDomainNameRequest(input *CreateDomainNameInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateDomainName(input *CreateDomainNameInput) (*DomainName, error) { req, out := c.CreateDomainNameRequest(input) @@ -655,16 +715,25 @@ func (c *APIGateway) CreateModelRequest(input *CreateModelInput) (req *request.R // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateModel(input *CreateModelInput) (*Model, error) { req, out := c.CreateModelRequest(input) @@ -740,14 +809,21 @@ func (c *APIGateway) CreateRequestValidatorRequest(input *CreateRequestValidator // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateRequestValidator(input *CreateRequestValidatorInput) (*UpdateRequestValidatorOutput, error) { req, out := c.CreateRequestValidatorRequest(input) @@ -823,16 +899,25 @@ func (c *APIGateway) CreateResourceRequest(input *CreateResourceInput) (req *req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateResource(input *CreateResourceInput) (*Resource, error) { req, out := c.CreateResourceRequest(input) @@ -908,12 +993,18 @@ func (c *APIGateway) CreateRestApiRequest(input *CreateRestApiInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateRestApi(input *CreateRestApiInput) (*RestApi, error) { req, out := c.CreateRestApiRequest(input) @@ -990,16 +1081,25 @@ func (c *APIGateway) CreateStageRequest(input *CreateStageInput) (req *request.R // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateStage(input *CreateStageInput) (*Stage, error) { req, out := c.CreateStageRequest(input) @@ -1076,16 +1176,25 @@ func (c *APIGateway) CreateUsagePlanRequest(input *CreateUsagePlanInput) (req *r // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // func (c *APIGateway) CreateUsagePlan(input *CreateUsagePlanInput) (*UsagePlan, error) { req, out := c.CreateUsagePlanRequest(input) @@ -1161,14 +1270,22 @@ func (c *APIGateway) CreateUsagePlanKeyRequest(input *CreateUsagePlanKeyInput) ( // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) CreateUsagePlanKey(input *CreateUsagePlanKeyInput) (*UsagePlanKey, error) { req, out := c.CreateUsagePlanKeyRequest(input) @@ -1246,10 +1363,14 @@ func (c *APIGateway) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) DeleteApiKey(input *DeleteApiKeyInput) (*DeleteApiKeyOutput, error) { req, out := c.DeleteApiKeyRequest(input) @@ -1329,14 +1450,22 @@ func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) DeleteAuthorizer(input *DeleteAuthorizerInput) (*DeleteAuthorizerOutput, error) { req, out := c.DeleteAuthorizerRequest(input) @@ -1414,10 +1543,22 @@ func (c *APIGateway) DeleteBasePathMappingRequest(input *DeleteBasePathMappingIn // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. +// +// * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. +// +// * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) DeleteBasePathMapping(input *DeleteBasePathMappingInput) (*DeleteBasePathMappingOutput, error) { req, out := c.DeleteBasePathMappingRequest(input) @@ -1495,12 +1636,18 @@ func (c *APIGateway) DeleteClientCertificateRequest(input *DeleteClientCertifica // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // func (c *APIGateway) DeleteClientCertificate(input *DeleteClientCertificateInput) (*DeleteClientCertificateOutput, error) { req, out := c.DeleteClientCertificateRequest(input) @@ -1579,12 +1726,18 @@ func (c *APIGateway) DeleteDeploymentRequest(input *DeleteDeploymentInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) DeleteDeployment(input *DeleteDeploymentInput) (*DeleteDeploymentOutput, error) { req, out := c.DeleteDeploymentRequest(input) @@ -1660,14 +1813,22 @@ func (c *APIGateway) DeleteDocumentationPartRequest(input *DeleteDocumentationPa // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // func (c *APIGateway) DeleteDocumentationPart(input *DeleteDocumentationPartInput) (*DeleteDocumentationPartOutput, error) { req, out := c.DeleteDocumentationPartRequest(input) @@ -1743,14 +1904,22 @@ func (c *APIGateway) DeleteDocumentationVersionRequest(input *DeleteDocumentatio // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) DeleteDocumentationVersion(input *DeleteDocumentationVersionInput) (*DeleteDocumentationVersionOutput, error) { req, out := c.DeleteDocumentationVersionRequest(input) @@ -1828,10 +1997,14 @@ func (c *APIGateway) DeleteDomainNameRequest(input *DeleteDomainNameInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) DeleteDomainName(input *DeleteDomainNameInput) (*DeleteDomainNameOutput, error) { req, out := c.DeleteDomainNameRequest(input) @@ -1910,14 +2083,22 @@ func (c *APIGateway) DeleteGatewayResponseRequest(input *DeleteGatewayResponseIn // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) DeleteGatewayResponse(input *DeleteGatewayResponseInput) (*DeleteGatewayResponseOutput, error) { req, out := c.DeleteGatewayResponseRequest(input) @@ -1995,12 +2176,18 @@ func (c *APIGateway) DeleteIntegrationRequest(input *DeleteIntegrationInput) (re // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) DeleteIntegration(input *DeleteIntegrationInput) (*DeleteIntegrationOutput, error) { req, out := c.DeleteIntegrationRequest(input) @@ -2078,14 +2265,22 @@ func (c *APIGateway) DeleteIntegrationResponseRequest(input *DeleteIntegrationRe // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) DeleteIntegrationResponse(input *DeleteIntegrationResponseInput) (*DeleteIntegrationResponseOutput, error) { req, out := c.DeleteIntegrationResponseRequest(input) @@ -2163,12 +2358,18 @@ func (c *APIGateway) DeleteMethodRequest(input *DeleteMethodInput) (req *request // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) DeleteMethod(input *DeleteMethodInput) (*DeleteMethodOutput, error) { req, out := c.DeleteMethodRequest(input) @@ -2246,14 +2447,22 @@ func (c *APIGateway) DeleteMethodResponseRequest(input *DeleteMethodResponseInpu // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) DeleteMethodResponse(input *DeleteMethodResponseInput) (*DeleteMethodResponseOutput, error) { req, out := c.DeleteMethodResponseRequest(input) @@ -2331,14 +2540,22 @@ func (c *APIGateway) DeleteModelRequest(input *DeleteModelInput) (req *request.R // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) { req, out := c.DeleteModelRequest(input) @@ -2416,14 +2633,22 @@ func (c *APIGateway) DeleteRequestValidatorRequest(input *DeleteRequestValidator // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) DeleteRequestValidator(input *DeleteRequestValidatorInput) (*DeleteRequestValidatorOutput, error) { req, out := c.DeleteRequestValidatorRequest(input) @@ -2501,14 +2726,22 @@ func (c *APIGateway) DeleteResourceRequest(input *DeleteResourceInput) (req *req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) DeleteResource(input *DeleteResourceInput) (*DeleteResourceOutput, error) { req, out := c.DeleteResourceRequest(input) @@ -2586,12 +2819,18 @@ func (c *APIGateway) DeleteRestApiRequest(input *DeleteRestApiInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // func (c *APIGateway) DeleteRestApi(input *DeleteRestApiInput) (*DeleteRestApiOutput, error) { req, out := c.DeleteRestApiRequest(input) @@ -2669,12 +2908,18 @@ func (c *APIGateway) DeleteStageRequest(input *DeleteStageInput) (req *request.R // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // func (c *APIGateway) DeleteStage(input *DeleteStageInput) (*DeleteStageOutput, error) { req, out := c.DeleteStageRequest(input) @@ -2752,12 +2997,18 @@ func (c *APIGateway) DeleteUsagePlanRequest(input *DeleteUsagePlanInput) (req *r // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // func (c *APIGateway) DeleteUsagePlan(input *DeleteUsagePlanInput) (*DeleteUsagePlanOutput, error) { req, out := c.DeleteUsagePlanRequest(input) @@ -2836,14 +3087,22 @@ func (c *APIGateway) DeleteUsagePlanKeyRequest(input *DeleteUsagePlanKeyInput) ( // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) DeleteUsagePlanKey(input *DeleteUsagePlanKeyInput) (*DeleteUsagePlanKeyOutput, error) { req, out := c.DeleteUsagePlanKeyRequest(input) @@ -2921,12 +3180,18 @@ func (c *APIGateway) FlushStageAuthorizersCacheRequest(input *FlushStageAuthoriz // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) FlushStageAuthorizersCache(input *FlushStageAuthorizersCacheInput) (*FlushStageAuthorizersCacheOutput, error) { req, out := c.FlushStageAuthorizersCacheRequest(input) @@ -3004,12 +3269,18 @@ func (c *APIGateway) FlushStageCacheRequest(input *FlushStageCacheInput) (req *r // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) FlushStageCache(input *FlushStageCacheInput) (*FlushStageCacheOutput, error) { req, out := c.FlushStageCacheRequest(input) @@ -3085,10 +3356,14 @@ func (c *APIGateway) GenerateClientCertificateRequest(input *GenerateClientCerti // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // func (c *APIGateway) GenerateClientCertificate(input *GenerateClientCertificateInput) (*ClientCertificate, error) { req, out := c.GenerateClientCertificateRequest(input) @@ -3164,10 +3439,14 @@ func (c *APIGateway) GetAccountRequest(input *GetAccountInput) (req *request.Req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetAccount(input *GetAccountInput) (*Account, error) { req, out := c.GetAccountRequest(input) @@ -3243,10 +3522,14 @@ func (c *APIGateway) GetApiKeyRequest(input *GetApiKeyInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetApiKey(input *GetApiKeyInput) (*ApiKey, error) { req, out := c.GetApiKeyRequest(input) @@ -3328,10 +3611,15 @@ func (c *APIGateway) GetApiKeysRequest(input *GetApiKeysInput) (req *request.Req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetApiKeys(input *GetApiKeysInput) (*GetApiKeysOutput, error) { req, out := c.GetApiKeysRequest(input) @@ -3459,10 +3747,14 @@ func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetAuthorizer(input *GetAuthorizerInput) (*Authorizer, error) { req, out := c.GetAuthorizerRequest(input) @@ -3540,12 +3832,18 @@ func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetAuthorizers(input *GetAuthorizersInput) (*GetAuthorizersOutput, error) { req, out := c.GetAuthorizersRequest(input) @@ -3621,10 +3919,14 @@ func (c *APIGateway) GetBasePathMappingRequest(input *GetBasePathMappingInput) ( // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetBasePathMapping(input *GetBasePathMappingInput) (*BasePathMapping, error) { req, out := c.GetBasePathMappingRequest(input) @@ -3706,10 +4008,14 @@ func (c *APIGateway) GetBasePathMappingsRequest(input *GetBasePathMappingsInput) // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetBasePathMappings(input *GetBasePathMappingsInput) (*GetBasePathMappingsOutput, error) { req, out := c.GetBasePathMappingsRequest(input) @@ -3835,10 +4141,14 @@ func (c *APIGateway) GetClientCertificateRequest(input *GetClientCertificateInpu // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetClientCertificate(input *GetClientCertificateInput) (*ClientCertificate, error) { req, out := c.GetClientCertificateRequest(input) @@ -3920,10 +4230,15 @@ func (c *APIGateway) GetClientCertificatesRequest(input *GetClientCertificatesIn // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetClientCertificates(input *GetClientCertificatesInput) (*GetClientCertificatesOutput, error) { req, out := c.GetClientCertificatesRequest(input) @@ -4049,12 +4364,18 @@ func (c *APIGateway) GetDeploymentRequest(input *GetDeploymentInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The requested service is not available. For details see the accompanying +// error message. Retry after the specified time period. // func (c *APIGateway) GetDeployment(input *GetDeploymentInput) (*Deployment, error) { req, out := c.GetDeploymentRequest(input) @@ -4136,12 +4457,19 @@ func (c *APIGateway) GetDeploymentsRequest(input *GetDeploymentsInput) (req *req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The requested service is not available. For details see the accompanying +// error message. Retry after the specified time period. // func (c *APIGateway) GetDeployments(input *GetDeploymentsInput) (*GetDeploymentsOutput, error) { req, out := c.GetDeploymentsRequest(input) @@ -4265,10 +4593,14 @@ func (c *APIGateway) GetDocumentationPartRequest(input *GetDocumentationPartInpu // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetDocumentationPart(input *GetDocumentationPartInput) (*DocumentationPart, error) { req, out := c.GetDocumentationPartRequest(input) @@ -4342,12 +4674,18 @@ func (c *APIGateway) GetDocumentationPartsRequest(input *GetDocumentationPartsIn // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetDocumentationParts(input *GetDocumentationPartsInput) (*GetDocumentationPartsOutput, error) { req, out := c.GetDocumentationPartsRequest(input) @@ -4421,10 +4759,14 @@ func (c *APIGateway) GetDocumentationVersionRequest(input *GetDocumentationVersi // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetDocumentationVersion(input *GetDocumentationVersionInput) (*DocumentationVersion, error) { req, out := c.GetDocumentationVersionRequest(input) @@ -4498,12 +4840,18 @@ func (c *APIGateway) GetDocumentationVersionsRequest(input *GetDocumentationVers // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetDocumentationVersions(input *GetDocumentationVersionsInput) (*GetDocumentationVersionsOutput, error) { req, out := c.GetDocumentationVersionsRequest(input) @@ -4580,12 +4928,18 @@ func (c *APIGateway) GetDomainNameRequest(input *GetDomainNameInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The requested service is not available. For details see the accompanying +// error message. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetDomainName(input *GetDomainNameInput) (*DomainName, error) { req, out := c.GetDomainNameRequest(input) @@ -4667,10 +5021,15 @@ func (c *APIGateway) GetDomainNamesRequest(input *GetDomainNamesInput) (req *req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetDomainNames(input *GetDomainNamesInput) (*GetDomainNamesOutput, error) { req, out := c.GetDomainNamesRequest(input) @@ -4796,14 +5155,22 @@ func (c *APIGateway) GetExportRequest(input *GetExportInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetExport(input *GetExportInput) (*GetExportOutput, error) { req, out := c.GetExportRequest(input) @@ -4879,10 +5246,14 @@ func (c *APIGateway) GetGatewayResponseRequest(input *GetGatewayResponseInput) ( // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetGatewayResponse(input *GetGatewayResponseInput) (*UpdateGatewayResponseOutput, error) { req, out := c.GetGatewayResponseRequest(input) @@ -4961,12 +5332,18 @@ func (c *APIGateway) GetGatewayResponsesRequest(input *GetGatewayResponsesInput) // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetGatewayResponses(input *GetGatewayResponsesInput) (*GetGatewayResponsesOutput, error) { req, out := c.GetGatewayResponsesRequest(input) @@ -5042,10 +5419,14 @@ func (c *APIGateway) GetIntegrationRequest(input *GetIntegrationInput) (req *req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetIntegration(input *GetIntegrationInput) (*Integration, error) { req, out := c.GetIntegrationRequest(input) @@ -5121,10 +5502,14 @@ func (c *APIGateway) GetIntegrationResponseRequest(input *GetIntegrationResponse // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetIntegrationResponse(input *GetIntegrationResponseInput) (*IntegrationResponse, error) { req, out := c.GetIntegrationResponseRequest(input) @@ -5200,10 +5585,14 @@ func (c *APIGateway) GetMethodRequest(input *GetMethodInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetMethod(input *GetMethodInput) (*Method, error) { req, out := c.GetMethodRequest(input) @@ -5279,10 +5668,14 @@ func (c *APIGateway) GetMethodResponseRequest(input *GetMethodResponseInput) (re // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetMethodResponse(input *GetMethodResponseInput) (*MethodResponse, error) { req, out := c.GetMethodResponseRequest(input) @@ -5358,10 +5751,14 @@ func (c *APIGateway) GetModelRequest(input *GetModelInput) (req *request.Request // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetModel(input *GetModelInput) (*Model, error) { req, out := c.GetModelRequest(input) @@ -5438,12 +5835,18 @@ func (c *APIGateway) GetModelTemplateRequest(input *GetModelTemplateInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetModelTemplate(input *GetModelTemplateInput) (*GetModelTemplateOutput, error) { req, out := c.GetModelTemplateRequest(input) @@ -5525,12 +5928,18 @@ func (c *APIGateway) GetModelsRequest(input *GetModelsInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetModels(input *GetModelsInput) (*GetModelsOutput, error) { req, out := c.GetModelsRequest(input) @@ -5656,10 +6065,14 @@ func (c *APIGateway) GetRequestValidatorRequest(input *GetRequestValidatorInput) // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetRequestValidator(input *GetRequestValidatorInput) (*UpdateRequestValidatorOutput, error) { req, out := c.GetRequestValidatorRequest(input) @@ -5735,12 +6148,18 @@ func (c *APIGateway) GetRequestValidatorsRequest(input *GetRequestValidatorsInpu // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetRequestValidators(input *GetRequestValidatorsInput) (*GetRequestValidatorsOutput, error) { req, out := c.GetRequestValidatorsRequest(input) @@ -5816,10 +6235,14 @@ func (c *APIGateway) GetResourceRequest(input *GetResourceInput) (req *request.R // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetResource(input *GetResourceInput) (*Resource, error) { req, out := c.GetResourceRequest(input) @@ -5901,12 +6324,18 @@ func (c *APIGateway) GetResourcesRequest(input *GetResourcesInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error) { req, out := c.GetResourcesRequest(input) @@ -6032,10 +6461,14 @@ func (c *APIGateway) GetRestApiRequest(input *GetRestApiInput) (req *request.Req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetRestApi(input *GetRestApiInput) (*RestApi, error) { req, out := c.GetRestApiRequest(input) @@ -6117,10 +6550,15 @@ func (c *APIGateway) GetRestApisRequest(input *GetRestApisInput) (req *request.R // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetRestApis(input *GetRestApisInput) (*GetRestApisOutput, error) { req, out := c.GetRestApisRequest(input) @@ -6246,14 +6684,22 @@ func (c *APIGateway) GetSdkRequest(input *GetSdkInput) (req *request.Request, ou // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetSdk(input *GetSdkInput) (*GetSdkOutput, error) { req, out := c.GetSdkRequest(input) @@ -6327,10 +6773,14 @@ func (c *APIGateway) GetSdkTypeRequest(input *GetSdkTypeInput) (req *request.Req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetSdkType(input *GetSdkTypeInput) (*SdkType, error) { req, out := c.GetSdkTypeRequest(input) @@ -6404,8 +6854,11 @@ func (c *APIGateway) GetSdkTypesRequest(input *GetSdkTypesInput) (req *request.R // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetSdkTypes(input *GetSdkTypesInput) (*GetSdkTypesOutput, error) { req, out := c.GetSdkTypesRequest(input) @@ -6481,10 +6934,14 @@ func (c *APIGateway) GetStageRequest(input *GetStageInput) (req *request.Request // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetStage(input *GetStageInput) (*Stage, error) { req, out := c.GetStageRequest(input) @@ -6560,10 +7017,14 @@ func (c *APIGateway) GetStagesRequest(input *GetStagesInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetStages(input *GetStagesInput) (*GetStagesOutput, error) { req, out := c.GetStagesRequest(input) @@ -6645,12 +7106,18 @@ func (c *APIGateway) GetUsageRequest(input *GetUsageInput) (req *request.Request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetUsage(input *GetUsageInput) (*Usage, error) { req, out := c.GetUsageRequest(input) @@ -6776,12 +7243,18 @@ func (c *APIGateway) GetUsagePlanRequest(input *GetUsagePlanInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetUsagePlan(input *GetUsagePlanInput) (*UsagePlan, error) { req, out := c.GetUsagePlanRequest(input) @@ -6857,12 +7330,18 @@ func (c *APIGateway) GetUsagePlanKeyRequest(input *GetUsagePlanKeyInput) (req *r // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetUsagePlanKey(input *GetUsagePlanKeyInput) (*UsagePlanKey, error) { req, out := c.GetUsagePlanKeyRequest(input) @@ -6945,12 +7424,18 @@ func (c *APIGateway) GetUsagePlanKeysRequest(input *GetUsagePlanKeysInput) (req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) GetUsagePlanKeys(input *GetUsagePlanKeysInput) (*GetUsagePlanKeysOutput, error) { req, out := c.GetUsagePlanKeysRequest(input) @@ -7082,14 +7567,22 @@ func (c *APIGateway) GetUsagePlansRequest(input *GetUsagePlansInput) (req *reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // func (c *APIGateway) GetUsagePlans(input *GetUsagePlansInput) (*GetUsagePlansOutput, error) { req, out := c.GetUsagePlansRequest(input) @@ -7215,16 +7708,25 @@ func (c *APIGateway) ImportApiKeysRequest(input *ImportApiKeysInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) ImportApiKeys(input *ImportApiKeysInput) (*ImportApiKeysOutput, error) { req, out := c.ImportApiKeysRequest(input) @@ -7298,14 +7800,21 @@ func (c *APIGateway) ImportDocumentationPartsRequest(input *ImportDocumentationP // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) ImportDocumentationParts(input *ImportDocumentationPartsInput) (*ImportDocumentationPartsOutput, error) { req, out := c.ImportDocumentationPartsRequest(input) @@ -7382,14 +7891,22 @@ func (c *APIGateway) ImportRestApiRequest(input *ImportRestApiInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) ImportRestApi(input *ImportRestApiInput) (*RestApi, error) { req, out := c.ImportRestApiRequest(input) @@ -7466,14 +7983,21 @@ func (c *APIGateway) PutGatewayResponseRequest(input *PutGatewayResponseInput) ( // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) PutGatewayResponse(input *PutGatewayResponseInput) (*UpdateGatewayResponseOutput, error) { req, out := c.PutGatewayResponseRequest(input) @@ -7549,14 +8073,22 @@ func (c *APIGateway) PutIntegrationRequest(input *PutIntegrationInput) (req *req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) PutIntegration(input *PutIntegrationInput) (*Integration, error) { req, out := c.PutIntegrationRequest(input) @@ -7632,16 +8164,25 @@ func (c *APIGateway) PutIntegrationResponseRequest(input *PutIntegrationResponse // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) PutIntegrationResponse(input *PutIntegrationResponseInput) (*IntegrationResponse, error) { req, out := c.PutIntegrationResponseRequest(input) @@ -7717,16 +8258,25 @@ func (c *APIGateway) PutMethodRequest(input *PutMethodInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) PutMethod(input *PutMethodInput) (*Method, error) { req, out := c.PutMethodRequest(input) @@ -7802,16 +8352,25 @@ func (c *APIGateway) PutMethodResponseRequest(input *PutMethodResponseInput) (re // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) PutMethodResponse(input *PutMethodResponseInput) (*MethodResponse, error) { req, out := c.PutMethodResponseRequest(input) @@ -7890,16 +8449,25 @@ func (c *APIGateway) PutRestApiRequest(input *PutRestApiInput) (req *request.Req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) PutRestApi(input *PutRestApiInput) (*RestApi, error) { req, out := c.PutRestApiRequest(input) @@ -7978,12 +8546,18 @@ func (c *APIGateway) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInpu // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) TestInvokeAuthorizer(input *TestInvokeAuthorizerInput) (*TestInvokeAuthorizerOutput, error) { req, out := c.TestInvokeAuthorizerRequest(input) @@ -8060,12 +8634,18 @@ func (c *APIGateway) TestInvokeMethodRequest(input *TestInvokeMethodInput) (req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) TestInvokeMethod(input *TestInvokeMethodInput) (*TestInvokeMethodOutput, error) { req, out := c.TestInvokeMethodRequest(input) @@ -8141,12 +8721,18 @@ func (c *APIGateway) UpdateAccountRequest(input *UpdateAccountInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateAccount(input *UpdateAccountInput) (*Account, error) { req, out := c.UpdateAccountRequest(input) @@ -8222,14 +8808,22 @@ func (c *APIGateway) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) UpdateApiKey(input *UpdateApiKeyInput) (*ApiKey, error) { req, out := c.UpdateApiKeyRequest(input) @@ -8307,12 +8901,18 @@ func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateAuthorizer(input *UpdateAuthorizerInput) (*Authorizer, error) { req, out := c.UpdateAuthorizerRequest(input) @@ -8388,14 +8988,22 @@ func (c *APIGateway) UpdateBasePathMappingRequest(input *UpdateBasePathMappingIn // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateBasePathMapping(input *UpdateBasePathMappingInput) (*BasePathMapping, error) { req, out := c.UpdateBasePathMappingRequest(input) @@ -8471,12 +9079,18 @@ func (c *APIGateway) UpdateClientCertificateRequest(input *UpdateClientCertifica // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // func (c *APIGateway) UpdateClientCertificate(input *UpdateClientCertificateInput) (*ClientCertificate, error) { req, out := c.UpdateClientCertificateRequest(input) @@ -8552,14 +9166,22 @@ func (c *APIGateway) UpdateDeploymentRequest(input *UpdateDeploymentInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The requested service is not available. For details see the accompanying +// error message. Retry after the specified time period. // func (c *APIGateway) UpdateDeployment(input *UpdateDeploymentInput) (*Deployment, error) { req, out := c.UpdateDeploymentRequest(input) @@ -8633,16 +9255,25 @@ func (c *APIGateway) UpdateDocumentationPartRequest(input *UpdateDocumentationPa // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateDocumentationPart(input *UpdateDocumentationPartInput) (*DocumentationPart, error) { req, out := c.UpdateDocumentationPartRequest(input) @@ -8716,14 +9347,22 @@ func (c *APIGateway) UpdateDocumentationVersionRequest(input *UpdateDocumentatio // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateDocumentationVersion(input *UpdateDocumentationVersionInput) (*DocumentationVersion, error) { req, out := c.UpdateDocumentationVersionRequest(input) @@ -8799,14 +9438,22 @@ func (c *APIGateway) UpdateDomainNameRequest(input *UpdateDomainNameInput) (req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateDomainName(input *UpdateDomainNameInput) (*DomainName, error) { req, out := c.UpdateDomainNameRequest(input) @@ -8882,12 +9529,18 @@ func (c *APIGateway) UpdateGatewayResponseRequest(input *UpdateGatewayResponseIn // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateGatewayResponse(input *UpdateGatewayResponseInput) (*UpdateGatewayResponseOutput, error) { req, out := c.UpdateGatewayResponseRequest(input) @@ -8963,14 +9616,22 @@ func (c *APIGateway) UpdateIntegrationRequest(input *UpdateIntegrationInput) (re // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) UpdateIntegration(input *UpdateIntegrationInput) (*Integration, error) { req, out := c.UpdateIntegrationRequest(input) @@ -9046,14 +9707,22 @@ func (c *APIGateway) UpdateIntegrationResponseRequest(input *UpdateIntegrationRe // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateIntegrationResponse(input *UpdateIntegrationResponseInput) (*IntegrationResponse, error) { req, out := c.UpdateIntegrationResponseRequest(input) @@ -9129,14 +9798,22 @@ func (c *APIGateway) UpdateMethodRequest(input *UpdateMethodInput) (req *request // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateMethod(input *UpdateMethodInput) (*Method, error) { req, out := c.UpdateMethodRequest(input) @@ -9212,16 +9889,25 @@ func (c *APIGateway) UpdateMethodResponseRequest(input *UpdateMethodResponseInpu // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded the rate limit. Retry after the specified time period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateMethodResponse(input *UpdateMethodResponseInput) (*MethodResponse, error) { req, out := c.UpdateMethodResponseRequest(input) @@ -9297,14 +9983,22 @@ func (c *APIGateway) UpdateModelRequest(input *UpdateModelInput) (req *request.R // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateModel(input *UpdateModelInput) (*Model, error) { req, out := c.UpdateModelRequest(input) @@ -9380,12 +10074,18 @@ func (c *APIGateway) UpdateRequestValidatorRequest(input *UpdateRequestValidator // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateRequestValidator(input *UpdateRequestValidatorInput) (*UpdateRequestValidatorOutput, error) { req, out := c.UpdateRequestValidatorRequest(input) @@ -9461,14 +10161,22 @@ func (c *APIGateway) UpdateResourceRequest(input *UpdateResourceInput) (req *req // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateResource(input *UpdateResourceInput) (*Resource, error) { req, out := c.UpdateResourceRequest(input) @@ -9544,14 +10252,22 @@ func (c *APIGateway) UpdateRestApiRequest(input *UpdateRestApiInput) (req *reque // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateRestApi(input *UpdateRestApiInput) (*RestApi, error) { req, out := c.UpdateRestApiRequest(input) @@ -9627,14 +10343,22 @@ func (c *APIGateway) UpdateStageRequest(input *UpdateStageInput) (req *request.R // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // func (c *APIGateway) UpdateStage(input *UpdateStageInput) (*Stage, error) { req, out := c.UpdateStageRequest(input) @@ -9711,12 +10435,18 @@ func (c *APIGateway) UpdateUsageRequest(input *UpdateUsageInput) (req *request.R // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // func (c *APIGateway) UpdateUsage(input *UpdateUsageInput) (*Usage, error) { req, out := c.UpdateUsageRequest(input) @@ -9792,14 +10522,22 @@ func (c *APIGateway) UpdateUsagePlanRequest(input *UpdateUsagePlanInput) (req *r // // Returned Error Codes: // * ErrCodeUnauthorizedException "UnauthorizedException" +// The request is denied because the caller has insufficient permissions. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The request has reached its throttling limit. Retry after the specified time +// period. // // * ErrCodeBadRequestException "BadRequestException" +// The submitted request is not valid, for example, the input is incomplete +// or incorrect. See the accompanying error message for details. // // * ErrCodeNotFoundException "NotFoundException" +// The requested resource is not found. Make sure that the request URI is correct. // // * ErrCodeConflictException "ConflictException" +// The request configuration has conflicts. For details, see the accompanying +// error message. // func (c *APIGateway) UpdateUsagePlan(input *UpdateUsagePlanInput) (*UsagePlan, error) { req, out := c.UpdateUsagePlanRequest(input) @@ -10051,23 +10789,24 @@ func (s *ApiStage) SetStage(v string) *ApiStage { type Authorizer struct { _ struct{} `type:"structure"` - // Optional customer-defined field, used in Swagger imports/exports. Has no + // Optional customer-defined field, used in Swagger imports and exports without // functional impact. AuthType *string `locationName:"authType" type:"string"` - // Specifies the credentials required for the authorizer, if any. Two options - // are available. To specify an IAM role for Amazon API Gateway to assume, use - // the role's Amazon Resource Name (ARN). To use resource-based permissions - // on the Lambda function, specify null. + // Specifies the required credentials as an IAM role for Amazon API Gateway + // to invoke the authorizer. To specify an IAM role for Amazon API Gateway to + // assume, use the role's Amazon Resource Name (ARN). To use resource-based + // permissions on the Lambda function, specify null. AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"` - // The TTL in seconds of cached authorizer results. If greater than 0, API Gateway - // will cache authorizer responses. If this field is not set, the default value - // is 300. The maximum value is 3600, or 1 hour. + // The TTL in seconds of cached authorizer results. If it equals 0, authorization + // caching is disabled. If it is greater than 0, API Gateway will cache authorizer + // responses. If this field is not set, the default value is 300. The maximum + // value is 3600, or 1 hour. AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - // [Required] Specifies the authorizer's Uniform Resource Identifier (URI). - // For TOKEN authorizers, this must be a well-formed Lambda function URI, for + // Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN or + // REQUEST authorizers, this must be a well-formed Lambda function URI, for // example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. // In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, // where {region} is the same as the region hosting the Lambda function, path @@ -10079,30 +10818,47 @@ type Authorizer struct { // The identifier for the authorizer resource. Id *string `locationName:"id" type:"string"` - // [Required] The source of the identity in an incoming request. For a TOKEN - // authorizer, this value is a mapping expression with the same syntax as integration - // parameter mappings. The only valid source for tokens is 'header', so the - // expression should match 'method.request.header.[headerName]'. The value of - // the header '[headerName]' will be interpreted as the incoming token. For - // COGNITO_USER_POOLS authorizers, this property is used. + // The identity source for which authorization is requested. For a TOKEN authorizer, + // this is required and specifies the request header mapping expression for + // the custom header holding the authorization token submitted by the client. + // For example, if the token header name is Auth, the header mapping expression + // is method.request.header.Auth. + // For the REQUEST authorizer, this is required when authorization caching is + // enabled. The value is a comma-separated string of one or more mapping expressions + // of the specified request parameters. For example, if an Auth header, a Name + // query string parameter are defined as identity sources, this value is method.request.header.Auth, + // method.request.querystring.Name. These parameters will be used to derive + // the authorization caching key and to perform runtime validation of the REQUEST + // authorizer by verifying all of the identity-related request parameters are + // present, not null and non-empty. Only when this is true does the authorizer + // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized + // response without calling the Lambda function. The valid value is a string + // of comma-separated mapping expressions of the specified request parameters. + // When the authorization caching is not enabled, this property is optional. + // + // For a COGNITO_USER_POOLS authorizer, this property is not used. IdentitySource *string `locationName:"identitySource" type:"string"` - // A validation expression for the incoming identity. For TOKEN authorizers, - // this value should be a regular expression. The incoming token from the client - // is matched against this expression, and will proceed if the token matches. - // If the token doesn't match, the client receives a 401 Unauthorized response. + // A validation expression for the incoming identity token. For TOKEN authorizers, + // this value is a regular expression. Amazon API Gateway will match the incoming + // token from the client against the specified regular expression. It will invoke + // the authorizer's Lambda function there is a match. Otherwise, it will return + // a 401 Unauthorized response without calling the Lambda function. The validation + // expression does not apply to the REQUEST authorizer. IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` // [Required] The name of the authorizer. Name *string `locationName:"name" type:"string"` - // A list of the provider ARNs of the authorizer. For an TOKEN authorizer, this - // is not defined. For authorizers of the COGNITO_USER_POOLS type, each element - // corresponds to a user pool ARN of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. + // A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. + // Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. + // For a TOKEN or REQUEST authorizer, this is not defined. ProviderARNs []*string `locationName:"providerARNs" type:"list"` - // [Required] The type of the authorizer. Currently, the valid type is TOKEN - // for a Lambda function or COGNITO_USER_POOLS for an Amazon Cognito user pool. + // [Required] The authorizer type. Valid values are TOKEN for a Lambda function + // using a single authorization token submitted in a custom header, REQUEST + // for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS + // for using an Amazon Cognito user pool. Type *string `locationName:"type" type:"string" enum:"AuthorizerType"` } @@ -10227,8 +10983,9 @@ func (s *BasePathMapping) SetStage(v string) *BasePathMapping { // Represents a client certificate used to configure client-side SSL authentication // while sending requests to the integration endpoint. // -// Client certificates are used authenticate an API by the back-end server. -// To authenticate an API client (or user), use a custom Authorizer. +// Client certificates are used to authenticate an API by the backend server. +// To authenticate an API client (or user), use IAM roles and policies, a custom +// Authorizer or an Amazon Cognito user pool. // Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) type ClientCertificate struct { _ struct{} `type:"structure"` @@ -10374,25 +11131,59 @@ func (s *CreateApiKeyInput) SetValue(v string) *CreateApiKeyInput { type CreateAuthorizerInput struct { _ struct{} `type:"structure"` - // Optional customer-defined field, used in Swagger imports/exports. Has no + // Optional customer-defined field, used in Swagger imports and exports without // functional impact. AuthType *string `locationName:"authType" type:"string"` - // Specifies the credentials required for the authorizer, if any. + // Specifies the required credentials as an IAM role for Amazon API Gateway + // to invoke the authorizer. To specify an IAM role for Amazon API Gateway to + // assume, use the role's Amazon Resource Name (ARN). To use resource-based + // permissions on the Lambda function, specify null. AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"` - // The TTL of cached authorizer results. + // The TTL in seconds of cached authorizer results. If it equals 0, authorization + // caching is disabled. If it is greater than 0, API Gateway will cache authorizer + // responses. If this field is not set, the default value is 300. The maximum + // value is 3600, or 1 hour. AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` - // [Required] Specifies the authorizer's Uniform Resource Identifier (URI). + // Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN or + // REQUEST authorizers, this must be a well-formed Lambda function URI, for + // example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. + // In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, + // where {region} is the same as the region hosting the Lambda function, path + // indicates that the remaining substring in the URI should be treated as the + // path to the resource, including the initial /. For Lambda functions, this + // is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - // [Required] The source of the identity in an incoming request. + // The identity source for which authorization is requested. For a TOKEN authorizer, + // this is required and specifies the request header mapping expression for + // the custom header holding the authorization token submitted by the client. + // For example, if the token header name is Auth, the header mapping expression + // is method.request.header.Auth. + // For the REQUEST authorizer, this is required when authorization caching is + // enabled. The value is a comma-separated string of one or more mapping expressions + // of the specified request parameters. For example, if an Auth header, a Name + // query string parameter are defined as identity sources, this value is method.request.header.Auth, + // method.request.querystring.Name. These parameters will be used to derive + // the authorization caching key and to perform runtime validation of the REQUEST + // authorizer by verifying all of the identity-related request parameters are + // present, not null and non-empty. Only when this is true does the authorizer + // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized + // response without calling the Lambda function. The valid value is a string + // of comma-separated mapping expressions of the specified request parameters. + // When the authorization caching is not enabled, this property is optional. // - // IdentitySource is a required field - IdentitySource *string `locationName:"identitySource" type:"string" required:"true"` + // For a COGNITO_USER_POOLS authorizer, this property is not used. + IdentitySource *string `locationName:"identitySource" type:"string"` - // A validation expression for the incoming identity. + // A validation expression for the incoming identity token. For TOKEN authorizers, + // this value is a regular expression. Amazon API Gateway will match the incoming + // token from the client against the specified regular expression. It will invoke + // the authorizer's Lambda function there is a match. Otherwise, it will return + // a 401 Unauthorized response without calling the Lambda function. The validation + // expression does not apply to the REQUEST authorizer. IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` // [Required] The name of the authorizer. @@ -10400,7 +11191,9 @@ type CreateAuthorizerInput struct { // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` - // A list of the Cognito Your User Pool authorizer's provider ARNs. + // A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. + // Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. + // For a TOKEN or REQUEST authorizer, this is not defined. ProviderARNs []*string `locationName:"providerARNs" type:"list"` // The string identifier of the associated RestApi. @@ -10408,7 +11201,10 @@ type CreateAuthorizerInput struct { // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // [Required] The type of the authorizer. + // [Required] The authorizer type. Valid values are TOKEN for a Lambda function + // using a single authorization token submitted in a custom header, REQUEST + // for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS + // for using an Amazon Cognito user pool. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"AuthorizerType"` @@ -10427,9 +11223,6 @@ func (s CreateAuthorizerInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateAuthorizerInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateAuthorizerInput"} - if s.IdentitySource == nil { - invalidParams.Add(request.NewErrParamRequired("IdentitySource")) - } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -10828,32 +11621,49 @@ func (s *CreateDocumentationVersionInput) SetStageName(v string) *CreateDocument type CreateDomainNameInput struct { _ struct{} `type:"structure"` - // The reference to an AWS-managed certificate. AWS Certificate Manager is the - // only supported source. + // The reference to an AWS-managed certificate that will be used by edge-optimized + // endpoint for this domain name. AWS Certificate Manager is the only supported + // source. CertificateArn *string `locationName:"certificateArn" type:"string"` - // [Deprecated] The body of the server certificate provided by your certificate - // authority. + // [Deprecated] The body of the server certificate that will be used by edge-optimized + // endpoint for this domain name provided by your certificate authority. CertificateBody *string `locationName:"certificateBody" type:"string"` // [Deprecated] The intermediate certificates and optionally the root certificate, - // one after the other without any blank lines. If you include the root certificate, - // your certificate chain must start with intermediate certificates and end - // with the root certificate. Use the intermediate certificates that were provided - // by your certificate authority. Do not include any intermediaries that are - // not in the chain of trust path. + // one after the other without any blank lines, used by an edge-optimized endpoint + // for this domain name. If you include the root certificate, your certificate + // chain must start with intermediate certificates and end with the root certificate. + // Use the intermediate certificates that were provided by your certificate + // authority. Do not include any intermediaries that are not in the chain of + // trust path. CertificateChain *string `locationName:"certificateChain" type:"string"` - // The user-friendly name of the certificate. + // The user-friendly name of the certificate that will be used by edge-optimized + // endpoint for this domain name. CertificateName *string `locationName:"certificateName" type:"string"` - // [Deprecated] Your certificate's private key. + // [Deprecated] Your edge-optimized endpoint's domain name certificate's private + // key. CertificatePrivateKey *string `locationName:"certificatePrivateKey" type:"string"` // (Required) The name of the DomainName resource. // // DomainName is a required field DomainName *string `locationName:"domainName" type:"string" required:"true"` + + // The endpoint configuration of this DomainName showing the endpoint types + // of the domain name. + EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` + + // The reference to an AWS-managed certificate that will be used by regional + // endpoint for this domain name. AWS Certificate Manager is the only supported + // source. + RegionalCertificateArn *string `locationName:"regionalCertificateArn" type:"string"` + + // The user-friendly name of the certificate that will be used by regional endpoint + // for this domain name. + RegionalCertificateName *string `locationName:"regionalCertificateName" type:"string"` } // String returns the string representation @@ -10915,6 +11725,24 @@ func (s *CreateDomainNameInput) SetDomainName(v string) *CreateDomainNameInput { return s } +// SetEndpointConfiguration sets the EndpointConfiguration field's value. +func (s *CreateDomainNameInput) SetEndpointConfiguration(v *EndpointConfiguration) *CreateDomainNameInput { + s.EndpointConfiguration = v + return s +} + +// SetRegionalCertificateArn sets the RegionalCertificateArn field's value. +func (s *CreateDomainNameInput) SetRegionalCertificateArn(v string) *CreateDomainNameInput { + s.RegionalCertificateArn = &v + return s +} + +// SetRegionalCertificateName sets the RegionalCertificateName field's value. +func (s *CreateDomainNameInput) SetRegionalCertificateName(v string) *CreateDomainNameInput { + s.RegionalCertificateName = &v + return s +} + // Request to add a new Model to an existing RestApi resource. type CreateModelInput struct { _ struct{} `type:"structure"` @@ -10927,7 +11755,7 @@ type CreateModelInput struct { // The description of the model. Description *string `locationName:"description" type:"string"` - // The name of the model. + // The name of the model. Must be alphanumeric. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` @@ -11150,6 +11978,10 @@ type CreateRestApiInput struct { // The description of the RestApi. Description *string `locationName:"description" type:"string"` + // The endpoint configuration of this RestApi showing the endpoint types of + // the API. + EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` + // The name of the RestApi. // // Name is a required field @@ -11200,6 +12032,12 @@ func (s *CreateRestApiInput) SetDescription(v string) *CreateRestApiInput { return s } +// SetEndpointConfiguration sets the EndpointConfiguration field's value. +func (s *CreateRestApiInput) SetEndpointConfiguration(v *EndpointConfiguration) *CreateRestApiInput { + s.EndpointConfiguration = v + return s +} + // SetName sets the Name field's value. func (s *CreateRestApiInput) SetName(v string) *CreateRestApiInput { s.Name = &v @@ -13017,8 +13855,8 @@ type DocumentationPartLocation struct { // a valid and required field for API entity types of API, AUTHORIZER, MODEL, // RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, // RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not - // apply to any entity of the API, AUTHROZER, METHOD, MODEL, REQUEST_BODY, or - // RESOURCE type. + // apply to any entity of the API, AUTHORIZER, METHOD, MODEL, REQUEST_BODY, + // or RESOURCE type. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"DocumentationPartType"` @@ -13126,29 +13964,61 @@ func (s *DocumentationVersion) SetVersion(v string) *DocumentationVersion { return s } -// Represents a domain name that is contained in a simpler, more intuitive URL -// that can be called. +// Represents a custom domain name as a user-friendly host name of an API (RestApi). // -// Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// When you deploy an API, Amazon API Gateway creates a default host name for +// the API. This default API host name is of the {restapi-id}.execute-api.{region}.amazonaws.com +// format. With the default host name, you can access the API's root resource +// with the URL of https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage}/. +// When you set up a custom domain name of apis.example.com for this API, you +// can then access the same resource using the URL of the https://apis.examples.com/myApi, +// where myApi is the base path mapping (BasePathMapping) of your API under +// the custom domain name. +// +// Set a Custom Host Name for an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type DomainName struct { _ struct{} `type:"structure"` - // The reference to an AWS-managed certificate. AWS Certificate Manager is the - // only supported source. + // The reference to an AWS-managed certificate that will be used by edge-optimized + // endpoint for this domain name. AWS Certificate Manager is the only supported + // source. CertificateArn *string `locationName:"certificateArn" type:"string"` - // The name of the certificate. + // The name of the certificate that will be used by edge-optimized endpoint + // for this domain name. CertificateName *string `locationName:"certificateName" type:"string"` - // The timestamp when the certificate was uploaded. + // The timestamp when the certificate that was used by edge-optimized endpoint + // for this domain name was uploaded. CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp" timestampFormat:"unix"` - // The domain name of the Amazon CloudFront distribution. For more information, - // see the Amazon CloudFront documentation (http://aws.amazon.com/documentation/cloudfront/). + // The domain name of the Amazon CloudFront distribution associated with this + // custom domain name for an edge-optimized endpoint. You set up this association + // when adding a DNS record pointing the custom domain name to this distribution + // name. For more information about CloudFront distributions, see the Amazon + // CloudFront documentation (http://aws.amazon.com/documentation/cloudfront/). DistributionDomainName *string `locationName:"distributionDomainName" type:"string"` // The name of the DomainName resource. DomainName *string `locationName:"domainName" type:"string"` + + // The endpoint configuration of this DomainName showing the endpoint types + // of the domain name. + EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` + + // The reference to an AWS-managed certificate that will be used for validating + // the regional domain name. AWS Certificate Manager is the only supported source. + RegionalCertificateArn *string `locationName:"regionalCertificateArn" type:"string"` + + // The name of the certificate that will be used for validating the regional + // domain name. + RegionalCertificateName *string `locationName:"regionalCertificateName" type:"string"` + + // The domain name associated with the regional endpoint for this custom domain + // name. You set up this association by adding a DNS record that points the + // custom domain name to this regional domain name. The regional domain name + // is returned by Amazon API Gateway when you create a regional endpoint. + RegionalDomainName *string `locationName:"regionalDomainName" type:"string"` } // String returns the string representation @@ -13191,6 +14061,58 @@ func (s *DomainName) SetDomainName(v string) *DomainName { return s } +// SetEndpointConfiguration sets the EndpointConfiguration field's value. +func (s *DomainName) SetEndpointConfiguration(v *EndpointConfiguration) *DomainName { + s.EndpointConfiguration = v + return s +} + +// SetRegionalCertificateArn sets the RegionalCertificateArn field's value. +func (s *DomainName) SetRegionalCertificateArn(v string) *DomainName { + s.RegionalCertificateArn = &v + return s +} + +// SetRegionalCertificateName sets the RegionalCertificateName field's value. +func (s *DomainName) SetRegionalCertificateName(v string) *DomainName { + s.RegionalCertificateName = &v + return s +} + +// SetRegionalDomainName sets the RegionalDomainName field's value. +func (s *DomainName) SetRegionalDomainName(v string) *DomainName { + s.RegionalDomainName = &v + return s +} + +// The endpoint configuration to indicate the types of endpoints an API (RestApi) +// or its custom domain name (DomainName) has. +type EndpointConfiguration struct { + _ struct{} `type:"structure"` + + // A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). + // For an edge-optimized API and its custom domain name, the endpoint type is + // "EDGE". For a regional API and its custom domain name, the endpoint type + // is REGIONAL. + Types []*string `locationName:"types" type:"list"` +} + +// String returns the string representation +func (s EndpointConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointConfiguration) GoString() string { + return s.String() +} + +// SetTypes sets the Types field's value. +func (s *EndpointConfiguration) SetTypes(v []*string) *EndpointConfiguration { + s.Types = v + return s +} + // Request to flush authorizer cache entries on a specified stage. type FlushStageAuthorizersCacheInput struct { _ struct{} `type:"structure"` @@ -15942,10 +16864,11 @@ func (s *GetRestApisOutput) SetPosition(v string) *GetRestApisOutput { type GetSdkInput struct { _ struct{} `type:"structure"` - // A key-value map of query string parameters that specify properties of the - // SDK, depending on the requested sdkType. For sdkType of objectivec, a parameter - // named classPrefix is required. For sdkType of android, parameters named groupId, - // artifactId, artifactVersion, and invokerPackage are required. + // A string-to-string key-value map of query parameters sdkType-dependent properties + // of the SDK. For sdkType of objectivec or swift, a parameter named classPrefix + // is required. For sdkType of android, parameters named groupId, artifactId, + // artifactVersion, and invokerPackage are required. For sdkType of java, parameters + // named serviceName and javaPackageName are required. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` // The string identifier of the associated RestApi. @@ -15953,8 +16876,8 @@ type GetSdkInput struct { // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The language for the generated SDK. Currently javascript, android, and objectivec - // (for iOS) are supported. + // The language for the generated SDK. Currently java, javascript, android, + // objectivec and swift (for iOS) are supported. // // SdkType is a required field SdkType *string `location:"uri" locationName:"sdk_type" type:"string" required:"true"` @@ -17744,7 +18667,7 @@ type Model struct { // The identifier for the model resource. Id *string `locationName:"id" type:"string"` - // The name of the model. + // The name of the model. Must be an alphanumeric string. Name *string `locationName:"name" type:"string"` // The schema for the model. For application/json models, this should be JSON-schema @@ -18833,6 +19756,10 @@ type RestApi struct { // The API's description. Description *string `locationName:"description" type:"string"` + // The endpoint configuration of this RestApi showing the endpoint types of + // the API. + EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` + // The API's identifier. This identifier is unique across all of your APIs in // Amazon API Gateway. Id *string `locationName:"id" type:"string"` @@ -18876,6 +19803,12 @@ func (s *RestApi) SetDescription(v string) *RestApi { return s } +// SetEndpointConfiguration sets the EndpointConfiguration field's value. +func (s *RestApi) SetEndpointConfiguration(v *EndpointConfiguration) *RestApi { + s.EndpointConfiguration = v + return s +} + // SetId sets the Id field's value. func (s *RestApi) SetId(v string) *RestApi { s.Id = &v @@ -21292,12 +22225,17 @@ const ( ApiKeysFormatCsv = "csv" ) -// The authorizer type. the current value is TOKEN for a Lambda function or -// COGNITO_USER_POOLS for an Amazon Cognito Your User Pool. +// [Required] The authorizer type. Valid values are TOKEN for a Lambda function +// using a single authorization token submitted in a custom header, REQUEST +// for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS +// for using an Amazon Cognito user pool. const ( // AuthorizerTypeToken is a AuthorizerType enum value AuthorizerTypeToken = "TOKEN" + // AuthorizerTypeRequest is a AuthorizerType enum value + AuthorizerTypeRequest = "REQUEST" + // AuthorizerTypeCognitoUserPools is a AuthorizerType enum value AuthorizerTypeCognitoUserPools = "COGNITO_USER_POOLS" ) @@ -21393,6 +22331,17 @@ const ( DocumentationPartTypeResponseBody = "RESPONSE_BODY" ) +// The endpoint type. The valid value is EDGE for edge-optimized API setup, +// most suitable for mobile applications, REGIONAL for regional API endpoint +// setup, most suitable for calling from AWS Region +const ( + // EndpointTypeRegional is a EndpointType enum value + EndpointTypeRegional = "REGIONAL" + + // EndpointTypeEdge is a EndpointType enum value + EndpointTypeEdge = "EDGE" +) + const ( // GatewayResponseTypeDefault4xx is a GatewayResponseType enum value GatewayResponseTypeDefault4xx = "DEFAULT_4XX" diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go index 7bcbd381a..a7862f072 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go @@ -14,7 +14,7 @@ // // Using the Client // -// To Amazon API Gateway with the SDK use the New function to create +// To contact Amazon API Gateway with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go index b8f2efc29..99208e845 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go @@ -6,29 +6,47 @@ const ( // ErrCodeBadRequestException for service response error code // "BadRequestException". + // + // The submitted request is not valid, for example, the input is incomplete + // or incorrect. See the accompanying error message for details. ErrCodeBadRequestException = "BadRequestException" // ErrCodeConflictException for service response error code // "ConflictException". + // + // The request configuration has conflicts. For details, see the accompanying + // error message. ErrCodeConflictException = "ConflictException" // ErrCodeLimitExceededException for service response error code // "LimitExceededException". + // + // The request exceeded the rate limit. Retry after the specified time period. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeNotFoundException for service response error code // "NotFoundException". + // + // The requested resource is not found. Make sure that the request URI is correct. ErrCodeNotFoundException = "NotFoundException" // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". + // + // The requested service is not available. For details see the accompanying + // error message. Retry after the specified time period. ErrCodeServiceUnavailableException = "ServiceUnavailableException" // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". + // + // The request has reached its throttling limit. Retry after the specified time + // period. ErrCodeTooManyRequestsException = "TooManyRequestsException" // ErrCodeUnauthorizedException for service response error code // "UnauthorizedException". + // + // The request is denied because the caller has insufficient permissions. ErrCodeUnauthorizedException = "UnauthorizedException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go index 889883403..d574f8dbb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go @@ -112,6 +112,101 @@ func (c *ApplicationAutoScaling) DeleteScalingPolicyWithContext(ctx aws.Context, return out, req.Send() } +const opDeleteScheduledAction = "DeleteScheduledAction" + +// DeleteScheduledActionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteScheduledAction operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteScheduledAction for more information on using the DeleteScheduledAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteScheduledActionRequest method. +// req, resp := client.DeleteScheduledActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledAction +func (c *ApplicationAutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) { + op := &request.Operation{ + Name: opDeleteScheduledAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteScheduledActionInput{} + } + + output = &DeleteScheduledActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteScheduledAction API operation for Application Auto Scaling. +// +// Deletes the specified Application Auto Scaling scheduled action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Application Auto Scaling's +// API operation DeleteScheduledAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// An exception was thrown for a validation issue. Review the available parameters +// for the API request. +// +// * ErrCodeObjectNotFoundException "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. +// +// * ErrCodeConcurrentUpdateException "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. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an internal error. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledAction +func (c *ApplicationAutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) (*DeleteScheduledActionOutput, error) { + req, out := c.DeleteScheduledActionRequest(input) + return out, req.Send() +} + +// DeleteScheduledActionWithContext is the same as DeleteScheduledAction with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteScheduledAction for details on how to use this API operation. +// +// 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 *ApplicationAutoScaling) DeleteScheduledActionWithContext(ctx aws.Context, input *DeleteScheduledActionInput, opts ...request.Option) (*DeleteScheduledActionOutput, error) { + req, out := c.DeleteScheduledActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeregisterScalableTarget = "DeregisterScalableTarget" // DeregisterScalableTargetRequest generates a "aws/request.Request" representing the @@ -569,8 +664,7 @@ func (c *ApplicationAutoScaling) DescribeScalingPoliciesRequest(input *DescribeS // DescribeScalingPolicies API operation for Application Auto Scaling. // -// Provides descriptive information about the scaling policies in the specified -// namespace. +// Describes the scaling policies for the specified service namespace. // // You can filter the results using the ResourceId, ScalableDimension, and PolicyNames // parameters. @@ -680,6 +774,102 @@ func (c *ApplicationAutoScaling) DescribeScalingPoliciesPagesWithContext(ctx aws return p.Err() } +const opDescribeScheduledActions = "DescribeScheduledActions" + +// DescribeScheduledActionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeScheduledActions operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeScheduledActions for more information on using the DescribeScheduledActions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeScheduledActionsRequest method. +// req, resp := client.DescribeScheduledActionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActions +func (c *ApplicationAutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) { + op := &request.Operation{ + Name: opDescribeScheduledActions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeScheduledActionsInput{} + } + + output = &DescribeScheduledActionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeScheduledActions API operation for Application Auto Scaling. +// +// Describes the scheduled actions for the specified service namespace. +// +// You can filter the results using the ResourceId, ScalableDimension, and ScheduledActionNames +// parameters. +// +// To create a scheduled action or update an existing one, see PutScheduledAction. +// If you are no longer using a scheduled action, you can delete it using DeleteScheduledAction. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Application Auto Scaling's +// API operation DescribeScheduledActions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// An exception was thrown for a validation issue. Review the available parameters +// for the API request. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The next token supplied was invalid. +// +// * ErrCodeConcurrentUpdateException "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. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an internal error. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActions +func (c *ApplicationAutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) { + req, out := c.DescribeScheduledActionsRequest(input) + return out, req.Send() +} + +// DescribeScheduledActionsWithContext is the same as DescribeScheduledActions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeScheduledActions for details on how to use this API operation. +// +// 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 *ApplicationAutoScaling) DescribeScheduledActionsWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, opts ...request.Option) (*DescribeScheduledActionsOutput, error) { + req, out := c.DescribeScheduledActionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the @@ -800,6 +990,120 @@ func (c *ApplicationAutoScaling) PutScalingPolicyWithContext(ctx aws.Context, in return out, req.Send() } +const opPutScheduledAction = "PutScheduledAction" + +// PutScheduledActionRequest generates a "aws/request.Request" representing the +// client's request for the PutScheduledAction operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutScheduledAction for more information on using the PutScheduledAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutScheduledActionRequest method. +// req, resp := client.PutScheduledActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledAction +func (c *ApplicationAutoScaling) PutScheduledActionRequest(input *PutScheduledActionInput) (req *request.Request, output *PutScheduledActionOutput) { + op := &request.Operation{ + Name: opPutScheduledAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutScheduledActionInput{} + } + + output = &PutScheduledActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutScheduledAction API operation for Application Auto Scaling. +// +// Creates or updates a scheduled action for an Application Auto Scaling scalable +// target. +// +// Each scalable target is identified by a service namespace, resource ID, and +// scalable dimension. A scheduled action applies to the scalable target identified +// by those three attributes. You cannot create a scheduled action without first +// registering a scalable target using RegisterScalableTarget. +// +// To update an action, specify its name and the parameters that you want to +// change. If you don't specify start and end times, the old values are deleted. +// Any other parameters that you don't specify are not changed by this update +// request. +// +// You can view the scheduled actions using DescribeScheduledActions. If you +// are no longer using a scheduled action, you can delete it using DeleteScheduledAction. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Application Auto Scaling's +// API operation PutScheduledAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// An exception was thrown for a validation issue. Review the available parameters +// for the API request. +// +// * ErrCodeLimitExceededException "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). +// +// * ErrCodeObjectNotFoundException "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. +// +// * ErrCodeConcurrentUpdateException "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. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an internal error. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledAction +func (c *ApplicationAutoScaling) PutScheduledAction(input *PutScheduledActionInput) (*PutScheduledActionOutput, error) { + req, out := c.PutScheduledActionRequest(input) + return out, req.Send() +} + +// PutScheduledActionWithContext is the same as PutScheduledAction with the addition of +// the ability to pass a context and additional request options. +// +// See PutScheduledAction for details on how to use this API operation. +// +// 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 *ApplicationAutoScaling) PutScheduledActionWithContext(ctx aws.Context, input *PutScheduledActionInput, opts ...request.Option) (*PutScheduledActionOutput, error) { + req, out := c.PutScheduledActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRegisterScalableTarget = "RegisterScalableTarget" // RegisterScalableTargetRequest generates a "aws/request.Request" representing the @@ -1181,6 +1485,148 @@ func (s DeleteScalingPolicyOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledActionRequest +type DeleteScheduledActionInput struct { + _ struct{} `type:"structure"` + + // The identifier of the resource associated with the scheduled action. This + // string consists of the resource type and unique identifier. + // + // * ECS service - The resource type is service and the unique identifier + // is the cluster name and service name. Example: service/default/sample-webapp. + // + // * Spot fleet request - The resource type is spot-fleet-request and the + // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. + // + // * EMR cluster - The resource type is instancegroup and the unique identifier + // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. + // + // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier + // is the fleet name. Example: fleet/sample-fleet. + // + // * DynamoDB table - The resource type is table and the unique identifier + // is the resource ID. Example: table/my-table. + // + // * DynamoDB global secondary index - The resource type is index and the + // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. + // + // ResourceId is a required field + ResourceId *string `min:"1" type:"string" required:"true"` + + // The scalable dimension. This string consists of the service namespace, resource + // type, and scaling property. + // + // * ecs:service:DesiredCount - The desired task count of an ECS service. + // + // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot + // fleet request. + // + // * elasticmapreduce:instancegroup:InstanceCount - The instance count of + // an EMR Instance Group. + // + // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream + // 2.0 fleet. + // + // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for + // a DynamoDB table. + // + // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for + // a DynamoDB table. + // + // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for + // a DynamoDB global secondary index. + // + // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for + // a DynamoDB global secondary index. + ScalableDimension *string `type:"string" enum:"ScalableDimension"` + + // The name of the scheduled action. + // + // ScheduledActionName is a required field + ScheduledActionName *string `min:"1" type:"string" required:"true"` + + // The namespace of the AWS service. For more information, see AWS Service Namespaces + // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + // + // ServiceNamespace is a required field + ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` +} + +// String returns the string representation +func (s DeleteScheduledActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteScheduledActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteScheduledActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledActionInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + if s.ScheduledActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) + } + if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) + } + if s.ServiceNamespace == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *DeleteScheduledActionInput) SetResourceId(v string) *DeleteScheduledActionInput { + s.ResourceId = &v + return s +} + +// SetScalableDimension sets the ScalableDimension field's value. +func (s *DeleteScheduledActionInput) SetScalableDimension(v string) *DeleteScheduledActionInput { + s.ScalableDimension = &v + return s +} + +// SetScheduledActionName sets the ScheduledActionName field's value. +func (s *DeleteScheduledActionInput) SetScheduledActionName(v string) *DeleteScheduledActionInput { + s.ScheduledActionName = &v + return s +} + +// SetServiceNamespace sets the ServiceNamespace field's value. +func (s *DeleteScheduledActionInput) SetServiceNamespace(v string) *DeleteScheduledActionInput { + s.ServiceNamespace = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledActionResponse +type DeleteScheduledActionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteScheduledActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteScheduledActionOutput) GoString() string { + return s.String() +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeregisterScalableTargetRequest type DeregisterScalableTargetInput struct { _ struct{} `type:"structure"` @@ -1786,7 +2232,7 @@ type DescribeScalingPoliciesOutput struct { // there are no more results to return. NextToken *string `type:"string"` - // A list of scaling policy objects. + // Information about the scaling policies. ScalingPolicies []*ScalingPolicy `type:"list"` } @@ -1812,6 +2258,180 @@ func (s *DescribeScalingPoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) * return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActionsRequest +type DescribeScheduledActionsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of scalable target results. This value can be between + // 1 and 50. The default value is 50. + // + // If this parameter is used, the operation returns up to MaxResults results + // at a time, along with a NextToken value. To get the next set of results, + // include the NextToken value in a subsequent call. If this parameter is not + // used, the operation returns up to 50 results and a NextToken value, if applicable. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` + + // The identifier of the resource associated with the scheduled action. This + // string consists of the resource type and unique identifier. If you specify + // a scalable dimension, you must also specify a resource ID. + // + // * ECS service - The resource type is service and the unique identifier + // is the cluster name and service name. Example: service/default/sample-webapp. + // + // * Spot fleet request - The resource type is spot-fleet-request and the + // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. + // + // * EMR cluster - The resource type is instancegroup and the unique identifier + // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. + // + // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier + // is the fleet name. Example: fleet/sample-fleet. + // + // * DynamoDB table - The resource type is table and the unique identifier + // is the resource ID. Example: table/my-table. + // + // * DynamoDB global secondary index - The resource type is index and the + // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. + ResourceId *string `min:"1" type:"string"` + + // The scalable dimension. This string consists of the service namespace, resource + // type, and scaling property. If you specify a scalable dimension, you must + // also specify a resource ID. + // + // * ecs:service:DesiredCount - The desired task count of an ECS service. + // + // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot + // fleet request. + // + // * elasticmapreduce:instancegroup:InstanceCount - The instance count of + // an EMR Instance Group. + // + // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream + // 2.0 fleet. + // + // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for + // a DynamoDB table. + // + // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for + // a DynamoDB table. + // + // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for + // a DynamoDB global secondary index. + // + // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for + // a DynamoDB global secondary index. + ScalableDimension *string `type:"string" enum:"ScalableDimension"` + + // The names of the scheduled actions to describe. + ScheduledActionNames []*string `type:"list"` + + // The namespace of the AWS service. For more information, see AWS Service Namespaces + // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + // + // ServiceNamespace is a required field + ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` +} + +// String returns the string representation +func (s DescribeScheduledActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledActionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeScheduledActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledActionsInput"} + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + if s.ServiceNamespace == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeScheduledActionsInput) SetMaxResults(v int64) *DescribeScheduledActionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeScheduledActionsInput) SetNextToken(v string) *DescribeScheduledActionsInput { + s.NextToken = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *DescribeScheduledActionsInput) SetResourceId(v string) *DescribeScheduledActionsInput { + s.ResourceId = &v + return s +} + +// SetScalableDimension sets the ScalableDimension field's value. +func (s *DescribeScheduledActionsInput) SetScalableDimension(v string) *DescribeScheduledActionsInput { + s.ScalableDimension = &v + return s +} + +// SetScheduledActionNames sets the ScheduledActionNames field's value. +func (s *DescribeScheduledActionsInput) SetScheduledActionNames(v []*string) *DescribeScheduledActionsInput { + s.ScheduledActionNames = v + return s +} + +// SetServiceNamespace sets the ServiceNamespace field's value. +func (s *DescribeScheduledActionsInput) SetServiceNamespace(v string) *DescribeScheduledActionsInput { + s.ServiceNamespace = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActionsResponse +type DescribeScheduledActionsOutput struct { + _ struct{} `type:"structure"` + + // The token required to get the next set of results. This value is null if + // there are no more results to return. + NextToken *string `type:"string"` + + // Information about the scheduled actions. + ScheduledActions []*ScheduledAction `type:"list"` +} + +// String returns the string representation +func (s DescribeScheduledActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledActionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeScheduledActionsOutput) SetNextToken(v string) *DescribeScheduledActionsOutput { + s.NextToken = &v + return s +} + +// SetScheduledActions sets the ScheduledActions field's value. +func (s *DescribeScheduledActionsOutput) SetScheduledActions(v []*ScheduledAction) *DescribeScheduledActionsOutput { + s.ScheduledActions = v + return s +} + // Describes the dimension of a metric. // Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/MetricDimension type MetricDimension struct { @@ -2132,6 +2752,204 @@ func (s *PutScalingPolicyOutput) SetPolicyARN(v string) *PutScalingPolicyOutput return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledActionRequest +type PutScheduledActionInput struct { + _ struct{} `type:"structure"` + + // The date and time for the scheduled action to end. + EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The identifier of the resource associated with the scheduled action. This + // string consists of the resource type and unique identifier. + // + // * ECS service - The resource type is service and the unique identifier + // is the cluster name and service name. Example: service/default/sample-webapp. + // + // * Spot fleet request - The resource type is spot-fleet-request and the + // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. + // + // * EMR cluster - The resource type is instancegroup and the unique identifier + // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. + // + // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier + // is the fleet name. Example: fleet/sample-fleet. + // + // * DynamoDB table - The resource type is table and the unique identifier + // is the resource ID. Example: table/my-table. + // + // * DynamoDB global secondary index - The resource type is index and the + // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. + // + // ResourceId is a required field + ResourceId *string `min:"1" type:"string" required:"true"` + + // The scalable dimension. This string consists of the service namespace, resource + // type, and scaling property. + // + // * ecs:service:DesiredCount - The desired task count of an ECS service. + // + // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot + // fleet request. + // + // * elasticmapreduce:instancegroup:InstanceCount - The instance count of + // an EMR Instance Group. + // + // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream + // 2.0 fleet. + // + // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for + // a DynamoDB table. + // + // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for + // a DynamoDB table. + // + // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for + // a DynamoDB global secondary index. + // + // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for + // a DynamoDB global secondary index. + ScalableDimension *string `type:"string" enum:"ScalableDimension"` + + // The new minimum and maximum capacity. You can set both values or just one. + // During the scheduled time, if the current capacity is below the minimum capacity, + // Application Auto Scaling scales out to the minimum capacity. If the current + // capacity is above the maximum capacity, Application Auto Scaling scales in + // to the maximum capacity. + ScalableTargetAction *ScalableTargetAction `type:"structure"` + + // The schedule for this action. The following formats are supported: + // + // * At expressions - at(yyyy-mm-ddThh:mm:ss) + // + // * Rate expressions - rate(valueunit) + // + // * Cron expressions - cron(fields) + // + // At expressions are useful for one-time schedules. Specify the time, in UTC. + // + // For rate expressions, value is a positive integer and unit is minute | minutes + // | hour | hours | day | days. + // + // For more information about cron expressions, see Cron (https://en.wikipedia.org/wiki/Cron). + Schedule *string `min:"1" type:"string"` + + // The name of the scheduled action. + // + // ScheduledActionName is a required field + ScheduledActionName *string `min:"1" type:"string" required:"true"` + + // The namespace of the AWS service. For more information, see AWS Service Namespaces + // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + // + // ServiceNamespace is a required field + ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` + + // The date and time for the scheduled action to start. + StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s PutScheduledActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutScheduledActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutScheduledActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutScheduledActionInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + if s.Schedule != nil && len(*s.Schedule) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Schedule", 1)) + } + if s.ScheduledActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) + } + if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) + } + if s.ServiceNamespace == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *PutScheduledActionInput) SetEndTime(v time.Time) *PutScheduledActionInput { + s.EndTime = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *PutScheduledActionInput) SetResourceId(v string) *PutScheduledActionInput { + s.ResourceId = &v + return s +} + +// SetScalableDimension sets the ScalableDimension field's value. +func (s *PutScheduledActionInput) SetScalableDimension(v string) *PutScheduledActionInput { + s.ScalableDimension = &v + return s +} + +// SetScalableTargetAction sets the ScalableTargetAction field's value. +func (s *PutScheduledActionInput) SetScalableTargetAction(v *ScalableTargetAction) *PutScheduledActionInput { + s.ScalableTargetAction = v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *PutScheduledActionInput) SetSchedule(v string) *PutScheduledActionInput { + s.Schedule = &v + return s +} + +// SetScheduledActionName sets the ScheduledActionName field's value. +func (s *PutScheduledActionInput) SetScheduledActionName(v string) *PutScheduledActionInput { + s.ScheduledActionName = &v + return s +} + +// SetServiceNamespace sets the ServiceNamespace field's value. +func (s *PutScheduledActionInput) SetServiceNamespace(v string) *PutScheduledActionInput { + s.ServiceNamespace = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *PutScheduledActionInput) SetStartTime(v time.Time) *PutScheduledActionInput { + s.StartTime = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledActionResponse +type PutScheduledActionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutScheduledActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutScheduledActionOutput) GoString() string { + return s.String() +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/RegisterScalableTargetRequest type RegisterScalableTargetInput struct { _ struct{} `type:"structure"` @@ -2437,6 +3255,40 @@ func (s *ScalableTarget) SetServiceNamespace(v string) *ScalableTarget { return s } +// Represents the minimum and maximum capacity for a scheduled action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/ScalableTargetAction +type ScalableTargetAction struct { + _ struct{} `type:"structure"` + + // The maximum capacity. + MaxCapacity *int64 `type:"integer"` + + // The minimum capacity. + MinCapacity *int64 `type:"integer"` +} + +// String returns the string representation +func (s ScalableTargetAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScalableTargetAction) GoString() string { + return s.String() +} + +// SetMaxCapacity sets the MaxCapacity field's value. +func (s *ScalableTargetAction) SetMaxCapacity(v int64) *ScalableTargetAction { + s.MaxCapacity = &v + return s +} + +// SetMinCapacity sets the MinCapacity field's value. +func (s *ScalableTargetAction) SetMinCapacity(v int64) *ScalableTargetAction { + s.MinCapacity = &v + return s +} + // Represents a scaling activity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/ScalingActivity type ScalingActivity struct { @@ -2778,6 +3630,186 @@ func (s *ScalingPolicy) SetTargetTrackingScalingPolicyConfiguration(v *TargetTra return s } +// Represents a scheduled action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/ScheduledAction +type ScheduledAction struct { + _ struct{} `type:"structure"` + + // The date and time that the scheduled action was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + + // The date and time that the action is scheduled to end. + EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The identifier of the resource associated with the scaling policy. This string + // consists of the resource type and unique identifier. + // + // * ECS service - The resource type is service and the unique identifier + // is the cluster name and service name. Example: service/default/sample-webapp. + // + // * Spot fleet request - The resource type is spot-fleet-request and the + // unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. + // + // * EMR cluster - The resource type is instancegroup and the unique identifier + // is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0. + // + // * AppStream 2.0 fleet - The resource type is fleet and the unique identifier + // is the fleet name. Example: fleet/sample-fleet. + // + // * DynamoDB table - The resource type is table and the unique identifier + // is the resource ID. Example: table/my-table. + // + // * DynamoDB global secondary index - The resource type is index and the + // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. + // + // ResourceId is a required field + ResourceId *string `min:"1" type:"string" required:"true"` + + // The scalable dimension. This string consists of the service namespace, resource + // type, and scaling property. + // + // * ecs:service:DesiredCount - The desired task count of an ECS service. + // + // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot + // fleet request. + // + // * elasticmapreduce:instancegroup:InstanceCount - The instance count of + // an EMR Instance Group. + // + // * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream + // 2.0 fleet. + // + // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for + // a DynamoDB table. + // + // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for + // a DynamoDB table. + // + // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for + // a DynamoDB global secondary index. + // + // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for + // a DynamoDB global secondary index. + ScalableDimension *string `type:"string" enum:"ScalableDimension"` + + // The new minimum and maximum capacity. You can set both values or just one. + // During the scheduled time, if the current capacity is below the minimum capacity, + // Application Auto Scaling scales out to the minimum capacity. If the current + // capacity is above the maximum capacity, Application Auto Scaling scales in + // to the maximum capacity. + ScalableTargetAction *ScalableTargetAction `type:"structure"` + + // The schedule for this action. The following formats are supported: + // + // * At expressions - at(yyyy-mm-ddThh:mm:ss) + // + // * Rate expressions - rate(valueunit) + // + // * Cron expressions - cron(fields) + // + // At expressions are useful for one-time schedules. Specify the time, in UTC. + // + // For rate expressions, value is a positive integer and unit is minute | minutes + // | hour | hours | day | days. + // + // For more information about cron expressions, see Cron (https://en.wikipedia.org/wiki/Cron). + // + // Schedule is a required field + Schedule *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the scheduled action. + // + // ScheduledActionARN is a required field + ScheduledActionARN *string `min:"1" type:"string" required:"true"` + + // The name of the scheduled action. + // + // ScheduledActionName is a required field + ScheduledActionName *string `min:"1" type:"string" required:"true"` + + // The namespace of the AWS service. For more information, see AWS Service Namespaces + // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + // + // ServiceNamespace is a required field + ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` + + // The date and time that the action is scheduled to begin. + StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s ScheduledAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduledAction) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ScheduledAction) SetCreationTime(v time.Time) *ScheduledAction { + s.CreationTime = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *ScheduledAction) SetEndTime(v time.Time) *ScheduledAction { + s.EndTime = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *ScheduledAction) SetResourceId(v string) *ScheduledAction { + s.ResourceId = &v + return s +} + +// SetScalableDimension sets the ScalableDimension field's value. +func (s *ScheduledAction) SetScalableDimension(v string) *ScheduledAction { + s.ScalableDimension = &v + return s +} + +// SetScalableTargetAction sets the ScalableTargetAction field's value. +func (s *ScheduledAction) SetScalableTargetAction(v *ScalableTargetAction) *ScheduledAction { + s.ScalableTargetAction = v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *ScheduledAction) SetSchedule(v string) *ScheduledAction { + s.Schedule = &v + return s +} + +// SetScheduledActionARN sets the ScheduledActionARN field's value. +func (s *ScheduledAction) SetScheduledActionARN(v string) *ScheduledAction { + s.ScheduledActionARN = &v + return s +} + +// SetScheduledActionName sets the ScheduledActionName field's value. +func (s *ScheduledAction) SetScheduledActionName(v string) *ScheduledAction { + s.ScheduledActionName = &v + return s +} + +// SetServiceNamespace sets the ServiceNamespace field's value. +func (s *ScheduledAction) SetServiceNamespace(v string) *ScheduledAction { + s.ServiceNamespace = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *ScheduledAction) SetStartTime(v time.Time) *ScheduledAction { + s.StartTime = &v + return s +} + // Represents a step adjustment for a StepScalingPolicyConfiguration. Describes // an adjustment based on the difference between the value of the aggregated // CloudWatch metric and the breach threshold that you've defined for the alarm. @@ -2990,6 +4022,11 @@ type TargetTrackingScalingPolicyConfiguration struct { // Reserved for future use. CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"` + // Indicates whether scale in by the target tracking policy is disabled. If + // the value is true, scale in is disabled and the target tracking policy won't + // remove capacity from the scalable resource. Otherwise, scale in is enabled + // and the target tracking policy can remove capacity from the scalable resource. + // The default value is false. DisableScaleIn *bool `type:"boolean"` // A predefined metric. diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go index 77bf3b786..55dd3a254 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go @@ -4,7 +4,7 @@ // 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/). +// The experience is 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 @@ -32,8 +32,8 @@ // in the Amazon AppStream 2.0 Developer Guide. // // * Provisioned read and write capacity for Amazon DynamoDB tables and global -// secondary indexes. For more information, see Auto Scaling for DynamoDB -// (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TargetTracking.html) +// secondary indexes. For more information, see Managing Throughput Capacity +// Automatically with DynamoDB Auto Scaling (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html) // in the Amazon DynamoDB Developer Guide. // // For a list of supported regions, see AWS Regions and Endpoints: Application @@ -47,7 +47,7 @@ // // Using the Client // -// To Application Auto Scaling with the SDK use the New function to create +// To contact Application Auto Scaling with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go new file mode 100644 index 000000000..89dd50c12 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go @@ -0,0 +1,2738 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package athena + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opBatchGetNamedQuery = "BatchGetNamedQuery" + +// BatchGetNamedQueryRequest generates a "aws/request.Request" representing the +// client's request for the BatchGetNamedQuery operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchGetNamedQuery for more information on using the BatchGetNamedQuery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchGetNamedQueryRequest method. +// req, resp := client.BatchGetNamedQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery +func (c *Athena) BatchGetNamedQueryRequest(input *BatchGetNamedQueryInput) (req *request.Request, output *BatchGetNamedQueryOutput) { + op := &request.Operation{ + Name: opBatchGetNamedQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchGetNamedQueryInput{} + } + + output = &BatchGetNamedQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchGetNamedQuery API operation for Amazon Athena. +// +// Returns the details of a single named query or a list of up to 50 queries, +// which you provide as an array of query ID strings. Use ListNamedQueries to +// get the list of named query IDs. If information could not be retrieved for +// a submitted query ID, information about the query ID submitted is listed +// under UnprocessedNamedQueryId. Named queries are different from executed +// queries. Use BatchGetQueryExecution to get details about each unique query +// execution, and ListQueryExecutions to get a list of query execution IDs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation BatchGetNamedQuery for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery +func (c *Athena) BatchGetNamedQuery(input *BatchGetNamedQueryInput) (*BatchGetNamedQueryOutput, error) { + req, out := c.BatchGetNamedQueryRequest(input) + return out, req.Send() +} + +// BatchGetNamedQueryWithContext is the same as BatchGetNamedQuery with the addition of +// the ability to pass a context and additional request options. +// +// See BatchGetNamedQuery for details on how to use this API operation. +// +// 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 *Athena) BatchGetNamedQueryWithContext(ctx aws.Context, input *BatchGetNamedQueryInput, opts ...request.Option) (*BatchGetNamedQueryOutput, error) { + req, out := c.BatchGetNamedQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opBatchGetQueryExecution = "BatchGetQueryExecution" + +// BatchGetQueryExecutionRequest generates a "aws/request.Request" representing the +// client's request for the BatchGetQueryExecution operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchGetQueryExecution for more information on using the BatchGetQueryExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchGetQueryExecutionRequest method. +// req, resp := client.BatchGetQueryExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution +func (c *Athena) BatchGetQueryExecutionRequest(input *BatchGetQueryExecutionInput) (req *request.Request, output *BatchGetQueryExecutionOutput) { + op := &request.Operation{ + Name: opBatchGetQueryExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchGetQueryExecutionInput{} + } + + output = &BatchGetQueryExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchGetQueryExecution API operation for Amazon Athena. +// +// Returns the details of a single query execution or a list of up to 50 query +// executions, which you provide as an array of query execution ID strings. +// To get a list of query execution IDs, use ListQueryExecutions. Query executions +// are different from named (saved) queries. Use BatchGetNamedQuery to get details +// about named queries. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation BatchGetQueryExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution +func (c *Athena) BatchGetQueryExecution(input *BatchGetQueryExecutionInput) (*BatchGetQueryExecutionOutput, error) { + req, out := c.BatchGetQueryExecutionRequest(input) + return out, req.Send() +} + +// BatchGetQueryExecutionWithContext is the same as BatchGetQueryExecution with the addition of +// the ability to pass a context and additional request options. +// +// See BatchGetQueryExecution for details on how to use this API operation. +// +// 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 *Athena) BatchGetQueryExecutionWithContext(ctx aws.Context, input *BatchGetQueryExecutionInput, opts ...request.Option) (*BatchGetQueryExecutionOutput, error) { + req, out := c.BatchGetQueryExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateNamedQuery = "CreateNamedQuery" + +// CreateNamedQueryRequest generates a "aws/request.Request" representing the +// client's request for the CreateNamedQuery operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateNamedQuery for more information on using the CreateNamedQuery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateNamedQueryRequest method. +// req, resp := client.CreateNamedQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery +func (c *Athena) CreateNamedQueryRequest(input *CreateNamedQueryInput) (req *request.Request, output *CreateNamedQueryOutput) { + op := &request.Operation{ + Name: opCreateNamedQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateNamedQueryInput{} + } + + output = &CreateNamedQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateNamedQuery API operation for Amazon Athena. +// +// Creates a named query. +// +// For code samples using the AWS SDK for Java, see Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation CreateNamedQuery for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery +func (c *Athena) CreateNamedQuery(input *CreateNamedQueryInput) (*CreateNamedQueryOutput, error) { + req, out := c.CreateNamedQueryRequest(input) + return out, req.Send() +} + +// CreateNamedQueryWithContext is the same as CreateNamedQuery with the addition of +// the ability to pass a context and additional request options. +// +// See CreateNamedQuery for details on how to use this API operation. +// +// 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 *Athena) CreateNamedQueryWithContext(ctx aws.Context, input *CreateNamedQueryInput, opts ...request.Option) (*CreateNamedQueryOutput, error) { + req, out := c.CreateNamedQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteNamedQuery = "DeleteNamedQuery" + +// DeleteNamedQueryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteNamedQuery operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteNamedQuery for more information on using the DeleteNamedQuery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteNamedQueryRequest method. +// req, resp := client.DeleteNamedQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery +func (c *Athena) DeleteNamedQueryRequest(input *DeleteNamedQueryInput) (req *request.Request, output *DeleteNamedQueryOutput) { + op := &request.Operation{ + Name: opDeleteNamedQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteNamedQueryInput{} + } + + output = &DeleteNamedQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteNamedQuery API operation for Amazon Athena. +// +// Deletes a named query. +// +// For code samples using the AWS SDK for Java, see Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation DeleteNamedQuery for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery +func (c *Athena) DeleteNamedQuery(input *DeleteNamedQueryInput) (*DeleteNamedQueryOutput, error) { + req, out := c.DeleteNamedQueryRequest(input) + return out, req.Send() +} + +// DeleteNamedQueryWithContext is the same as DeleteNamedQuery with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteNamedQuery for details on how to use this API operation. +// +// 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 *Athena) DeleteNamedQueryWithContext(ctx aws.Context, input *DeleteNamedQueryInput, opts ...request.Option) (*DeleteNamedQueryOutput, error) { + req, out := c.DeleteNamedQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetNamedQuery = "GetNamedQuery" + +// GetNamedQueryRequest generates a "aws/request.Request" representing the +// client's request for the GetNamedQuery operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetNamedQuery for more information on using the GetNamedQuery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetNamedQueryRequest method. +// req, resp := client.GetNamedQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery +func (c *Athena) GetNamedQueryRequest(input *GetNamedQueryInput) (req *request.Request, output *GetNamedQueryOutput) { + op := &request.Operation{ + Name: opGetNamedQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetNamedQueryInput{} + } + + output = &GetNamedQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetNamedQuery API operation for Amazon Athena. +// +// Returns information about a single query. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation GetNamedQuery for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery +func (c *Athena) GetNamedQuery(input *GetNamedQueryInput) (*GetNamedQueryOutput, error) { + req, out := c.GetNamedQueryRequest(input) + return out, req.Send() +} + +// GetNamedQueryWithContext is the same as GetNamedQuery with the addition of +// the ability to pass a context and additional request options. +// +// See GetNamedQuery for details on how to use this API operation. +// +// 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 *Athena) GetNamedQueryWithContext(ctx aws.Context, input *GetNamedQueryInput, opts ...request.Option) (*GetNamedQueryOutput, error) { + req, out := c.GetNamedQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetQueryExecution = "GetQueryExecution" + +// GetQueryExecutionRequest generates a "aws/request.Request" representing the +// client's request for the GetQueryExecution operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetQueryExecution for more information on using the GetQueryExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetQueryExecutionRequest method. +// req, resp := client.GetQueryExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution +func (c *Athena) GetQueryExecutionRequest(input *GetQueryExecutionInput) (req *request.Request, output *GetQueryExecutionOutput) { + op := &request.Operation{ + Name: opGetQueryExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetQueryExecutionInput{} + } + + output = &GetQueryExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetQueryExecution API operation for Amazon Athena. +// +// Returns information about a single execution of a query. Each time a query +// executes, information about the query execution is saved with a unique ID. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation GetQueryExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution +func (c *Athena) GetQueryExecution(input *GetQueryExecutionInput) (*GetQueryExecutionOutput, error) { + req, out := c.GetQueryExecutionRequest(input) + return out, req.Send() +} + +// GetQueryExecutionWithContext is the same as GetQueryExecution with the addition of +// the ability to pass a context and additional request options. +// +// See GetQueryExecution for details on how to use this API operation. +// +// 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 *Athena) GetQueryExecutionWithContext(ctx aws.Context, input *GetQueryExecutionInput, opts ...request.Option) (*GetQueryExecutionOutput, error) { + req, out := c.GetQueryExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetQueryResults = "GetQueryResults" + +// GetQueryResultsRequest generates a "aws/request.Request" representing the +// client's request for the GetQueryResults operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetQueryResults for more information on using the GetQueryResults +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetQueryResultsRequest method. +// req, resp := client.GetQueryResultsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults +func (c *Athena) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { + op := &request.Operation{ + Name: opGetQueryResults, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetQueryResultsInput{} + } + + output = &GetQueryResultsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetQueryResults API operation for Amazon Athena. +// +// Returns the results of a single query execution specified by QueryExecutionId. +// This request does not execute the query but returns results. Use StartQueryExecution +// to run a query. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation GetQueryResults for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults +func (c *Athena) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { + req, out := c.GetQueryResultsRequest(input) + return out, req.Send() +} + +// GetQueryResultsWithContext is the same as GetQueryResults with the addition of +// the ability to pass a context and additional request options. +// +// See GetQueryResults for details on how to use this API operation. +// +// 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 *Athena) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { + req, out := c.GetQueryResultsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetQueryResultsPages iterates over the pages of a GetQueryResults operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetQueryResults method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetQueryResults operation. +// pageNum := 0 +// err := client.GetQueryResultsPages(params, +// func(page *GetQueryResultsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Athena) GetQueryResultsPages(input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool) error { + return c.GetQueryResultsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetQueryResultsPagesWithContext same as GetQueryResultsPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *Athena) GetQueryResultsPagesWithContext(ctx aws.Context, input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetQueryResultsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetQueryResultsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetQueryResultsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListNamedQueries = "ListNamedQueries" + +// ListNamedQueriesRequest generates a "aws/request.Request" representing the +// client's request for the ListNamedQueries operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListNamedQueries for more information on using the ListNamedQueries +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListNamedQueriesRequest method. +// req, resp := client.ListNamedQueriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries +func (c *Athena) ListNamedQueriesRequest(input *ListNamedQueriesInput) (req *request.Request, output *ListNamedQueriesOutput) { + op := &request.Operation{ + Name: opListNamedQueries, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListNamedQueriesInput{} + } + + output = &ListNamedQueriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListNamedQueries API operation for Amazon Athena. +// +// Provides a list of all available query IDs. +// +// For code samples using the AWS SDK for Java, see Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation ListNamedQueries for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries +func (c *Athena) ListNamedQueries(input *ListNamedQueriesInput) (*ListNamedQueriesOutput, error) { + req, out := c.ListNamedQueriesRequest(input) + return out, req.Send() +} + +// ListNamedQueriesWithContext is the same as ListNamedQueries with the addition of +// the ability to pass a context and additional request options. +// +// See ListNamedQueries for details on how to use this API operation. +// +// 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 *Athena) ListNamedQueriesWithContext(ctx aws.Context, input *ListNamedQueriesInput, opts ...request.Option) (*ListNamedQueriesOutput, error) { + req, out := c.ListNamedQueriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListNamedQueriesPages iterates over the pages of a ListNamedQueries operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListNamedQueries method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListNamedQueries operation. +// pageNum := 0 +// err := client.ListNamedQueriesPages(params, +// func(page *ListNamedQueriesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Athena) ListNamedQueriesPages(input *ListNamedQueriesInput, fn func(*ListNamedQueriesOutput, bool) bool) error { + return c.ListNamedQueriesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListNamedQueriesPagesWithContext same as ListNamedQueriesPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *Athena) ListNamedQueriesPagesWithContext(ctx aws.Context, input *ListNamedQueriesInput, fn func(*ListNamedQueriesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListNamedQueriesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListNamedQueriesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListNamedQueriesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListQueryExecutions = "ListQueryExecutions" + +// ListQueryExecutionsRequest generates a "aws/request.Request" representing the +// client's request for the ListQueryExecutions operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListQueryExecutions for more information on using the ListQueryExecutions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListQueryExecutionsRequest method. +// req, resp := client.ListQueryExecutionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions +func (c *Athena) ListQueryExecutionsRequest(input *ListQueryExecutionsInput) (req *request.Request, output *ListQueryExecutionsOutput) { + op := &request.Operation{ + Name: opListQueryExecutions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListQueryExecutionsInput{} + } + + output = &ListQueryExecutionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListQueryExecutions API operation for Amazon Athena. +// +// Provides a list of all available query execution IDs. +// +// For code samples using the AWS SDK for Java, see Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation ListQueryExecutions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions +func (c *Athena) ListQueryExecutions(input *ListQueryExecutionsInput) (*ListQueryExecutionsOutput, error) { + req, out := c.ListQueryExecutionsRequest(input) + return out, req.Send() +} + +// ListQueryExecutionsWithContext is the same as ListQueryExecutions with the addition of +// the ability to pass a context and additional request options. +// +// See ListQueryExecutions for details on how to use this API operation. +// +// 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 *Athena) ListQueryExecutionsWithContext(ctx aws.Context, input *ListQueryExecutionsInput, opts ...request.Option) (*ListQueryExecutionsOutput, error) { + req, out := c.ListQueryExecutionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListQueryExecutionsPages iterates over the pages of a ListQueryExecutions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListQueryExecutions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListQueryExecutions operation. +// pageNum := 0 +// err := client.ListQueryExecutionsPages(params, +// func(page *ListQueryExecutionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Athena) ListQueryExecutionsPages(input *ListQueryExecutionsInput, fn func(*ListQueryExecutionsOutput, bool) bool) error { + return c.ListQueryExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListQueryExecutionsPagesWithContext same as ListQueryExecutionsPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *Athena) ListQueryExecutionsPagesWithContext(ctx aws.Context, input *ListQueryExecutionsInput, fn func(*ListQueryExecutionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListQueryExecutionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListQueryExecutionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListQueryExecutionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opStartQueryExecution = "StartQueryExecution" + +// StartQueryExecutionRequest generates a "aws/request.Request" representing the +// client's request for the StartQueryExecution operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartQueryExecution for more information on using the StartQueryExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartQueryExecutionRequest method. +// req, resp := client.StartQueryExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution +func (c *Athena) StartQueryExecutionRequest(input *StartQueryExecutionInput) (req *request.Request, output *StartQueryExecutionOutput) { + op := &request.Operation{ + Name: opStartQueryExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartQueryExecutionInput{} + } + + output = &StartQueryExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartQueryExecution API operation for Amazon Athena. +// +// Runs (executes) the SQL query statements contained in the Query string. +// +// For code samples using the AWS SDK for Java, see Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation StartQueryExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Indicates that the request was throttled. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution +func (c *Athena) StartQueryExecution(input *StartQueryExecutionInput) (*StartQueryExecutionOutput, error) { + req, out := c.StartQueryExecutionRequest(input) + return out, req.Send() +} + +// StartQueryExecutionWithContext is the same as StartQueryExecution with the addition of +// the ability to pass a context and additional request options. +// +// See StartQueryExecution for details on how to use this API operation. +// +// 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 *Athena) StartQueryExecutionWithContext(ctx aws.Context, input *StartQueryExecutionInput, opts ...request.Option) (*StartQueryExecutionOutput, error) { + req, out := c.StartQueryExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopQueryExecution = "StopQueryExecution" + +// StopQueryExecutionRequest generates a "aws/request.Request" representing the +// client's request for the StopQueryExecution operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopQueryExecution for more information on using the StopQueryExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopQueryExecutionRequest method. +// req, resp := client.StopQueryExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution +func (c *Athena) StopQueryExecutionRequest(input *StopQueryExecutionInput) (req *request.Request, output *StopQueryExecutionOutput) { + op := &request.Operation{ + Name: opStopQueryExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopQueryExecutionInput{} + } + + output = &StopQueryExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopQueryExecution API operation for Amazon Athena. +// +// Stops a query execution. +// +// For code samples using the AWS SDK for Java, see Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Athena's +// API operation StopQueryExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerException "InternalServerException" +// Indicates a platform issue, which may be due to a transient condition or +// outage. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a required parameter may be missing or out of range. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution +func (c *Athena) StopQueryExecution(input *StopQueryExecutionInput) (*StopQueryExecutionOutput, error) { + req, out := c.StopQueryExecutionRequest(input) + return out, req.Send() +} + +// StopQueryExecutionWithContext is the same as StopQueryExecution with the addition of +// the ability to pass a context and additional request options. +// +// See StopQueryExecution for details on how to use this API operation. +// +// 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 *Athena) StopQueryExecutionWithContext(ctx aws.Context, input *StopQueryExecutionInput, opts ...request.Option) (*StopQueryExecutionOutput, error) { + req, out := c.StopQueryExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQueryInput +type BatchGetNamedQueryInput struct { + _ struct{} `type:"structure"` + + // An array of query IDs. + // + // NamedQueryIds is a required field + NamedQueryIds []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchGetNamedQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetNamedQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetNamedQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetNamedQueryInput"} + if s.NamedQueryIds == nil { + invalidParams.Add(request.NewErrParamRequired("NamedQueryIds")) + } + if s.NamedQueryIds != nil && len(s.NamedQueryIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamedQueryIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNamedQueryIds sets the NamedQueryIds field's value. +func (s *BatchGetNamedQueryInput) SetNamedQueryIds(v []*string) *BatchGetNamedQueryInput { + s.NamedQueryIds = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQueryOutput +type BatchGetNamedQueryOutput struct { + _ struct{} `type:"structure"` + + // Information about the named query IDs submitted. + NamedQueries []*NamedQuery `type:"list"` + + // Information about provided query IDs. + UnprocessedNamedQueryIds []*UnprocessedNamedQueryId `type:"list"` +} + +// String returns the string representation +func (s BatchGetNamedQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetNamedQueryOutput) GoString() string { + return s.String() +} + +// SetNamedQueries sets the NamedQueries field's value. +func (s *BatchGetNamedQueryOutput) SetNamedQueries(v []*NamedQuery) *BatchGetNamedQueryOutput { + s.NamedQueries = v + return s +} + +// SetUnprocessedNamedQueryIds sets the UnprocessedNamedQueryIds field's value. +func (s *BatchGetNamedQueryOutput) SetUnprocessedNamedQueryIds(v []*UnprocessedNamedQueryId) *BatchGetNamedQueryOutput { + s.UnprocessedNamedQueryIds = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecutionInput +type BatchGetQueryExecutionInput struct { + _ struct{} `type:"structure"` + + // An array of query execution IDs. + // + // QueryExecutionIds is a required field + QueryExecutionIds []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchGetQueryExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetQueryExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetQueryExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetQueryExecutionInput"} + if s.QueryExecutionIds == nil { + invalidParams.Add(request.NewErrParamRequired("QueryExecutionIds")) + } + if s.QueryExecutionIds != nil && len(s.QueryExecutionIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryExecutionIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueryExecutionIds sets the QueryExecutionIds field's value. +func (s *BatchGetQueryExecutionInput) SetQueryExecutionIds(v []*string) *BatchGetQueryExecutionInput { + s.QueryExecutionIds = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecutionOutput +type BatchGetQueryExecutionOutput struct { + _ struct{} `type:"structure"` + + // Information about a query execution. + QueryExecutions []*QueryExecution `type:"list"` + + // Information about the query executions that failed to run. + UnprocessedQueryExecutionIds []*UnprocessedQueryExecutionId `type:"list"` +} + +// String returns the string representation +func (s BatchGetQueryExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetQueryExecutionOutput) GoString() string { + return s.String() +} + +// SetQueryExecutions sets the QueryExecutions field's value. +func (s *BatchGetQueryExecutionOutput) SetQueryExecutions(v []*QueryExecution) *BatchGetQueryExecutionOutput { + s.QueryExecutions = v + return s +} + +// SetUnprocessedQueryExecutionIds sets the UnprocessedQueryExecutionIds field's value. +func (s *BatchGetQueryExecutionOutput) SetUnprocessedQueryExecutionIds(v []*UnprocessedQueryExecutionId) *BatchGetQueryExecutionOutput { + s.UnprocessedQueryExecutionIds = v + return s +} + +// Information about the columns in a query execution result. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ColumnInfo +type ColumnInfo struct { + _ struct{} `type:"structure"` + + // Indicates whether values in the column are case-sensitive. + CaseSensitive *bool `type:"boolean"` + + // The catalog to which the query results belong. + CatalogName *string `type:"string"` + + // A column label. + Label *string `type:"string"` + + // The name of the column. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // Indicates the column's nullable status. + Nullable *string `type:"string" enum:"ColumnNullable"` + + // For DECIMAL data types, specifies the total number of digits, up to 38. For + // performance reasons, we recommend up to 18 digits. + Precision *int64 `type:"integer"` + + // For DECIMAL data types, specifies the total number of digits in the fractional + // part of the value. Defaults to 0. + Scale *int64 `type:"integer"` + + // The schema name (database name) to which the query results belong. + SchemaName *string `type:"string"` + + // The table name for the query results. + TableName *string `type:"string"` + + // The data type of the column. + // + // Type is a required field + Type *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ColumnInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ColumnInfo) GoString() string { + return s.String() +} + +// SetCaseSensitive sets the CaseSensitive field's value. +func (s *ColumnInfo) SetCaseSensitive(v bool) *ColumnInfo { + s.CaseSensitive = &v + return s +} + +// SetCatalogName sets the CatalogName field's value. +func (s *ColumnInfo) SetCatalogName(v string) *ColumnInfo { + s.CatalogName = &v + return s +} + +// SetLabel sets the Label field's value. +func (s *ColumnInfo) SetLabel(v string) *ColumnInfo { + s.Label = &v + return s +} + +// SetName sets the Name field's value. +func (s *ColumnInfo) SetName(v string) *ColumnInfo { + s.Name = &v + return s +} + +// SetNullable sets the Nullable field's value. +func (s *ColumnInfo) SetNullable(v string) *ColumnInfo { + s.Nullable = &v + return s +} + +// SetPrecision sets the Precision field's value. +func (s *ColumnInfo) SetPrecision(v int64) *ColumnInfo { + s.Precision = &v + return s +} + +// SetScale sets the Scale field's value. +func (s *ColumnInfo) SetScale(v int64) *ColumnInfo { + s.Scale = &v + return s +} + +// SetSchemaName sets the SchemaName field's value. +func (s *ColumnInfo) SetSchemaName(v string) *ColumnInfo { + s.SchemaName = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *ColumnInfo) SetTableName(v string) *ColumnInfo { + s.TableName = &v + return s +} + +// SetType sets the Type field's value. +func (s *ColumnInfo) SetType(v string) *ColumnInfo { + s.Type = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQueryInput +type CreateNamedQueryInput struct { + _ struct{} `type:"structure"` + + // A unique case-sensitive string used to ensure the request to create the query + // is idempotent (executes only once). If another CreateNamedQuery request is + // received, the same response is returned and another query is not created. + // If a parameter has changed, for example, the QueryString, an error is returned. + // + // This token is listed as not required because AWS SDKs (for example the AWS + // SDK for Java) auto-generate the token for users. If you are not using the + // AWS SDK or the AWS CLI, you must provide this token or the action will fail. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // The database to which the query belongs. + // + // Database is a required field + Database *string `min:"1" type:"string" required:"true"` + + // A brief explanation of the query. + Description *string `min:"1" type:"string"` + + // The plain language name for the query. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The text of the query itself. In other words, all query statements. + // + // QueryString is a required field + QueryString *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateNamedQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNamedQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNamedQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNamedQueryInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.Database == nil { + invalidParams.Add(request.NewErrParamRequired("Database")) + } + if s.Database != nil && len(*s.Database) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Database", 1)) + } + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.QueryString == nil { + invalidParams.Add(request.NewErrParamRequired("QueryString")) + } + if s.QueryString != nil && len(*s.QueryString) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateNamedQueryInput) SetClientRequestToken(v string) *CreateNamedQueryInput { + s.ClientRequestToken = &v + return s +} + +// SetDatabase sets the Database field's value. +func (s *CreateNamedQueryInput) SetDatabase(v string) *CreateNamedQueryInput { + s.Database = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateNamedQueryInput) SetDescription(v string) *CreateNamedQueryInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateNamedQueryInput) SetName(v string) *CreateNamedQueryInput { + s.Name = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *CreateNamedQueryInput) SetQueryString(v string) *CreateNamedQueryInput { + s.QueryString = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQueryOutput +type CreateNamedQueryOutput struct { + _ struct{} `type:"structure"` + + // The unique ID of the query. + NamedQueryId *string `type:"string"` +} + +// String returns the string representation +func (s CreateNamedQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNamedQueryOutput) GoString() string { + return s.String() +} + +// SetNamedQueryId sets the NamedQueryId field's value. +func (s *CreateNamedQueryOutput) SetNamedQueryId(v string) *CreateNamedQueryOutput { + s.NamedQueryId = &v + return s +} + +// A piece of data (a field in the table). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/Datum +type Datum struct { + _ struct{} `type:"structure"` + + // The value of the datum. + VarCharValue *string `type:"string"` +} + +// String returns the string representation +func (s Datum) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Datum) GoString() string { + return s.String() +} + +// SetVarCharValue sets the VarCharValue field's value. +func (s *Datum) SetVarCharValue(v string) *Datum { + s.VarCharValue = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQueryInput +type DeleteNamedQueryInput struct { + _ struct{} `type:"structure"` + + // The unique ID of the query to delete. + // + // NamedQueryId is a required field + NamedQueryId *string `type:"string" required:"true" idempotencyToken:"true"` +} + +// String returns the string representation +func (s DeleteNamedQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNamedQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNamedQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNamedQueryInput"} + if s.NamedQueryId == nil { + invalidParams.Add(request.NewErrParamRequired("NamedQueryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNamedQueryId sets the NamedQueryId field's value. +func (s *DeleteNamedQueryInput) SetNamedQueryId(v string) *DeleteNamedQueryInput { + s.NamedQueryId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQueryOutput +type DeleteNamedQueryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteNamedQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNamedQueryOutput) GoString() string { + return s.String() +} + +// If query results are encrypted in Amazon S3, indicates the Amazon S3 encryption +// option used. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/EncryptionConfiguration +type EncryptionConfiguration struct { + _ struct{} `type:"structure"` + + // Indicates whether Amazon S3 server-side encryption with Amazon S3-managed + // keys (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or + // client-side encryption with KMS-managed keys (CSE-KMS) is used. + // + // EncryptionOption is a required field + EncryptionOption *string `type:"string" required:"true" enum:"EncryptionOption"` + + // For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID. + KmsKey *string `type:"string"` +} + +// String returns the string representation +func (s EncryptionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EncryptionConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EncryptionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptionConfiguration"} + if s.EncryptionOption == nil { + invalidParams.Add(request.NewErrParamRequired("EncryptionOption")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryptionOption sets the EncryptionOption field's value. +func (s *EncryptionConfiguration) SetEncryptionOption(v string) *EncryptionConfiguration { + s.EncryptionOption = &v + return s +} + +// SetKmsKey sets the KmsKey field's value. +func (s *EncryptionConfiguration) SetKmsKey(v string) *EncryptionConfiguration { + s.KmsKey = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQueryInput +type GetNamedQueryInput struct { + _ struct{} `type:"structure"` + + // The unique ID of the query. Use ListNamedQueries to get query IDs. + // + // NamedQueryId is a required field + NamedQueryId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetNamedQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetNamedQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetNamedQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetNamedQueryInput"} + if s.NamedQueryId == nil { + invalidParams.Add(request.NewErrParamRequired("NamedQueryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNamedQueryId sets the NamedQueryId field's value. +func (s *GetNamedQueryInput) SetNamedQueryId(v string) *GetNamedQueryInput { + s.NamedQueryId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQueryOutput +type GetNamedQueryOutput struct { + _ struct{} `type:"structure"` + + // Information about the query. + NamedQuery *NamedQuery `type:"structure"` +} + +// String returns the string representation +func (s GetNamedQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetNamedQueryOutput) GoString() string { + return s.String() +} + +// SetNamedQuery sets the NamedQuery field's value. +func (s *GetNamedQueryOutput) SetNamedQuery(v *NamedQuery) *GetNamedQueryOutput { + s.NamedQuery = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecutionInput +type GetQueryExecutionInput struct { + _ struct{} `type:"structure"` + + // The unique ID of the query execution. + // + // QueryExecutionId is a required field + QueryExecutionId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetQueryExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueryExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetQueryExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetQueryExecutionInput"} + if s.QueryExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueryExecutionId sets the QueryExecutionId field's value. +func (s *GetQueryExecutionInput) SetQueryExecutionId(v string) *GetQueryExecutionInput { + s.QueryExecutionId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecutionOutput +type GetQueryExecutionOutput struct { + _ struct{} `type:"structure"` + + // Information about the query execution. + QueryExecution *QueryExecution `type:"structure"` +} + +// String returns the string representation +func (s GetQueryExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueryExecutionOutput) GoString() string { + return s.String() +} + +// SetQueryExecution sets the QueryExecution field's value. +func (s *GetQueryExecutionOutput) SetQueryExecution(v *QueryExecution) *GetQueryExecutionOutput { + s.QueryExecution = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResultsInput +type GetQueryResultsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results (rows) to return in this request. + MaxResults *int64 `type:"integer"` + + // The token that specifies where to start pagination if a previous request + // was truncated. + NextToken *string `type:"string"` + + // The unique ID of the query execution. + // + // QueryExecutionId is a required field + QueryExecutionId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetQueryResultsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueryResultsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetQueryResultsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"} + if s.QueryExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetQueryResultsInput) SetMaxResults(v int64) *GetQueryResultsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetQueryResultsInput) SetNextToken(v string) *GetQueryResultsInput { + s.NextToken = &v + return s +} + +// SetQueryExecutionId sets the QueryExecutionId field's value. +func (s *GetQueryResultsInput) SetQueryExecutionId(v string) *GetQueryResultsInput { + s.QueryExecutionId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResultsOutput +type GetQueryResultsOutput struct { + _ struct{} `type:"structure"` + + // A token to be used by the next request if this request is truncated. + NextToken *string `type:"string"` + + // The results of the query execution. + ResultSet *ResultSet `type:"structure"` +} + +// String returns the string representation +func (s GetQueryResultsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueryResultsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetQueryResultsOutput) SetNextToken(v string) *GetQueryResultsOutput { + s.NextToken = &v + return s +} + +// SetResultSet sets the ResultSet field's value. +func (s *GetQueryResultsOutput) SetResultSet(v *ResultSet) *GetQueryResultsOutput { + s.ResultSet = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueriesInput +type ListNamedQueriesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of queries to return in this request. + MaxResults *int64 `type:"integer"` + + // The token that specifies where to start pagination if a previous request + // was truncated. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListNamedQueriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListNamedQueriesInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListNamedQueriesInput) SetMaxResults(v int64) *ListNamedQueriesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListNamedQueriesInput) SetNextToken(v string) *ListNamedQueriesInput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueriesOutput +type ListNamedQueriesOutput struct { + _ struct{} `type:"structure"` + + // The list of unique query IDs. + NamedQueryIds []*string `min:"1" type:"list"` + + // A token to be used by the next request if this request is truncated. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListNamedQueriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListNamedQueriesOutput) GoString() string { + return s.String() +} + +// SetNamedQueryIds sets the NamedQueryIds field's value. +func (s *ListNamedQueriesOutput) SetNamedQueryIds(v []*string) *ListNamedQueriesOutput { + s.NamedQueryIds = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListNamedQueriesOutput) SetNextToken(v string) *ListNamedQueriesOutput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutionsInput +type ListQueryExecutionsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of query executions to return in this request. + MaxResults *int64 `type:"integer"` + + // The token that specifies where to start pagination if a previous request + // was truncated. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListQueryExecutionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListQueryExecutionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListQueryExecutionsInput) SetMaxResults(v int64) *ListQueryExecutionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListQueryExecutionsInput) SetNextToken(v string) *ListQueryExecutionsInput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutionsOutput +type ListQueryExecutionsOutput struct { + _ struct{} `type:"structure"` + + // A token to be used by the next request if this request is truncated. + NextToken *string `type:"string"` + + // The unique IDs of each query execution as an array of strings. + QueryExecutionIds []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s ListQueryExecutionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListQueryExecutionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListQueryExecutionsOutput) SetNextToken(v string) *ListQueryExecutionsOutput { + s.NextToken = &v + return s +} + +// SetQueryExecutionIds sets the QueryExecutionIds field's value. +func (s *ListQueryExecutionsOutput) SetQueryExecutionIds(v []*string) *ListQueryExecutionsOutput { + s.QueryExecutionIds = v + return s +} + +// A query, where QueryString is the SQL query statements that comprise the +// query. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/NamedQuery +type NamedQuery struct { + _ struct{} `type:"structure"` + + // The database to which the query belongs. + // + // Database is a required field + Database *string `min:"1" type:"string" required:"true"` + + // A brief description of the query. + Description *string `min:"1" type:"string"` + + // The plain-language name of the query. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The unique identifier of the query. + NamedQueryId *string `type:"string"` + + // The SQL query statements that comprise the query. + // + // QueryString is a required field + QueryString *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s NamedQuery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NamedQuery) GoString() string { + return s.String() +} + +// SetDatabase sets the Database field's value. +func (s *NamedQuery) SetDatabase(v string) *NamedQuery { + s.Database = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *NamedQuery) SetDescription(v string) *NamedQuery { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *NamedQuery) SetName(v string) *NamedQuery { + s.Name = &v + return s +} + +// SetNamedQueryId sets the NamedQueryId field's value. +func (s *NamedQuery) SetNamedQueryId(v string) *NamedQuery { + s.NamedQueryId = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *NamedQuery) SetQueryString(v string) *NamedQuery { + s.QueryString = &v + return s +} + +// Information about a single instance of a query execution. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/QueryExecution +type QueryExecution struct { + _ struct{} `type:"structure"` + + // The SQL query statements which the query execution ran. + Query *string `min:"1" type:"string"` + + // The database in which the query execution occurred. + QueryExecutionContext *QueryExecutionContext `type:"structure"` + + // The unique identifier for each query execution. + QueryExecutionId *string `type:"string"` + + // The location in Amazon S3 where query results were stored and the encryption + // option, if any, used for query results. + ResultConfiguration *ResultConfiguration `type:"structure"` + + // The amount of data scanned during the query execution and the amount of time + // that it took to execute. + Statistics *QueryExecutionStatistics `type:"structure"` + + // The completion date, current state, submission time, and state change reason + // (if applicable) for the query execution. + Status *QueryExecutionStatus `type:"structure"` +} + +// String returns the string representation +func (s QueryExecution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryExecution) GoString() string { + return s.String() +} + +// SetQuery sets the Query field's value. +func (s *QueryExecution) SetQuery(v string) *QueryExecution { + s.Query = &v + return s +} + +// SetQueryExecutionContext sets the QueryExecutionContext field's value. +func (s *QueryExecution) SetQueryExecutionContext(v *QueryExecutionContext) *QueryExecution { + s.QueryExecutionContext = v + return s +} + +// SetQueryExecutionId sets the QueryExecutionId field's value. +func (s *QueryExecution) SetQueryExecutionId(v string) *QueryExecution { + s.QueryExecutionId = &v + return s +} + +// SetResultConfiguration sets the ResultConfiguration field's value. +func (s *QueryExecution) SetResultConfiguration(v *ResultConfiguration) *QueryExecution { + s.ResultConfiguration = v + return s +} + +// SetStatistics sets the Statistics field's value. +func (s *QueryExecution) SetStatistics(v *QueryExecutionStatistics) *QueryExecution { + s.Statistics = v + return s +} + +// SetStatus sets the Status field's value. +func (s *QueryExecution) SetStatus(v *QueryExecutionStatus) *QueryExecution { + s.Status = v + return s +} + +// The database in which the query execution occurs. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/QueryExecutionContext +type QueryExecutionContext struct { + _ struct{} `type:"structure"` + + // The name of the database. + Database *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s QueryExecutionContext) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryExecutionContext) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *QueryExecutionContext) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "QueryExecutionContext"} + if s.Database != nil && len(*s.Database) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Database", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabase sets the Database field's value. +func (s *QueryExecutionContext) SetDatabase(v string) *QueryExecutionContext { + s.Database = &v + return s +} + +// The amount of data scanned during the query execution and the amount of time +// that it took to execute. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/QueryExecutionStatistics +type QueryExecutionStatistics struct { + _ struct{} `type:"structure"` + + // The number of bytes in the data that was queried. + DataScannedInBytes *int64 `type:"long"` + + // The number of milliseconds that the query took to execute. + EngineExecutionTimeInMillis *int64 `type:"long"` +} + +// String returns the string representation +func (s QueryExecutionStatistics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryExecutionStatistics) GoString() string { + return s.String() +} + +// SetDataScannedInBytes sets the DataScannedInBytes field's value. +func (s *QueryExecutionStatistics) SetDataScannedInBytes(v int64) *QueryExecutionStatistics { + s.DataScannedInBytes = &v + return s +} + +// SetEngineExecutionTimeInMillis sets the EngineExecutionTimeInMillis field's value. +func (s *QueryExecutionStatistics) SetEngineExecutionTimeInMillis(v int64) *QueryExecutionStatistics { + s.EngineExecutionTimeInMillis = &v + return s +} + +// The completion date, current state, submission time, and state change reason +// (if applicable) for the query execution. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/QueryExecutionStatus +type QueryExecutionStatus struct { + _ struct{} `type:"structure"` + + // The date and time that the query completed. + CompletionDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The state of query execution. SUBMITTED indicates that the query is queued + // for execution. RUNNING indicates that the query is scanning data and returning + // results. SUCCEEDED indicates that the query completed without error. FAILED + // indicates that the query experienced an error and did not complete processing. + // CANCELLED indicates that user input interrupted query execution. + State *string `type:"string" enum:"QueryExecutionState"` + + // Further detail about the status of the query. + StateChangeReason *string `type:"string"` + + // The date and time that the query was submitted. + SubmissionDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s QueryExecutionStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryExecutionStatus) GoString() string { + return s.String() +} + +// SetCompletionDateTime sets the CompletionDateTime field's value. +func (s *QueryExecutionStatus) SetCompletionDateTime(v time.Time) *QueryExecutionStatus { + s.CompletionDateTime = &v + return s +} + +// SetState sets the State field's value. +func (s *QueryExecutionStatus) SetState(v string) *QueryExecutionStatus { + s.State = &v + return s +} + +// SetStateChangeReason sets the StateChangeReason field's value. +func (s *QueryExecutionStatus) SetStateChangeReason(v string) *QueryExecutionStatus { + s.StateChangeReason = &v + return s +} + +// SetSubmissionDateTime sets the SubmissionDateTime field's value. +func (s *QueryExecutionStatus) SetSubmissionDateTime(v time.Time) *QueryExecutionStatus { + s.SubmissionDateTime = &v + return s +} + +// The location in Amazon S3 where query results are stored and the encryption +// option, if any, used for query results. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ResultConfiguration +type ResultConfiguration struct { + _ struct{} `type:"structure"` + + // If query results are encrypted in S3, indicates the S3 encryption option + // used (for example, SSE-KMS or CSE-KMS and key information. + EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + + // The location in S3 where query results are stored. + // + // OutputLocation is a required field + OutputLocation *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ResultConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResultConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResultConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResultConfiguration"} + if s.OutputLocation == nil { + invalidParams.Add(request.NewErrParamRequired("OutputLocation")) + } + if s.EncryptionConfiguration != nil { + if err := s.EncryptionConfiguration.Validate(); err != nil { + invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. +func (s *ResultConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfiguration { + s.EncryptionConfiguration = v + return s +} + +// SetOutputLocation sets the OutputLocation field's value. +func (s *ResultConfiguration) SetOutputLocation(v string) *ResultConfiguration { + s.OutputLocation = &v + return s +} + +// The metadata and rows that comprise a query result set. The metadata describes +// the column structure and data types. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ResultSet +type ResultSet struct { + _ struct{} `type:"structure"` + + // The metadata that describes the column structure and data types of a table + // of query results. + ResultSetMetadata *ResultSetMetadata `type:"structure"` + + // The rows in the table. + Rows []*Row `type:"list"` +} + +// String returns the string representation +func (s ResultSet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResultSet) GoString() string { + return s.String() +} + +// SetResultSetMetadata sets the ResultSetMetadata field's value. +func (s *ResultSet) SetResultSetMetadata(v *ResultSetMetadata) *ResultSet { + s.ResultSetMetadata = v + return s +} + +// SetRows sets the Rows field's value. +func (s *ResultSet) SetRows(v []*Row) *ResultSet { + s.Rows = v + return s +} + +// The metadata that describes the column structure and data types of a table +// of query results. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ResultSetMetadata +type ResultSetMetadata struct { + _ struct{} `type:"structure"` + + // Information about the columns in a query execution result. + ColumnInfo []*ColumnInfo `type:"list"` +} + +// String returns the string representation +func (s ResultSetMetadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResultSetMetadata) GoString() string { + return s.String() +} + +// SetColumnInfo sets the ColumnInfo field's value. +func (s *ResultSetMetadata) SetColumnInfo(v []*ColumnInfo) *ResultSetMetadata { + s.ColumnInfo = v + return s +} + +// The rows that comprise a query result table. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/Row +type Row struct { + _ struct{} `type:"structure"` + + // The data that populates a row in a query result table. + Data []*Datum `type:"list"` +} + +// String returns the string representation +func (s Row) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Row) GoString() string { + return s.String() +} + +// SetData sets the Data field's value. +func (s *Row) SetData(v []*Datum) *Row { + s.Data = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecutionInput +type StartQueryExecutionInput struct { + _ struct{} `type:"structure"` + + // A unique case-sensitive string used to ensure the request to create the query + // is idempotent (executes only once). If another StartQueryExecution request + // is received, the same response is returned and another query is not created. + // If a parameter has changed, for example, the QueryString, an error is returned. + // + // This token is listed as not required because AWS SDKs (for example the AWS + // SDK for Java) auto-generate the token for users. If you are not using the + // AWS SDK or the AWS CLI, you must provide this token or the action will fail. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // The database within which the query executes. + QueryExecutionContext *QueryExecutionContext `type:"structure"` + + // The SQL query statements to be executed. + // + // QueryString is a required field + QueryString *string `min:"1" type:"string" required:"true"` + + // Specifies information about where and how to save the results of the query + // execution. + // + // ResultConfiguration is a required field + ResultConfiguration *ResultConfiguration `type:"structure" required:"true"` +} + +// String returns the string representation +func (s StartQueryExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartQueryExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartQueryExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartQueryExecutionInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.QueryString == nil { + invalidParams.Add(request.NewErrParamRequired("QueryString")) + } + if s.QueryString != nil && len(*s.QueryString) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) + } + if s.ResultConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("ResultConfiguration")) + } + if s.QueryExecutionContext != nil { + if err := s.QueryExecutionContext.Validate(); err != nil { + invalidParams.AddNested("QueryExecutionContext", err.(request.ErrInvalidParams)) + } + } + if s.ResultConfiguration != nil { + if err := s.ResultConfiguration.Validate(); err != nil { + invalidParams.AddNested("ResultConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *StartQueryExecutionInput) SetClientRequestToken(v string) *StartQueryExecutionInput { + s.ClientRequestToken = &v + return s +} + +// SetQueryExecutionContext sets the QueryExecutionContext field's value. +func (s *StartQueryExecutionInput) SetQueryExecutionContext(v *QueryExecutionContext) *StartQueryExecutionInput { + s.QueryExecutionContext = v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *StartQueryExecutionInput) SetQueryString(v string) *StartQueryExecutionInput { + s.QueryString = &v + return s +} + +// SetResultConfiguration sets the ResultConfiguration field's value. +func (s *StartQueryExecutionInput) SetResultConfiguration(v *ResultConfiguration) *StartQueryExecutionInput { + s.ResultConfiguration = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecutionOutput +type StartQueryExecutionOutput struct { + _ struct{} `type:"structure"` + + // The unique ID of the query that ran as a result of this request. + QueryExecutionId *string `type:"string"` +} + +// String returns the string representation +func (s StartQueryExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartQueryExecutionOutput) GoString() string { + return s.String() +} + +// SetQueryExecutionId sets the QueryExecutionId field's value. +func (s *StartQueryExecutionOutput) SetQueryExecutionId(v string) *StartQueryExecutionOutput { + s.QueryExecutionId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecutionInput +type StopQueryExecutionInput struct { + _ struct{} `type:"structure"` + + // The unique ID of the query execution to stop. + // + // QueryExecutionId is a required field + QueryExecutionId *string `type:"string" required:"true" idempotencyToken:"true"` +} + +// String returns the string representation +func (s StopQueryExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopQueryExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopQueryExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopQueryExecutionInput"} + if s.QueryExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueryExecutionId sets the QueryExecutionId field's value. +func (s *StopQueryExecutionInput) SetQueryExecutionId(v string) *StopQueryExecutionInput { + s.QueryExecutionId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecutionOutput +type StopQueryExecutionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopQueryExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopQueryExecutionOutput) GoString() string { + return s.String() +} + +// Information about a named query ID that could not be processed. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UnprocessedNamedQueryId +type UnprocessedNamedQueryId struct { + _ struct{} `type:"structure"` + + // The error code returned when the processing request for the named query failed, + // if applicable. + ErrorCode *string `min:"1" type:"string"` + + // The error message returned when the processing request for the named query + // failed, if applicable. + ErrorMessage *string `type:"string"` + + // The unique identifier of the named query. + NamedQueryId *string `type:"string"` +} + +// String returns the string representation +func (s UnprocessedNamedQueryId) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnprocessedNamedQueryId) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *UnprocessedNamedQueryId) SetErrorCode(v string) *UnprocessedNamedQueryId { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *UnprocessedNamedQueryId) SetErrorMessage(v string) *UnprocessedNamedQueryId { + s.ErrorMessage = &v + return s +} + +// SetNamedQueryId sets the NamedQueryId field's value. +func (s *UnprocessedNamedQueryId) SetNamedQueryId(v string) *UnprocessedNamedQueryId { + s.NamedQueryId = &v + return s +} + +// Describes a query execution that failed to process. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UnprocessedQueryExecutionId +type UnprocessedQueryExecutionId struct { + _ struct{} `type:"structure"` + + // The error code returned when the query execution failed to process, if applicable. + ErrorCode *string `min:"1" type:"string"` + + // The error message returned when the query execution failed to process, if + // applicable. + ErrorMessage *string `type:"string"` + + // The unique identifier of the query execution. + QueryExecutionId *string `type:"string"` +} + +// String returns the string representation +func (s UnprocessedQueryExecutionId) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnprocessedQueryExecutionId) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *UnprocessedQueryExecutionId) SetErrorCode(v string) *UnprocessedQueryExecutionId { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *UnprocessedQueryExecutionId) SetErrorMessage(v string) *UnprocessedQueryExecutionId { + s.ErrorMessage = &v + return s +} + +// SetQueryExecutionId sets the QueryExecutionId field's value. +func (s *UnprocessedQueryExecutionId) SetQueryExecutionId(v string) *UnprocessedQueryExecutionId { + s.QueryExecutionId = &v + return s +} + +const ( + // ColumnNullableNotNull is a ColumnNullable enum value + ColumnNullableNotNull = "NOT_NULL" + + // ColumnNullableNullable is a ColumnNullable enum value + ColumnNullableNullable = "NULLABLE" + + // ColumnNullableUnknown is a ColumnNullable enum value + ColumnNullableUnknown = "UNKNOWN" +) + +const ( + // EncryptionOptionSseS3 is a EncryptionOption enum value + EncryptionOptionSseS3 = "SSE_S3" + + // EncryptionOptionSseKms is a EncryptionOption enum value + EncryptionOptionSseKms = "SSE_KMS" + + // EncryptionOptionCseKms is a EncryptionOption enum value + EncryptionOptionCseKms = "CSE_KMS" +) + +const ( + // QueryExecutionStateQueued is a QueryExecutionState enum value + QueryExecutionStateQueued = "QUEUED" + + // QueryExecutionStateRunning is a QueryExecutionState enum value + QueryExecutionStateRunning = "RUNNING" + + // QueryExecutionStateSucceeded is a QueryExecutionState enum value + QueryExecutionStateSucceeded = "SUCCEEDED" + + // QueryExecutionStateFailed is a QueryExecutionState enum value + QueryExecutionStateFailed = "FAILED" + + // QueryExecutionStateCancelled is a QueryExecutionState enum value + QueryExecutionStateCancelled = "CANCELLED" +) + +const ( + // ThrottleReasonConcurrentQueryLimitExceeded is a ThrottleReason enum value + ThrottleReasonConcurrentQueryLimitExceeded = "CONCURRENT_QUERY_LIMIT_EXCEEDED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go b/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go new file mode 100644 index 000000000..920fafc0c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go @@ -0,0 +1,39 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package athena provides the client and types for making API +// requests to Amazon Athena. +// +// Amazon Athena is an interactive query service that lets you use standard +// SQL to analyze data directly in Amazon S3. You can point Athena at your data +// in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is +// serverless, so there is no infrastructure to set up or manage. You pay only +// for the queries you run. Athena scales automatically—executing queries in +// parallel—so results are fast, even with large datasets and complex queries. +// For more information, see What is Amazon Athena (http://docs.aws.amazon.com/athena/latest/ug/what-is.html) +// in the Amazon Athena User Guide. +// +// For code samples using the AWS SDK for Java, see Examples and Code Samples +// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// Athena User Guide. +// +// See https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18 for more information on this service. +// +// See athena package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/athena/ +// +// Using the Client +// +// To contact Amazon Athena with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon Athena client Athena for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/athena/#New +package athena diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go b/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go new file mode 100644 index 000000000..4060e744e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go @@ -0,0 +1,26 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package athena + +const ( + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // Indicates a platform issue, which may be due to a transient condition or + // outage. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // Indicates that something is wrong with the input to the request. For example, + // a required parameter may be missing or out of range. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // Indicates that the request was throttled. + ErrCodeTooManyRequestsException = "TooManyRequestsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/service.go b/vendor/github.com/aws/aws-sdk-go/service/athena/service.go new file mode 100644 index 000000000..c1fd29b0f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/service.go @@ -0,0 +1,95 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package athena + +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" +) + +// Athena provides the API operation methods for making requests to +// Amazon Athena. See this package's package overview docs +// for details on the service. +// +// Athena methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Athena 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 = "athena" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the Athena 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 Athena client from just a session. +// svc := athena.New(mySession) +// +// // Create a Athena client with additional configuration +// svc := athena.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Athena { + 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) *Athena { + svc := &Athena{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-05-18", + JSONVersion: "1.1", + TargetPrefix: "AmazonAthena", + }, + 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 Athena operation and runs any +// custom request initialization. +func (c *Athena) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index 88c30506b..761d8ecee 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -3272,8 +3272,8 @@ func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req * // // Removes one or more instances from the specified Auto Scaling group. // -// After the instances are detached, you can manage them independently from -// the rest of the Auto Scaling group. +// After the instances are detached, you can manage them independent of the +// Auto Scaling group. // // If you do not specify the option to decrement the desired capacity, Auto // Scaling launches instances to replace the ones that are detached. @@ -3700,9 +3700,10 @@ func (c *AutoScaling) EnterStandbyRequest(input *EnterStandbyInput) (req *reques // EnterStandby API operation for Auto Scaling. // -// Moves the specified instances into Standby mode. +// Moves the specified instances into the standby state. // -// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html) +// For more information, see Temporarily Removing Instances from Your Auto Scaling +// Group (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-enter-exit-standby.html) // in the Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3869,9 +3870,10 @@ func (c *AutoScaling) ExitStandbyRequest(input *ExitStandbyInput) (req *request. // ExitStandby API operation for Auto Scaling. // -// Moves the specified instances out of Standby mode. +// Moves the specified instances out of the standby state. // -// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html) +// For more information, see Temporarily Removing Instances from Your Auto Scaling +// Group (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-enter-exit-standby.html) // in the Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4993,15 +4995,14 @@ func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGrou // // Updates the configuration for the specified Auto Scaling group. // +// The new settings take effect on any scaling activities after this call returns. +// Scaling activities that are currently in progress aren't affected. +// // To update an Auto Scaling group with a launch configuration with InstanceMonitoring -// set to False, you must first disable the collection of group metrics. Otherwise, +// set to false, you must first disable the collection of group metrics. Otherwise, // you will get an error. If you have previously enabled the collection of group // metrics, you can disable it using DisableMetricsCollection. // -// The new settings are registered upon the completion of this call. Any launch -// configuration settings take effect on any triggers after this call returns. -// Scaling activities that are currently in progress aren't affected. -// // Note the following: // // * If you specify a new value for MinSize without specifying a value for @@ -5235,7 +5236,6 @@ func (s *Alarm) SetAlarmName(v string) *Alarm { return s } -// Contains the parameters for AttachInstances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachInstancesQuery type AttachInstancesInput struct { _ struct{} `type:"structure"` @@ -5302,7 +5302,6 @@ func (s AttachInstancesOutput) GoString() string { return s.String() } -// Contains the parameters for AttachLoadBalancerTargetGroups. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancerTargetGroupsType type AttachLoadBalancerTargetGroupsInput struct { _ struct{} `type:"structure"` @@ -5374,7 +5373,6 @@ func (s AttachLoadBalancerTargetGroupsOutput) GoString() string { return s.String() } -// Contains the parameters for AttachLoadBalancers. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancersType type AttachLoadBalancersInput struct { _ struct{} `type:"structure"` @@ -5431,7 +5429,6 @@ func (s *AttachLoadBalancersInput) SetLoadBalancerNames(v []*string) *AttachLoad return s } -// Contains the output of AttachLoadBalancers. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancersResultType type AttachLoadBalancersOutput struct { _ struct{} `type:"structure"` @@ -5529,7 +5526,6 @@ func (s *BlockDeviceMapping) SetVirtualName(v string) *BlockDeviceMapping { return s } -// Contains the parameters for CompleteLifecycleAction. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleActionType type CompleteLifecycleActionInput struct { _ struct{} `type:"structure"` @@ -5630,7 +5626,6 @@ func (s *CompleteLifecycleActionInput) SetLifecycleHookName(v string) *CompleteL return s } -// Contains the output of CompleteLifecycleAction. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleActionAnswer type CompleteLifecycleActionOutput struct { _ struct{} `type:"structure"` @@ -5646,7 +5641,6 @@ func (s CompleteLifecycleActionOutput) GoString() string { return s.String() } -// Contains the parameters for CreateAutoScalingGroup. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroupType type CreateAutoScalingGroupInput struct { _ struct{} `type:"structure"` @@ -5670,7 +5664,8 @@ type CreateAutoScalingGroupInput struct { // The number of EC2 instances that should be running in the group. This number // must be greater than or equal to the minimum size of the group and less than - // or equal to the maximum size of the group. + // or equal to the maximum size of the group. If you do not specify a desired + // capacity, the default is the minimum size of the group. DesiredCapacity *int64 `type:"integer"` // The amount of time, in seconds, that Auto Scaling waits before checking the @@ -5708,6 +5703,9 @@ type CreateAutoScalingGroupInput struct { // instead of a launch configuration. LaunchConfigurationName *string `min:"1" type:"string"` + // One or more lifecycle hooks. + LifecycleHookSpecificationList []*LifecycleHookSpecification `type:"list"` + // One or more Classic Load Balancers. To specify an Application Load Balancer, // use TargetGroupARNs instead. // @@ -5806,6 +5804,16 @@ func (s *CreateAutoScalingGroupInput) Validate() error { if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 { invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1)) } + if s.LifecycleHookSpecificationList != nil { + for i, v := range s.LifecycleHookSpecificationList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LifecycleHookSpecificationList", i), err.(request.ErrInvalidParams)) + } + } + } if s.Tags != nil { for i, v := range s.Tags { if v == nil { @@ -5871,6 +5879,12 @@ func (s *CreateAutoScalingGroupInput) SetLaunchConfigurationName(v string) *Crea return s } +// SetLifecycleHookSpecificationList sets the LifecycleHookSpecificationList field's value. +func (s *CreateAutoScalingGroupInput) SetLifecycleHookSpecificationList(v []*LifecycleHookSpecification) *CreateAutoScalingGroupInput { + s.LifecycleHookSpecificationList = v + return s +} + // SetLoadBalancerNames sets the LoadBalancerNames field's value. func (s *CreateAutoScalingGroupInput) SetLoadBalancerNames(v []*string) *CreateAutoScalingGroupInput { s.LoadBalancerNames = v @@ -5940,7 +5954,6 @@ func (s CreateAutoScalingGroupOutput) GoString() string { return s.String() } -// Contains the parameters for CreateLaunchConfiguration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfigurationType type CreateLaunchConfigurationInput struct { _ struct{} `type:"structure"` @@ -5997,14 +6010,18 @@ type CreateLaunchConfigurationInput struct { IamInstanceProfile *string `min:"1" type:"string"` // The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances. + // + // If you do not specify InstanceId, you must specify ImageId. + // // For more information, see Finding an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) // in the Amazon Elastic Compute Cloud User Guide. ImageId *string `min:"1" type:"string"` - // The ID of the instance to use to create the launch configuration. + // The ID of the instance to use to create the launch configuration. The new + // launch configuration derives attributes from the instance, with the exception + // of the block device mapping. // - // The new launch configuration derives attributes from the instance, with the - // exception of the block device mapping. + // If you do not specify InstanceId, you must specify both ImageId and InstanceType. // // To create a launch configuration with a block device mapping or override // any other instance attributes, specify them as part of the same request. @@ -6015,11 +6032,15 @@ type CreateLaunchConfigurationInput struct { InstanceId *string `min:"1" type:"string"` // Enables detailed monitoring (true) or basic monitoring (false) for the Auto - // Scaling instances. + // Scaling instances. The default is true. InstanceMonitoring *InstanceMonitoring `type:"structure"` - // The instance type of the EC2 instance. For information about available instance - // types, see Available Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) + // The instance type of the EC2 instance. + // + // If you do not specify InstanceId, you must specify InstanceType. + // + // For information about available instance types, see Available Instance Types + // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) // in the Amazon Elastic Compute Cloud User Guide. InstanceType *string `min:"1" type:"string"` @@ -6270,7 +6291,6 @@ func (s CreateLaunchConfigurationOutput) GoString() string { return s.String() } -// Contains the parameters for CreateOrUpdateTags. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTagsType type CreateOrUpdateTagsInput struct { _ struct{} `type:"structure"` @@ -6431,7 +6451,6 @@ func (s *CustomizedMetricSpecification) SetUnit(v string) *CustomizedMetricSpeci return s } -// Contains the parameters for DeleteAutoScalingGroup. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroupType type DeleteAutoScalingGroupInput struct { _ struct{} `type:"structure"` @@ -6500,7 +6519,6 @@ func (s DeleteAutoScalingGroupOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteLaunchConfiguration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/LaunchConfigurationNameType type DeleteLaunchConfigurationInput struct { _ struct{} `type:"structure"` @@ -6558,7 +6576,6 @@ func (s DeleteLaunchConfigurationOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteLifecycleHook. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHookType type DeleteLifecycleHookInput struct { _ struct{} `type:"structure"` @@ -6618,7 +6635,6 @@ func (s *DeleteLifecycleHookInput) SetLifecycleHookName(v string) *DeleteLifecyc return s } -// Contains the output of DeleteLifecycleHook. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHookAnswer type DeleteLifecycleHookOutput struct { _ struct{} `type:"structure"` @@ -6634,7 +6650,6 @@ func (s DeleteLifecycleHookOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteNotificationConfiguration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfigurationType type DeleteNotificationConfigurationInput struct { _ struct{} `type:"structure"` @@ -6710,7 +6725,6 @@ func (s DeleteNotificationConfigurationOutput) GoString() string { return s.String() } -// Contains the parameters for DeletePolicy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicyType type DeletePolicyInput struct { _ struct{} `type:"structure"` @@ -6780,7 +6794,6 @@ func (s DeletePolicyOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteScheduledAction. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledActionType type DeleteScheduledActionInput struct { _ struct{} `type:"structure"` @@ -6855,7 +6868,6 @@ func (s DeleteScheduledActionOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteTags. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTagsType type DeleteTagsInput struct { _ struct{} `type:"structure"` @@ -6935,7 +6947,6 @@ func (s DescribeAccountLimitsInput) GoString() string { return s.String() } -// Contains the parameters for DescribeAccountLimits. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimitsAnswer type DescribeAccountLimitsOutput struct { _ struct{} `type:"structure"` @@ -7004,7 +7015,6 @@ func (s DescribeAdjustmentTypesInput) GoString() string { return s.String() } -// Contains the parameters for DescribeAdjustmentTypes. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypesAnswer type DescribeAdjustmentTypesOutput struct { _ struct{} `type:"structure"` @@ -7029,7 +7039,6 @@ func (s *DescribeAdjustmentTypesOutput) SetAdjustmentTypes(v []*AdjustmentType) return s } -// Contains the parameters for DescribeAutoScalingGroups. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/GroupNamesType type DescribeAutoScalingGroupsInput struct { _ struct{} `type:"structure"` @@ -7075,7 +7084,6 @@ func (s *DescribeAutoScalingGroupsInput) SetNextToken(v string) *DescribeAutoSca return s } -// Contains the output for DescribeAutoScalingGroups. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/GroupsType type DescribeAutoScalingGroupsOutput struct { _ struct{} `type:"structure"` @@ -7112,7 +7120,6 @@ func (s *DescribeAutoScalingGroupsOutput) SetNextToken(v string) *DescribeAutoSc return s } -// Contains the parameters for DescribeAutoScalingInstances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstancesType type DescribeAutoScalingInstancesInput struct { _ struct{} `type:"structure"` @@ -7159,7 +7166,6 @@ func (s *DescribeAutoScalingInstancesInput) SetNextToken(v string) *DescribeAuto return s } -// Contains the output of DescribeAutoScalingInstances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/InstancesType type DescribeAutoScalingInstancesOutput struct { _ struct{} `type:"structure"` @@ -7209,7 +7215,6 @@ func (s DescribeAutoScalingNotificationTypesInput) GoString() string { return s.String() } -// Contains the output of DescribeAutoScalingNotificationTypes. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypesAnswer type DescribeAutoScalingNotificationTypesOutput struct { _ struct{} `type:"structure"` @@ -7234,7 +7239,6 @@ func (s *DescribeAutoScalingNotificationTypesOutput) SetAutoScalingNotificationT return s } -// Contains the parameters for DescribeLaunchConfigurations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/LaunchConfigurationNamesType type DescribeLaunchConfigurationsInput struct { _ struct{} `type:"structure"` @@ -7280,7 +7284,6 @@ func (s *DescribeLaunchConfigurationsInput) SetNextToken(v string) *DescribeLaun return s } -// Contains the output of DescribeLaunchConfigurations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/LaunchConfigurationsType type DescribeLaunchConfigurationsOutput struct { _ struct{} `type:"structure"` @@ -7332,7 +7335,6 @@ func (s DescribeLifecycleHookTypesInput) GoString() string { return s.String() } -// Contains the output of DescribeLifecycleHookTypes. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypesAnswer type DescribeLifecycleHookTypesOutput struct { _ struct{} `type:"structure"` @@ -7357,7 +7359,6 @@ func (s *DescribeLifecycleHookTypesOutput) SetLifecycleHookTypes(v []*string) *D return s } -// Contains the parameters for DescribeLifecycleHooks. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooksType type DescribeLifecycleHooksInput struct { _ struct{} `type:"structure"` @@ -7410,7 +7411,6 @@ func (s *DescribeLifecycleHooksInput) SetLifecycleHookNames(v []*string) *Descri return s } -// Contains the output of DescribeLifecycleHooks. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooksAnswer type DescribeLifecycleHooksOutput struct { _ struct{} `type:"structure"` @@ -7435,7 +7435,6 @@ func (s *DescribeLifecycleHooksOutput) SetLifecycleHooks(v []*LifecycleHook) *De return s } -// Contains the parameters for DescribeLoadBalancerTargetGroups. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroupsRequest type DescribeLoadBalancerTargetGroupsInput struct { _ struct{} `type:"structure"` @@ -7498,7 +7497,6 @@ func (s *DescribeLoadBalancerTargetGroupsInput) SetNextToken(v string) *Describe return s } -// Contains the output of DescribeLoadBalancerTargetGroups. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroupsResponse type DescribeLoadBalancerTargetGroupsOutput struct { _ struct{} `type:"structure"` @@ -7533,7 +7531,6 @@ func (s *DescribeLoadBalancerTargetGroupsOutput) SetNextToken(v string) *Describ return s } -// Contains the parameters for DescribeLoadBalancers. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancersRequest type DescribeLoadBalancersInput struct { _ struct{} `type:"structure"` @@ -7596,7 +7593,6 @@ func (s *DescribeLoadBalancersInput) SetNextToken(v string) *DescribeLoadBalance return s } -// Contains the output of DescribeLoadBalancers. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancersResponse type DescribeLoadBalancersOutput struct { _ struct{} `type:"structure"` @@ -7646,7 +7642,6 @@ func (s DescribeMetricCollectionTypesInput) GoString() string { return s.String() } -// Contains the output of DescribeMetricsCollectionTypes. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypesAnswer type DescribeMetricCollectionTypesOutput struct { _ struct{} `type:"structure"` @@ -7680,7 +7675,6 @@ func (s *DescribeMetricCollectionTypesOutput) SetMetrics(v []*MetricCollectionTy return s } -// Contains the parameters for DescribeNotificationConfigurations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurationsType type DescribeNotificationConfigurationsInput struct { _ struct{} `type:"structure"` @@ -7725,7 +7719,6 @@ func (s *DescribeNotificationConfigurationsInput) SetNextToken(v string) *Descri return s } -// Contains the output from DescribeNotificationConfigurations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurationsAnswer type DescribeNotificationConfigurationsOutput struct { _ struct{} `type:"structure"` @@ -7762,7 +7755,6 @@ func (s *DescribeNotificationConfigurationsOutput) SetNotificationConfigurations return s } -// Contains the parameters for DescribePolicies. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePoliciesType type DescribePoliciesInput struct { _ struct{} `type:"structure"` @@ -7841,7 +7833,6 @@ func (s *DescribePoliciesInput) SetPolicyTypes(v []*string) *DescribePoliciesInp return s } -// Contains the output of DescribePolicies. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PoliciesType type DescribePoliciesOutput struct { _ struct{} `type:"structure"` @@ -7876,7 +7867,6 @@ func (s *DescribePoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *Describ return s } -// Contains the parameters for DescribeScalingActivities. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivitiesType type DescribeScalingActivitiesInput struct { _ struct{} `type:"structure"` @@ -7947,7 +7937,6 @@ func (s *DescribeScalingActivitiesInput) SetNextToken(v string) *DescribeScaling return s } -// Contains the output of DescribeScalingActivities. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ActivitiesType type DescribeScalingActivitiesOutput struct { _ struct{} `type:"structure"` @@ -8000,7 +7989,6 @@ func (s DescribeScalingProcessTypesInput) GoString() string { return s.String() } -// Contains the output of DescribeScalingProcessTypes. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ProcessesType type DescribeScalingProcessTypesOutput struct { _ struct{} `type:"structure"` @@ -8025,7 +8013,6 @@ func (s *DescribeScalingProcessTypesOutput) SetProcesses(v []*ProcessType) *Desc return s } -// Contains the parameters for DescribeScheduledActions. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActionsType type DescribeScheduledActionsInput struct { _ struct{} `type:"structure"` @@ -8118,7 +8105,6 @@ func (s *DescribeScheduledActionsInput) SetStartTime(v time.Time) *DescribeSched return s } -// Contains the output of DescribeScheduledActions. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ScheduledActionsType type DescribeScheduledActionsOutput struct { _ struct{} `type:"structure"` @@ -8153,7 +8139,6 @@ func (s *DescribeScheduledActionsOutput) SetScheduledUpdateGroupActions(v []*Sch return s } -// Contains the parameters for DescribeTags. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTagsType type DescribeTagsInput struct { _ struct{} `type:"structure"` @@ -8198,7 +8183,6 @@ func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput { return s } -// Contains the output of DescribeTags. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/TagsType type DescribeTagsOutput struct { _ struct{} `type:"structure"` @@ -8248,7 +8232,6 @@ func (s DescribeTerminationPolicyTypesInput) GoString() string { return s.String() } -// Contains the output of DescribeTerminationPolicyTypes. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypesAnswer type DescribeTerminationPolicyTypesOutput struct { _ struct{} `type:"structure"` @@ -8274,7 +8257,6 @@ func (s *DescribeTerminationPolicyTypesOutput) SetTerminationPolicyTypes(v []*st return s } -// Contains the parameters for DetachInstances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstancesQuery type DetachInstancesInput struct { _ struct{} `type:"structure"` @@ -8341,7 +8323,6 @@ func (s *DetachInstancesInput) SetShouldDecrementDesiredCapacity(v bool) *Detach return s } -// Contains the output of DetachInstances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstancesAnswer type DetachInstancesOutput struct { _ struct{} `type:"structure"` @@ -8437,7 +8418,6 @@ func (s DetachLoadBalancerTargetGroupsOutput) GoString() string { return s.String() } -// Contains the parameters for DetachLoadBalancers. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancersType type DetachLoadBalancersInput struct { _ struct{} `type:"structure"` @@ -8494,7 +8474,6 @@ func (s *DetachLoadBalancersInput) SetLoadBalancerNames(v []*string) *DetachLoad return s } -// Contains the output for DetachLoadBalancers. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancersResultType type DetachLoadBalancersOutput struct { _ struct{} `type:"structure"` @@ -8510,7 +8489,6 @@ func (s DetachLoadBalancersOutput) GoString() string { return s.String() } -// Contains the parameters for DisableMetricsCollection. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DisableMetricsCollectionQuery type DisableMetricsCollectionInput struct { _ struct{} `type:"structure"` @@ -8707,7 +8685,6 @@ func (s *Ebs) SetVolumeType(v string) *Ebs { return s } -// Contains the parameters for EnableMetricsCollection. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnableMetricsCollectionQuery type EnableMetricsCollectionInput struct { _ struct{} `type:"structure"` @@ -8859,7 +8836,6 @@ func (s *EnabledMetric) SetMetric(v string) *EnabledMetric { return s } -// Contains the parameters for EnteStandby. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnterStandbyQuery type EnterStandbyInput struct { _ struct{} `type:"structure"` @@ -8929,7 +8905,6 @@ func (s *EnterStandbyInput) SetShouldDecrementDesiredCapacity(v bool) *EnterStan return s } -// Contains the output of EnterStandby. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnterStandbyAnswer type EnterStandbyOutput struct { _ struct{} `type:"structure"` @@ -8954,7 +8929,6 @@ func (s *EnterStandbyOutput) SetActivities(v []*Activity) *EnterStandbyOutput { return s } -// Contains the parameters for ExecutePolicy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExecutePolicyType type ExecutePolicyInput struct { _ struct{} `type:"structure"` @@ -9071,7 +9045,6 @@ func (s ExecutePolicyOutput) GoString() string { return s.String() } -// Contains the parameters for ExitStandby. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExitStandbyQuery type ExitStandbyInput struct { _ struct{} `type:"structure"` @@ -9123,7 +9096,6 @@ func (s *ExitStandbyInput) SetInstanceIds(v []*string) *ExitStandbyInput { return s } -// Contains the parameters for ExitStandby. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExitStandbyAnswer type ExitStandbyOutput struct { _ struct{} `type:"structure"` @@ -9606,12 +9578,12 @@ func (s *InstanceDetails) SetProtectedFromScaleIn(v bool) *InstanceDetails { return s } -// Describes whether instance monitoring is enabled. +// Describes whether detailed monitoring is enabled for the Auto Scaling instances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/InstanceMonitoring type InstanceMonitoring struct { _ struct{} `type:"structure"` - // If True, instance monitoring is enabled. + // If true, detailed monitoring is enabled. Otherwise, basic monitoring is enabled. Enabled *bool `type:"boolean"` } @@ -9837,14 +9809,9 @@ func (s *LaunchConfiguration) SetUserData(v string) *LaunchConfiguration { } // Describes a lifecycle hook, which tells Auto Scaling that you want to perform -// an action when an instance launches or terminates. When you have a lifecycle -// hook in place, the Auto Scaling group will either: +// an action whenever it launches instances or whenever it terminates instances. // -// * Pause the instance after it launches, but before it is put into service -// -// * Pause the instance as it terminates, but before it is fully terminated -// -// For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html) +// For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) // in the Auto Scaling User Guide. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/LifecycleHook type LifecycleHook struct { @@ -9864,9 +9831,8 @@ type LifecycleHook struct { GlobalTimeout *int64 `type:"integer"` // The maximum time, in seconds, that can elapse before the lifecycle hook times - // out. The default is 3600 seconds (1 hour). When the lifecycle hook times - // out, Auto Scaling performs the default action. You can prevent the lifecycle - // hook from timing out by calling RecordLifecycleActionHeartbeat. + // out. If the lifecycle hook times out, Auto Scaling performs the default action. + // You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. @@ -9880,24 +9846,9 @@ type LifecycleHook struct { // a message to the notification target. NotificationMetadata *string `min:"1" type:"string"` - // The ARN of the notification target that Auto Scaling uses to notify you when - // an instance is in the transition state for the lifecycle hook. This ARN target - // can be either an SQS queue or an SNS topic. The notification message sent - // to the target includes the following: - // - // * Lifecycle action token - // - // * User account ID - // - // * Name of the Auto Scaling group - // - // * Lifecycle hook name - // - // * EC2 instance ID - // - // * Lifecycle transition - // - // * Notification metadata + // The ARN of the target that Auto Scaling sends notifications to when an instance + // is in the transition state for the lifecycle hook. The notification target + // can be either an SQS queue or an SNS topic. NotificationTargetARN *string `min:"1" type:"string"` // The ARN of the IAM role that allows the Auto Scaling group to publish to @@ -9969,6 +9920,122 @@ func (s *LifecycleHook) SetRoleARN(v string) *LifecycleHook { return s } +// Describes a lifecycle hook, which tells Auto Scaling that you want to perform +// an action whenever it launches instances or whenever it terminates instances. +// +// For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) +// in the Auto Scaling User Guide. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/LifecycleHookSpecification +type LifecycleHookSpecification struct { + _ struct{} `type:"structure"` + + // Defines the action the Auto Scaling group should take when the lifecycle + // hook timeout elapses or if an unexpected failure occurs. The valid values + // are CONTINUE and ABANDON. The default value is CONTINUE. + DefaultResult *string `type:"string"` + + // The maximum time, in seconds, that can elapse before the lifecycle hook times + // out. If the lifecycle hook times out, Auto Scaling performs the default action. + // You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. + HeartbeatTimeout *int64 `type:"integer"` + + // The name of the lifecycle hook. + // + // LifecycleHookName is a required field + LifecycleHookName *string `min:"1" type:"string" required:"true"` + + // The state of the EC2 instance to which you want to attach the lifecycle hook. + // For a list of lifecycle hook types, see DescribeLifecycleHookTypes. + LifecycleTransition *string `type:"string"` + + // Additional information that you want to include any time Auto Scaling sends + // a message to the notification target. + NotificationMetadata *string `min:"1" type:"string"` + + // The ARN of the target that Auto Scaling sends notifications to when an instance + // is in the transition state for the lifecycle hook. The notification target + // can be either an SQS queue or an SNS topic. + NotificationTargetARN *string `type:"string"` + + // The ARN of the IAM role that allows the Auto Scaling group to publish to + // the specified notification target. + RoleARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s LifecycleHookSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LifecycleHookSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LifecycleHookSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LifecycleHookSpecification"} + if s.LifecycleHookName == nil { + invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) + } + if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) + } + if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1)) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultResult sets the DefaultResult field's value. +func (s *LifecycleHookSpecification) SetDefaultResult(v string) *LifecycleHookSpecification { + s.DefaultResult = &v + return s +} + +// SetHeartbeatTimeout sets the HeartbeatTimeout field's value. +func (s *LifecycleHookSpecification) SetHeartbeatTimeout(v int64) *LifecycleHookSpecification { + s.HeartbeatTimeout = &v + return s +} + +// SetLifecycleHookName sets the LifecycleHookName field's value. +func (s *LifecycleHookSpecification) SetLifecycleHookName(v string) *LifecycleHookSpecification { + s.LifecycleHookName = &v + return s +} + +// SetLifecycleTransition sets the LifecycleTransition field's value. +func (s *LifecycleHookSpecification) SetLifecycleTransition(v string) *LifecycleHookSpecification { + s.LifecycleTransition = &v + return s +} + +// SetNotificationMetadata sets the NotificationMetadata field's value. +func (s *LifecycleHookSpecification) SetNotificationMetadata(v string) *LifecycleHookSpecification { + s.NotificationMetadata = &v + return s +} + +// SetNotificationTargetARN sets the NotificationTargetARN field's value. +func (s *LifecycleHookSpecification) SetNotificationTargetARN(v string) *LifecycleHookSpecification { + s.NotificationTargetARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *LifecycleHookSpecification) SetRoleARN(v string) *LifecycleHookSpecification { + s.RoleARN = &v + return s +} + // Describes the state of a Classic Load Balancer. // // If you specify a load balancer when creating the Auto Scaling group, the @@ -10258,20 +10325,7 @@ func (s *NotificationConfiguration) SetTopicARN(v string) *NotificationConfigura return s } -// Configures a predefined metric for a target tracking policy. The following -// predefined metrics are available: -// -// * ASGAverageCPUUtilization - average CPU utilization of the Auto Scaling -// group -// -// * ASGAverageNetworkIn - average number of bytes received on all network -// interfaces by the Auto Scaling group -// -// * ASGAverageNetworkOut - average number of bytes sent out on all network -// interfaces by the Auto Scaling group -// -// * ALBRequestCountPerTarget - number of requests completed per target in -// an Application Load Balancer target group +// Configures a predefined metric for a target tracking policy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PredefinedMetricSpecification type PredefinedMetricSpecification struct { _ struct{} `type:"structure"` @@ -10281,11 +10335,26 @@ type PredefinedMetricSpecification struct { // PredefinedMetricType is a required field PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"` - // Identifies the resource associated with the metric type. For predefined metric - // types ASGAverageCPUUtilization, ASGAverageNetworkIn and ASGAverageNetworkOut, - // the parameter must not be specified as the resource associated with the metric - // type is the Auto Scaling group. For predefined metric type ALBRequestCountPerTarget, - // the parameter must be specified in the format app/load-balancer-name/load-balancer-id/targetgroup/target-group-name/target-group-id, + // Identifies the resource associated with the metric type. The following predefined + // metrics are available: + // + // * ASGAverageCPUUtilization - average CPU utilization of the Auto Scaling + // group + // + // * ASGAverageNetworkIn - average number of bytes received on all network + // interfaces by the Auto Scaling group + // + // * ASGAverageNetworkOut - average number of bytes sent out on all network + // interfaces by the Auto Scaling group + // + // * ALBRequestCountPerTarget - number of requests completed per target in + // an Application Load Balancer target group + // + // For predefined metric types ASGAverageCPUUtilization, ASGAverageNetworkIn + // and ASGAverageNetworkOut, the parameter must not be specified as the resource + // associated with the metric type is the Auto Scaling group. For predefined + // metric type ALBRequestCountPerTarget, the parameter must be specified in + // the format: app/load-balancer-name/load-balancer-id/targetgroup/target-group-name/target-group-id, // where app/load-balancer-name/load-balancer-id is the final portion of the // load balancer ARN, and targetgroup/target-group-name/target-group-id is the // final portion of the target group ARN. The target group must be attached @@ -10377,7 +10446,6 @@ func (s *ProcessType) SetProcessName(v string) *ProcessType { return s } -// Contains the parameters for PutLifecycleHook. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutLifecycleHookType type PutLifecycleHookInput struct { _ struct{} `type:"structure"` @@ -10393,10 +10461,12 @@ type PutLifecycleHookInput struct { // be either CONTINUE or ABANDON. The default value is ABANDON. DefaultResult *string `type:"string"` - // The amount of time, in seconds, that can elapse before the lifecycle hook - // times out. When the lifecycle hook times out, Auto Scaling performs the default - // action. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. - // The default is 3600 seconds (1 hour). + // The maximum time, in seconds, that can elapse before the lifecycle hook times + // out. The range is from 30 to 7200 seconds. The default is 3600 seconds (1 + // hour). + // + // If the lifecycle hook times out, Auto Scaling performs the default action. + // You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. @@ -10523,7 +10593,6 @@ func (s *PutLifecycleHookInput) SetRoleARN(v string) *PutLifecycleHookInput { return s } -// Contains the output of PutLifecycleHook. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutLifecycleHookAnswer type PutLifecycleHookOutput struct { _ struct{} `type:"structure"` @@ -10539,7 +10608,6 @@ func (s PutLifecycleHookOutput) GoString() string { return s.String() } -// Contains the parameters for PutNotificationConfiguration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutNotificationConfigurationType type PutNotificationConfigurationInput struct { _ struct{} `type:"structure"` @@ -10630,7 +10698,6 @@ func (s PutNotificationConfigurationOutput) GoString() string { return s.String() } -// Contains the parameters for PutScalingPolicy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScalingPolicyType type PutScalingPolicyInput struct { _ struct{} `type:"structure"` @@ -10708,7 +10775,7 @@ type PutScalingPolicyInput struct { // otherwise. StepAdjustments []*StepAdjustment `type:"list"` - // The configuration of a target tracking policy. + // A target tracking policy. // // This parameter is required if the policy type is TargetTrackingScaling and // not supported otherwise. @@ -10848,8 +10915,7 @@ func (s *PutScalingPolicyInput) SetTargetTrackingConfiguration(v *TargetTracking type PutScalingPolicyOutput struct { _ struct{} `type:"structure"` - // The CloudWatch alarms created for the target tracking policy. This parameter - // will be empty if the policy type is anything other than TargetTrackingScaling. + // The CloudWatch alarms created for the target tracking policy. Alarms []*Alarm `type:"list"` // The Amazon Resource Name (ARN) of the policy. @@ -10878,7 +10944,6 @@ func (s *PutScalingPolicyOutput) SetPolicyARN(v string) *PutScalingPolicyOutput return s } -// Contains the parameters for PutScheduledUpdateGroupAction. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScheduledUpdateGroupActionType type PutScheduledUpdateGroupActionInput struct { _ struct{} `type:"structure"` @@ -11028,7 +11093,6 @@ func (s PutScheduledUpdateGroupActionOutput) GoString() string { return s.String() } -// Contains the parameters for RecordLifecycleActionHeartbeat. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeatType type RecordLifecycleActionHeartbeatInput struct { _ struct{} `type:"structure"` @@ -11114,7 +11178,6 @@ func (s *RecordLifecycleActionHeartbeatInput) SetLifecycleHookName(v string) *Re return s } -// Contains the output of RecordLifecycleActionHeartBeat. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeatAnswer type RecordLifecycleActionHeartbeatOutput struct { _ struct{} `type:"structure"` @@ -11161,7 +11224,7 @@ type ScalingPolicy struct { AutoScalingGroupName *string `min:"1" type:"string"` // The amount of time, in seconds, after a scaling activity completes before - // any further trigger-related scaling activities can start. + // any further dynamic scaling activities can start. Cooldown *int64 `type:"integer"` // The estimated time, in seconds, until a newly launched instance can contribute @@ -11297,7 +11360,6 @@ func (s *ScalingPolicy) SetTargetTrackingConfiguration(v *TargetTrackingConfigur return s } -// Contains the parameters for SuspendProcesses and ResumeProcesses. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ScalingProcessQuery type ScalingProcessQuery struct { _ struct{} `type:"structure"` @@ -11477,7 +11539,6 @@ func (s *ScheduledUpdateGroupAction) SetTime(v time.Time) *ScheduledUpdateGroupA return s } -// Contains the parameters for SetDesiredCapacity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetDesiredCapacityType type SetDesiredCapacityInput struct { _ struct{} `type:"structure"` @@ -11561,7 +11622,6 @@ func (s SetDesiredCapacityOutput) GoString() string { return s.String() } -// Contains the parameters for SetInstanceHealth. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceHealthQuery type SetInstanceHealthInput struct { _ struct{} `type:"structure"` @@ -11653,7 +11713,6 @@ func (s SetInstanceHealthOutput) GoString() string { return s.String() } -// Contains the parameters for SetInstanceProtection. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceProtectionQuery type SetInstanceProtectionInput struct { _ struct{} `type:"structure"` @@ -11725,7 +11784,6 @@ func (s *SetInstanceProtectionInput) SetProtectedFromScaleIn(v bool) *SetInstanc return s } -// Contains the output of SetInstanceProtection. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceProtectionAnswer type SetInstanceProtectionOutput struct { _ struct{} `type:"structure"` @@ -12039,8 +12097,10 @@ type TargetTrackingConfiguration struct { // A customized metric. CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"` - // If the parameter is true, then scale-in will be disabled for the target tracking - // policy, i.e. the target tracking policy will not scale in the Auto Scaling + // Indicates whether scale in by the target tracking policy is disabled. If + // the value is true, scale in is disabled and the target tracking policy won't + // remove instances from the Auto Scaling group. Otherwise, scale in is enabled + // and the target tracking policy can remove instances from the Auto Scaling // group. The default value is false. DisableScaleIn *bool `type:"boolean"` @@ -12111,7 +12171,6 @@ func (s *TargetTrackingConfiguration) SetTargetValue(v float64) *TargetTrackingC return s } -// Contains the parameters for TerminateInstanceInAutoScalingGroup. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/TerminateInstanceInAutoScalingGroupType type TerminateInstanceInAutoScalingGroupInput struct { _ struct{} `type:"structure"` @@ -12169,7 +12228,6 @@ func (s *TerminateInstanceInAutoScalingGroupInput) SetShouldDecrementDesiredCapa return s } -// Contains the output of TerminateInstancesInAutoScalingGroup. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ActivityType type TerminateInstanceInAutoScalingGroupOutput struct { _ struct{} `type:"structure"` @@ -12194,7 +12252,6 @@ func (s *TerminateInstanceInAutoScalingGroupOutput) SetActivity(v *Activity) *Te return s } -// Contains the parameters for UpdateAutoScalingGroup. // Please also see https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/UpdateAutoScalingGroupType type UpdateAutoScalingGroupInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go index e1b144e95..34748cf6e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go @@ -14,7 +14,7 @@ // // Using the Client // -// To Auto Scaling with the SDK use the New function to create +// To contact Auto Scaling with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go new file mode 100644 index 000000000..4af4e082b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go @@ -0,0 +1,4733 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package batch + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opCancelJob = "CancelJob" + +// CancelJobRequest generates a "aws/request.Request" representing the +// client's request for the CancelJob operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelJob for more information on using the CancelJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelJobRequest method. +// req, resp := client.CancelJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJob +func (c *Batch) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput) { + op := &request.Operation{ + Name: opCancelJob, + HTTPMethod: "POST", + HTTPPath: "/v1/canceljob", + } + + if input == nil { + input = &CancelJobInput{} + } + + output = &CancelJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelJob API operation for AWS Batch. +// +// Cancels a job in an AWS Batch job queue. Jobs that are in the SUBMITTED, +// PENDING, or RUNNABLE state are cancelled. Jobs that have progressed to STARTING +// or RUNNING are not cancelled (but the API operation still succeeds, even +// if no job is cancelled); these jobs must be terminated with the TerminateJob +// operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation CancelJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJob +func (c *Batch) CancelJob(input *CancelJobInput) (*CancelJobOutput, error) { + req, out := c.CancelJobRequest(input) + return out, req.Send() +} + +// CancelJobWithContext is the same as CancelJob with the addition of +// the ability to pass a context and additional request options. +// +// See CancelJob for details on how to use this API operation. +// +// 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 *Batch) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts ...request.Option) (*CancelJobOutput, error) { + req, out := c.CancelJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateComputeEnvironment = "CreateComputeEnvironment" + +// CreateComputeEnvironmentRequest generates a "aws/request.Request" representing the +// client's request for the CreateComputeEnvironment operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateComputeEnvironment for more information on using the CreateComputeEnvironment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateComputeEnvironmentRequest method. +// req, resp := client.CreateComputeEnvironmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironment +func (c *Batch) CreateComputeEnvironmentRequest(input *CreateComputeEnvironmentInput) (req *request.Request, output *CreateComputeEnvironmentOutput) { + op := &request.Operation{ + Name: opCreateComputeEnvironment, + HTTPMethod: "POST", + HTTPPath: "/v1/createcomputeenvironment", + } + + if input == nil { + input = &CreateComputeEnvironmentInput{} + } + + output = &CreateComputeEnvironmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateComputeEnvironment API operation for AWS Batch. +// +// Creates an AWS Batch compute environment. You can create MANAGED or UNMANAGED +// compute environments. +// +// In a managed compute environment, AWS Batch manages the compute resources +// within the environment, based on the compute resources that you specify. +// Instances launched into a managed compute environment use a recent, approved +// version of the Amazon ECS-optimized AMI. You can choose to use Amazon EC2 +// On-Demand instances in your managed compute environment, or you can use Amazon +// EC2 Spot instances that only launch when the Spot bid price is below a specified +// percentage of the On-Demand price. +// +// In an unmanaged compute environment, you can manage your own compute resources. +// This provides more compute resource configuration options, such as using +// a custom AMI, but you must ensure that your AMI meets the Amazon ECS container +// instance AMI specification. For more information, see Container Instance +// AMIs (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/container_instance_AMIs.html) +// in the Amazon EC2 Container Service Developer Guide. After you have created +// your unmanaged compute environment, you can use the DescribeComputeEnvironments +// operation to find the Amazon ECS cluster that is associated with it and then +// manually launch your container instances into that Amazon ECS cluster. For +// more information, see Launching an Amazon ECS Container Instance (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html) +// in the Amazon EC2 Container Service Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation CreateComputeEnvironment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironment +func (c *Batch) CreateComputeEnvironment(input *CreateComputeEnvironmentInput) (*CreateComputeEnvironmentOutput, error) { + req, out := c.CreateComputeEnvironmentRequest(input) + return out, req.Send() +} + +// CreateComputeEnvironmentWithContext is the same as CreateComputeEnvironment with the addition of +// the ability to pass a context and additional request options. +// +// See CreateComputeEnvironment for details on how to use this API operation. +// +// 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 *Batch) CreateComputeEnvironmentWithContext(ctx aws.Context, input *CreateComputeEnvironmentInput, opts ...request.Option) (*CreateComputeEnvironmentOutput, error) { + req, out := c.CreateComputeEnvironmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateJobQueue = "CreateJobQueue" + +// CreateJobQueueRequest generates a "aws/request.Request" representing the +// client's request for the CreateJobQueue operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateJobQueue for more information on using the CreateJobQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateJobQueueRequest method. +// req, resp := client.CreateJobQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueue +func (c *Batch) CreateJobQueueRequest(input *CreateJobQueueInput) (req *request.Request, output *CreateJobQueueOutput) { + op := &request.Operation{ + Name: opCreateJobQueue, + HTTPMethod: "POST", + HTTPPath: "/v1/createjobqueue", + } + + if input == nil { + input = &CreateJobQueueInput{} + } + + output = &CreateJobQueueOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateJobQueue API operation for AWS Batch. +// +// Creates an AWS Batch job queue. When you create a job queue, you associate +// one or more compute environments to the queue and assign an order of preference +// for the compute environments. +// +// You also set a priority to the job queue that determines the order in which +// the AWS Batch scheduler places jobs onto its associated compute environments. +// For example, if a compute environment is associated with more than one job +// queue, the job queue with a higher priority is given preference for scheduling +// jobs to that compute environment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation CreateJobQueue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueue +func (c *Batch) CreateJobQueue(input *CreateJobQueueInput) (*CreateJobQueueOutput, error) { + req, out := c.CreateJobQueueRequest(input) + return out, req.Send() +} + +// CreateJobQueueWithContext is the same as CreateJobQueue with the addition of +// the ability to pass a context and additional request options. +// +// See CreateJobQueue for details on how to use this API operation. +// +// 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 *Batch) CreateJobQueueWithContext(ctx aws.Context, input *CreateJobQueueInput, opts ...request.Option) (*CreateJobQueueOutput, error) { + req, out := c.CreateJobQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteComputeEnvironment = "DeleteComputeEnvironment" + +// DeleteComputeEnvironmentRequest generates a "aws/request.Request" representing the +// client's request for the DeleteComputeEnvironment operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteComputeEnvironment for more information on using the DeleteComputeEnvironment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteComputeEnvironmentRequest method. +// req, resp := client.DeleteComputeEnvironmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironment +func (c *Batch) DeleteComputeEnvironmentRequest(input *DeleteComputeEnvironmentInput) (req *request.Request, output *DeleteComputeEnvironmentOutput) { + op := &request.Operation{ + Name: opDeleteComputeEnvironment, + HTTPMethod: "POST", + HTTPPath: "/v1/deletecomputeenvironment", + } + + if input == nil { + input = &DeleteComputeEnvironmentInput{} + } + + output = &DeleteComputeEnvironmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteComputeEnvironment API operation for AWS Batch. +// +// Deletes an AWS Batch compute environment. +// +// Before you can delete a compute environment, you must set its state to DISABLED +// with the UpdateComputeEnvironment API operation and disassociate it from +// any job queues with the UpdateJobQueue API operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation DeleteComputeEnvironment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironment +func (c *Batch) DeleteComputeEnvironment(input *DeleteComputeEnvironmentInput) (*DeleteComputeEnvironmentOutput, error) { + req, out := c.DeleteComputeEnvironmentRequest(input) + return out, req.Send() +} + +// DeleteComputeEnvironmentWithContext is the same as DeleteComputeEnvironment with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteComputeEnvironment for details on how to use this API operation. +// +// 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 *Batch) DeleteComputeEnvironmentWithContext(ctx aws.Context, input *DeleteComputeEnvironmentInput, opts ...request.Option) (*DeleteComputeEnvironmentOutput, error) { + req, out := c.DeleteComputeEnvironmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteJobQueue = "DeleteJobQueue" + +// DeleteJobQueueRequest generates a "aws/request.Request" representing the +// client's request for the DeleteJobQueue operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteJobQueue for more information on using the DeleteJobQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteJobQueueRequest method. +// req, resp := client.DeleteJobQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueue +func (c *Batch) DeleteJobQueueRequest(input *DeleteJobQueueInput) (req *request.Request, output *DeleteJobQueueOutput) { + op := &request.Operation{ + Name: opDeleteJobQueue, + HTTPMethod: "POST", + HTTPPath: "/v1/deletejobqueue", + } + + if input == nil { + input = &DeleteJobQueueInput{} + } + + output = &DeleteJobQueueOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteJobQueue API operation for AWS Batch. +// +// Deletes the specified job queue. You must first disable submissions for a +// queue with the UpdateJobQueue operation. All jobs in the queue are terminated +// when you delete a job queue. +// +// It is not necessary to disassociate compute environments from a queue before +// submitting a DeleteJobQueue request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation DeleteJobQueue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueue +func (c *Batch) DeleteJobQueue(input *DeleteJobQueueInput) (*DeleteJobQueueOutput, error) { + req, out := c.DeleteJobQueueRequest(input) + return out, req.Send() +} + +// DeleteJobQueueWithContext is the same as DeleteJobQueue with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteJobQueue for details on how to use this API operation. +// +// 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 *Batch) DeleteJobQueueWithContext(ctx aws.Context, input *DeleteJobQueueInput, opts ...request.Option) (*DeleteJobQueueOutput, error) { + req, out := c.DeleteJobQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeregisterJobDefinition = "DeregisterJobDefinition" + +// DeregisterJobDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterJobDefinition operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeregisterJobDefinition for more information on using the DeregisterJobDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeregisterJobDefinitionRequest method. +// req, resp := client.DeregisterJobDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinition +func (c *Batch) DeregisterJobDefinitionRequest(input *DeregisterJobDefinitionInput) (req *request.Request, output *DeregisterJobDefinitionOutput) { + op := &request.Operation{ + Name: opDeregisterJobDefinition, + HTTPMethod: "POST", + HTTPPath: "/v1/deregisterjobdefinition", + } + + if input == nil { + input = &DeregisterJobDefinitionInput{} + } + + output = &DeregisterJobDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeregisterJobDefinition API operation for AWS Batch. +// +// Deregisters an AWS Batch job definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation DeregisterJobDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinition +func (c *Batch) DeregisterJobDefinition(input *DeregisterJobDefinitionInput) (*DeregisterJobDefinitionOutput, error) { + req, out := c.DeregisterJobDefinitionRequest(input) + return out, req.Send() +} + +// DeregisterJobDefinitionWithContext is the same as DeregisterJobDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeregisterJobDefinition for details on how to use this API operation. +// +// 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 *Batch) DeregisterJobDefinitionWithContext(ctx aws.Context, input *DeregisterJobDefinitionInput, opts ...request.Option) (*DeregisterJobDefinitionOutput, error) { + req, out := c.DeregisterJobDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeComputeEnvironments = "DescribeComputeEnvironments" + +// DescribeComputeEnvironmentsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeComputeEnvironments operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeComputeEnvironments for more information on using the DescribeComputeEnvironments +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeComputeEnvironmentsRequest method. +// req, resp := client.DescribeComputeEnvironmentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironments +func (c *Batch) DescribeComputeEnvironmentsRequest(input *DescribeComputeEnvironmentsInput) (req *request.Request, output *DescribeComputeEnvironmentsOutput) { + op := &request.Operation{ + Name: opDescribeComputeEnvironments, + HTTPMethod: "POST", + HTTPPath: "/v1/describecomputeenvironments", + } + + if input == nil { + input = &DescribeComputeEnvironmentsInput{} + } + + output = &DescribeComputeEnvironmentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeComputeEnvironments API operation for AWS Batch. +// +// Describes one or more of your compute environments. +// +// If you are using an unmanaged compute environment, you can use the DescribeComputeEnvironment +// operation to determine the ecsClusterArn that you should launch your Amazon +// ECS container instances into. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation DescribeComputeEnvironments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironments +func (c *Batch) DescribeComputeEnvironments(input *DescribeComputeEnvironmentsInput) (*DescribeComputeEnvironmentsOutput, error) { + req, out := c.DescribeComputeEnvironmentsRequest(input) + return out, req.Send() +} + +// DescribeComputeEnvironmentsWithContext is the same as DescribeComputeEnvironments with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeComputeEnvironments for details on how to use this API operation. +// +// 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 *Batch) DescribeComputeEnvironmentsWithContext(ctx aws.Context, input *DescribeComputeEnvironmentsInput, opts ...request.Option) (*DescribeComputeEnvironmentsOutput, error) { + req, out := c.DescribeComputeEnvironmentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeJobDefinitions = "DescribeJobDefinitions" + +// DescribeJobDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeJobDefinitions operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeJobDefinitions for more information on using the DescribeJobDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeJobDefinitionsRequest method. +// req, resp := client.DescribeJobDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitions +func (c *Batch) DescribeJobDefinitionsRequest(input *DescribeJobDefinitionsInput) (req *request.Request, output *DescribeJobDefinitionsOutput) { + op := &request.Operation{ + Name: opDescribeJobDefinitions, + HTTPMethod: "POST", + HTTPPath: "/v1/describejobdefinitions", + } + + if input == nil { + input = &DescribeJobDefinitionsInput{} + } + + output = &DescribeJobDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeJobDefinitions API operation for AWS Batch. +// +// Describes a list of job definitions. You can specify a status (such as ACTIVE) +// to only return job definitions that match that status. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation DescribeJobDefinitions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitions +func (c *Batch) DescribeJobDefinitions(input *DescribeJobDefinitionsInput) (*DescribeJobDefinitionsOutput, error) { + req, out := c.DescribeJobDefinitionsRequest(input) + return out, req.Send() +} + +// DescribeJobDefinitionsWithContext is the same as DescribeJobDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeJobDefinitions for details on how to use this API operation. +// +// 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 *Batch) DescribeJobDefinitionsWithContext(ctx aws.Context, input *DescribeJobDefinitionsInput, opts ...request.Option) (*DescribeJobDefinitionsOutput, error) { + req, out := c.DescribeJobDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeJobQueues = "DescribeJobQueues" + +// DescribeJobQueuesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeJobQueues operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeJobQueues for more information on using the DescribeJobQueues +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeJobQueuesRequest method. +// req, resp := client.DescribeJobQueuesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueues +func (c *Batch) DescribeJobQueuesRequest(input *DescribeJobQueuesInput) (req *request.Request, output *DescribeJobQueuesOutput) { + op := &request.Operation{ + Name: opDescribeJobQueues, + HTTPMethod: "POST", + HTTPPath: "/v1/describejobqueues", + } + + if input == nil { + input = &DescribeJobQueuesInput{} + } + + output = &DescribeJobQueuesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeJobQueues API operation for AWS Batch. +// +// Describes one or more of your job queues. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation DescribeJobQueues for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueues +func (c *Batch) DescribeJobQueues(input *DescribeJobQueuesInput) (*DescribeJobQueuesOutput, error) { + req, out := c.DescribeJobQueuesRequest(input) + return out, req.Send() +} + +// DescribeJobQueuesWithContext is the same as DescribeJobQueues with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeJobQueues for details on how to use this API operation. +// +// 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 *Batch) DescribeJobQueuesWithContext(ctx aws.Context, input *DescribeJobQueuesInput, opts ...request.Option) (*DescribeJobQueuesOutput, error) { + req, out := c.DescribeJobQueuesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeJobs = "DescribeJobs" + +// DescribeJobsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeJobs operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeJobs for more information on using the DescribeJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeJobsRequest method. +// req, resp := client.DescribeJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobs +func (c *Batch) DescribeJobsRequest(input *DescribeJobsInput) (req *request.Request, output *DescribeJobsOutput) { + op := &request.Operation{ + Name: opDescribeJobs, + HTTPMethod: "POST", + HTTPPath: "/v1/describejobs", + } + + if input == nil { + input = &DescribeJobsInput{} + } + + output = &DescribeJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeJobs API operation for AWS Batch. +// +// Describes a list of AWS Batch jobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation DescribeJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobs +func (c *Batch) DescribeJobs(input *DescribeJobsInput) (*DescribeJobsOutput, error) { + req, out := c.DescribeJobsRequest(input) + return out, req.Send() +} + +// DescribeJobsWithContext is the same as DescribeJobs with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeJobs for details on how to use this API operation. +// +// 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 *Batch) DescribeJobsWithContext(ctx aws.Context, input *DescribeJobsInput, opts ...request.Option) (*DescribeJobsOutput, error) { + req, out := c.DescribeJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListJobs = "ListJobs" + +// ListJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListJobs operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListJobs for more information on using the ListJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListJobsRequest method. +// req, resp := client.ListJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobs +func (c *Batch) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) { + op := &request.Operation{ + Name: opListJobs, + HTTPMethod: "POST", + HTTPPath: "/v1/listjobs", + } + + if input == nil { + input = &ListJobsInput{} + } + + output = &ListJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListJobs API operation for AWS Batch. +// +// Returns a list of task jobs for a specified job queue. You can filter the +// results by job status with the jobStatus parameter. If you do not specify +// a status, only RUNNING jobs are returned. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation ListJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobs +func (c *Batch) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) { + req, out := c.ListJobsRequest(input) + return out, req.Send() +} + +// ListJobsWithContext is the same as ListJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListJobs for details on how to use this API operation. +// +// 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 *Batch) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error) { + req, out := c.ListJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterJobDefinition = "RegisterJobDefinition" + +// RegisterJobDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the RegisterJobDefinition operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterJobDefinition for more information on using the RegisterJobDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RegisterJobDefinitionRequest method. +// req, resp := client.RegisterJobDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinition +func (c *Batch) RegisterJobDefinitionRequest(input *RegisterJobDefinitionInput) (req *request.Request, output *RegisterJobDefinitionOutput) { + op := &request.Operation{ + Name: opRegisterJobDefinition, + HTTPMethod: "POST", + HTTPPath: "/v1/registerjobdefinition", + } + + if input == nil { + input = &RegisterJobDefinitionInput{} + } + + output = &RegisterJobDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterJobDefinition API operation for AWS Batch. +// +// Registers an AWS Batch job definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation RegisterJobDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinition +func (c *Batch) RegisterJobDefinition(input *RegisterJobDefinitionInput) (*RegisterJobDefinitionOutput, error) { + req, out := c.RegisterJobDefinitionRequest(input) + return out, req.Send() +} + +// RegisterJobDefinitionWithContext is the same as RegisterJobDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterJobDefinition for details on how to use this API operation. +// +// 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 *Batch) RegisterJobDefinitionWithContext(ctx aws.Context, input *RegisterJobDefinitionInput, opts ...request.Option) (*RegisterJobDefinitionOutput, error) { + req, out := c.RegisterJobDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSubmitJob = "SubmitJob" + +// SubmitJobRequest generates a "aws/request.Request" representing the +// client's request for the SubmitJob operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SubmitJob for more information on using the SubmitJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SubmitJobRequest method. +// req, resp := client.SubmitJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJob +func (c *Batch) SubmitJobRequest(input *SubmitJobInput) (req *request.Request, output *SubmitJobOutput) { + op := &request.Operation{ + Name: opSubmitJob, + HTTPMethod: "POST", + HTTPPath: "/v1/submitjob", + } + + if input == nil { + input = &SubmitJobInput{} + } + + output = &SubmitJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// SubmitJob API operation for AWS Batch. +// +// Submits an AWS Batch job from a job definition. Parameters specified during +// SubmitJob override parameters defined in the job definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation SubmitJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJob +func (c *Batch) SubmitJob(input *SubmitJobInput) (*SubmitJobOutput, error) { + req, out := c.SubmitJobRequest(input) + return out, req.Send() +} + +// SubmitJobWithContext is the same as SubmitJob with the addition of +// the ability to pass a context and additional request options. +// +// See SubmitJob for details on how to use this API operation. +// +// 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 *Batch) SubmitJobWithContext(ctx aws.Context, input *SubmitJobInput, opts ...request.Option) (*SubmitJobOutput, error) { + req, out := c.SubmitJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTerminateJob = "TerminateJob" + +// TerminateJobRequest generates a "aws/request.Request" representing the +// client's request for the TerminateJob operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TerminateJob for more information on using the TerminateJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TerminateJobRequest method. +// req, resp := client.TerminateJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJob +func (c *Batch) TerminateJobRequest(input *TerminateJobInput) (req *request.Request, output *TerminateJobOutput) { + op := &request.Operation{ + Name: opTerminateJob, + HTTPMethod: "POST", + HTTPPath: "/v1/terminatejob", + } + + if input == nil { + input = &TerminateJobInput{} + } + + output = &TerminateJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// TerminateJob API operation for AWS Batch. +// +// Terminates a job in a job queue. Jobs that are in the STARTING or RUNNING +// state are terminated, which causes them to transition to FAILED. Jobs that +// have not progressed to the STARTING state are cancelled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation TerminateJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJob +func (c *Batch) TerminateJob(input *TerminateJobInput) (*TerminateJobOutput, error) { + req, out := c.TerminateJobRequest(input) + return out, req.Send() +} + +// TerminateJobWithContext is the same as TerminateJob with the addition of +// the ability to pass a context and additional request options. +// +// See TerminateJob for details on how to use this API operation. +// +// 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 *Batch) TerminateJobWithContext(ctx aws.Context, input *TerminateJobInput, opts ...request.Option) (*TerminateJobOutput, error) { + req, out := c.TerminateJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateComputeEnvironment = "UpdateComputeEnvironment" + +// UpdateComputeEnvironmentRequest generates a "aws/request.Request" representing the +// client's request for the UpdateComputeEnvironment operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateComputeEnvironment for more information on using the UpdateComputeEnvironment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateComputeEnvironmentRequest method. +// req, resp := client.UpdateComputeEnvironmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironment +func (c *Batch) UpdateComputeEnvironmentRequest(input *UpdateComputeEnvironmentInput) (req *request.Request, output *UpdateComputeEnvironmentOutput) { + op := &request.Operation{ + Name: opUpdateComputeEnvironment, + HTTPMethod: "POST", + HTTPPath: "/v1/updatecomputeenvironment", + } + + if input == nil { + input = &UpdateComputeEnvironmentInput{} + } + + output = &UpdateComputeEnvironmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateComputeEnvironment API operation for AWS Batch. +// +// Updates an AWS Batch compute environment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation UpdateComputeEnvironment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironment +func (c *Batch) UpdateComputeEnvironment(input *UpdateComputeEnvironmentInput) (*UpdateComputeEnvironmentOutput, error) { + req, out := c.UpdateComputeEnvironmentRequest(input) + return out, req.Send() +} + +// UpdateComputeEnvironmentWithContext is the same as UpdateComputeEnvironment with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateComputeEnvironment for details on how to use this API operation. +// +// 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 *Batch) UpdateComputeEnvironmentWithContext(ctx aws.Context, input *UpdateComputeEnvironmentInput, opts ...request.Option) (*UpdateComputeEnvironmentOutput, error) { + req, out := c.UpdateComputeEnvironmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateJobQueue = "UpdateJobQueue" + +// UpdateJobQueueRequest generates a "aws/request.Request" representing the +// client's request for the UpdateJobQueue operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateJobQueue for more information on using the UpdateJobQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateJobQueueRequest method. +// req, resp := client.UpdateJobQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueue +func (c *Batch) UpdateJobQueueRequest(input *UpdateJobQueueInput) (req *request.Request, output *UpdateJobQueueOutput) { + op := &request.Operation{ + Name: opUpdateJobQueue, + HTTPMethod: "POST", + HTTPPath: "/v1/updatejobqueue", + } + + if input == nil { + input = &UpdateJobQueueInput{} + } + + output = &UpdateJobQueueOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateJobQueue API operation for AWS Batch. +// +// Updates a job queue. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Batch's +// API operation UpdateJobQueue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClientException "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. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueue +func (c *Batch) UpdateJobQueue(input *UpdateJobQueueInput) (*UpdateJobQueueOutput, error) { + req, out := c.UpdateJobQueueRequest(input) + return out, req.Send() +} + +// UpdateJobQueueWithContext is the same as UpdateJobQueue with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateJobQueue for details on how to use this API operation. +// +// 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 *Batch) UpdateJobQueueWithContext(ctx aws.Context, input *UpdateJobQueueInput, opts ...request.Option) (*UpdateJobQueueOutput, error) { + req, out := c.UpdateJobQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// An object representing the details of a container that is part of a job attempt. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/AttemptContainerDetail +type AttemptContainerDetail struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon ECS container instance that + // hosts the job attempt. + ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` + + // The exit code for the job attempt. A non-zero exit code is considered a failure. + ExitCode *int64 `locationName:"exitCode" type:"integer"` + + // The name of the CloudWatch Logs log stream associated with the container. + // The log group for AWS Batch jobs is /aws/batch/job. Each container attempt + // receives a log stream name when they reach the RUNNING status. + LogStreamName *string `locationName:"logStreamName" type:"string"` + + // A short (255 max characters) human-readable string to provide additional + // details about a running or stopped container. + Reason *string `locationName:"reason" type:"string"` + + // The Amazon Resource Name (ARN) of the Amazon ECS task that is associated + // with the job attempt. Each container attempt receives a task ARN when they + // reach the STARTING status. + TaskArn *string `locationName:"taskArn" type:"string"` +} + +// String returns the string representation +func (s AttemptContainerDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttemptContainerDetail) GoString() string { + return s.String() +} + +// SetContainerInstanceArn sets the ContainerInstanceArn field's value. +func (s *AttemptContainerDetail) SetContainerInstanceArn(v string) *AttemptContainerDetail { + s.ContainerInstanceArn = &v + return s +} + +// SetExitCode sets the ExitCode field's value. +func (s *AttemptContainerDetail) SetExitCode(v int64) *AttemptContainerDetail { + s.ExitCode = &v + return s +} + +// SetLogStreamName sets the LogStreamName field's value. +func (s *AttemptContainerDetail) SetLogStreamName(v string) *AttemptContainerDetail { + s.LogStreamName = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *AttemptContainerDetail) SetReason(v string) *AttemptContainerDetail { + s.Reason = &v + return s +} + +// SetTaskArn sets the TaskArn field's value. +func (s *AttemptContainerDetail) SetTaskArn(v string) *AttemptContainerDetail { + s.TaskArn = &v + return s +} + +// An object representing a job attempt. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/AttemptDetail +type AttemptDetail struct { + _ struct{} `type:"structure"` + + // Details about the container in this job attempt. + Container *AttemptContainerDetail `locationName:"container" type:"structure"` + + // The Unix timestamp for when the attempt was started (when the task transitioned + // from the PENDING state to the RUNNING state). + StartedAt *int64 `locationName:"startedAt" type:"long"` + + // A short, human-readable string to provide additional details about the current + // status of the job attempt. + StatusReason *string `locationName:"statusReason" type:"string"` + + // The Unix timestamp for when the attempt was stopped (when the task transitioned + // from the RUNNING state to the STOPPED state). + StoppedAt *int64 `locationName:"stoppedAt" type:"long"` +} + +// String returns the string representation +func (s AttemptDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttemptDetail) GoString() string { + return s.String() +} + +// SetContainer sets the Container field's value. +func (s *AttemptDetail) SetContainer(v *AttemptContainerDetail) *AttemptDetail { + s.Container = v + return s +} + +// SetStartedAt sets the StartedAt field's value. +func (s *AttemptDetail) SetStartedAt(v int64) *AttemptDetail { + s.StartedAt = &v + return s +} + +// SetStatusReason sets the StatusReason field's value. +func (s *AttemptDetail) SetStatusReason(v string) *AttemptDetail { + s.StatusReason = &v + return s +} + +// SetStoppedAt sets the StoppedAt field's value. +func (s *AttemptDetail) SetStoppedAt(v int64) *AttemptDetail { + s.StoppedAt = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJobRequest +type CancelJobInput struct { + _ struct{} `type:"structure"` + + // The AWS Batch job ID of the job to cancel. + // + // JobId is a required field + JobId *string `locationName:"jobId" type:"string" required:"true"` + + // A message to attach to the job that explains the reason for cancelling it. + // This message is returned by future DescribeJobs operations on the job. This + // message is also recorded in the AWS Batch activity logs. + // + // Reason is a required field + Reason *string `locationName:"reason" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelJobInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.Reason == nil { + invalidParams.Add(request.NewErrParamRequired("Reason")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobId sets the JobId field's value. +func (s *CancelJobInput) SetJobId(v string) *CancelJobInput { + s.JobId = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *CancelJobInput) SetReason(v string) *CancelJobInput { + s.Reason = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJobResponse +type CancelJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CancelJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelJobOutput) GoString() string { + return s.String() +} + +// An object representing an AWS Batch compute environment. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ComputeEnvironmentDetail +type ComputeEnvironmentDetail struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the compute environment. + // + // ComputeEnvironmentArn is a required field + ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string" required:"true"` + + // The name of the compute environment. + // + // ComputeEnvironmentName is a required field + ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string" required:"true"` + + // The compute resources defined for the compute environment. + ComputeResources *ComputeResource `locationName:"computeResources" type:"structure"` + + // The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used + // by the compute environment. + // + // EcsClusterArn is a required field + EcsClusterArn *string `locationName:"ecsClusterArn" type:"string" required:"true"` + + // The service role associated with the compute environment that allows AWS + // Batch to make calls to AWS API operations on your behalf. + ServiceRole *string `locationName:"serviceRole" type:"string"` + + // The state of the compute environment. The valid values are ENABLED or DISABLED. + // An ENABLED state indicates that you can register instances with the compute + // environment and that the associated instances can accept jobs. + State *string `locationName:"state" type:"string" enum:"CEState"` + + // The current status of the compute environment (for example, CREATING or VALID). + Status *string `locationName:"status" type:"string" enum:"CEStatus"` + + // A short, human-readable string to provide additional details about the current + // status of the compute environment. + StatusReason *string `locationName:"statusReason" type:"string"` + + // The type of the compute environment. + Type *string `locationName:"type" type:"string" enum:"CEType"` +} + +// String returns the string representation +func (s ComputeEnvironmentDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ComputeEnvironmentDetail) GoString() string { + return s.String() +} + +// SetComputeEnvironmentArn sets the ComputeEnvironmentArn field's value. +func (s *ComputeEnvironmentDetail) SetComputeEnvironmentArn(v string) *ComputeEnvironmentDetail { + s.ComputeEnvironmentArn = &v + return s +} + +// SetComputeEnvironmentName sets the ComputeEnvironmentName field's value. +func (s *ComputeEnvironmentDetail) SetComputeEnvironmentName(v string) *ComputeEnvironmentDetail { + s.ComputeEnvironmentName = &v + return s +} + +// SetComputeResources sets the ComputeResources field's value. +func (s *ComputeEnvironmentDetail) SetComputeResources(v *ComputeResource) *ComputeEnvironmentDetail { + s.ComputeResources = v + return s +} + +// SetEcsClusterArn sets the EcsClusterArn field's value. +func (s *ComputeEnvironmentDetail) SetEcsClusterArn(v string) *ComputeEnvironmentDetail { + s.EcsClusterArn = &v + return s +} + +// SetServiceRole sets the ServiceRole field's value. +func (s *ComputeEnvironmentDetail) SetServiceRole(v string) *ComputeEnvironmentDetail { + s.ServiceRole = &v + return s +} + +// SetState sets the State field's value. +func (s *ComputeEnvironmentDetail) SetState(v string) *ComputeEnvironmentDetail { + s.State = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ComputeEnvironmentDetail) SetStatus(v string) *ComputeEnvironmentDetail { + s.Status = &v + return s +} + +// SetStatusReason sets the StatusReason field's value. +func (s *ComputeEnvironmentDetail) SetStatusReason(v string) *ComputeEnvironmentDetail { + s.StatusReason = &v + return s +} + +// SetType sets the Type field's value. +func (s *ComputeEnvironmentDetail) SetType(v string) *ComputeEnvironmentDetail { + s.Type = &v + return s +} + +// The order in which compute environments are tried for job placement within +// a queue. Compute environments are tried in ascending order. For example, +// if two compute environments are associated with a job queue, the compute +// environment with a lower order integer value is tried for job placement first. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ComputeEnvironmentOrder +type ComputeEnvironmentOrder struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the compute environment. + // + // ComputeEnvironment is a required field + ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"` + + // The order of the compute environment. + // + // Order is a required field + Order *int64 `locationName:"order" type:"integer" required:"true"` +} + +// String returns the string representation +func (s ComputeEnvironmentOrder) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ComputeEnvironmentOrder) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ComputeEnvironmentOrder) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ComputeEnvironmentOrder"} + if s.ComputeEnvironment == nil { + invalidParams.Add(request.NewErrParamRequired("ComputeEnvironment")) + } + if s.Order == nil { + invalidParams.Add(request.NewErrParamRequired("Order")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComputeEnvironment sets the ComputeEnvironment field's value. +func (s *ComputeEnvironmentOrder) SetComputeEnvironment(v string) *ComputeEnvironmentOrder { + s.ComputeEnvironment = &v + return s +} + +// SetOrder sets the Order field's value. +func (s *ComputeEnvironmentOrder) SetOrder(v int64) *ComputeEnvironmentOrder { + s.Order = &v + return s +} + +// An object representing an AWS Batch compute resource. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ComputeResource +type ComputeResource struct { + _ struct{} `type:"structure"` + + // The minimum percentage that a Spot Instance price must be when compared with + // the On-Demand price for that instance type before instances are launched. + // For example, if your bid percentage is 20%, then the Spot price must be below + // 20% of the current On-Demand price for that EC2 instance. + BidPercentage *int64 `locationName:"bidPercentage" type:"integer"` + + // The desired number of EC2 vCPUS in the compute environment. + DesiredvCpus *int64 `locationName:"desiredvCpus" type:"integer"` + + // The EC2 key pair that is used for instances launched in the compute environment. + Ec2KeyPair *string `locationName:"ec2KeyPair" type:"string"` + + // The Amazon Machine Image (AMI) ID used for instances launched in the compute + // environment. + ImageId *string `locationName:"imageId" type:"string"` + + // The Amazon ECS instance profile applied to Amazon EC2 instances in a compute + // environment. You can specify the short name or full Amazon Resource Name + // (ARN) of an instance profile. For example, ecsInstanceRole or arn:aws:iam:::instance-profile/ecsInstanceRole. + // For more information, see Amazon ECS Instance Role (http://docs.aws.amazon.com/batch/latest/userguide/instance_IAM_role.html) + // in the AWS Batch User Guide. + // + // InstanceRole is a required field + InstanceRole *string `locationName:"instanceRole" type:"string" required:"true"` + + // The instances types that may be launched. You can specify instance families + // to launch any instance type within those families (for example, c4 or p3), + // or you can specify specific sizes within a family (such as c4.8xlarge). You + // can also choose optimal to pick instance types (from the latest C, M, and + // R instance families) on the fly that match the demand of your job queues. + // + // InstanceTypes is a required field + InstanceTypes []*string `locationName:"instanceTypes" type:"list" required:"true"` + + // The maximum number of EC2 vCPUs that an environment can reach. + // + // MaxvCpus is a required field + MaxvCpus *int64 `locationName:"maxvCpus" type:"integer" required:"true"` + + // The minimum number of EC2 vCPUs that an environment should maintain. + // + // MinvCpus is a required field + MinvCpus *int64 `locationName:"minvCpus" type:"integer" required:"true"` + + // The EC2 security group that is associated with instances launched in the + // compute environment. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied + // to a SPOT compute environment. + SpotIamFleetRole *string `locationName:"spotIamFleetRole" type:"string"` + + // The VPC subnets into which the compute resources are launched. + // + // Subnets is a required field + Subnets []*string `locationName:"subnets" type:"list" required:"true"` + + // Key-value pair tags to be applied to resources that are launched in the compute + // environment. + Tags map[string]*string `locationName:"tags" type:"map"` + + // The type of compute environment. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"CRType"` +} + +// String returns the string representation +func (s ComputeResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ComputeResource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ComputeResource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ComputeResource"} + if s.InstanceRole == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceRole")) + } + if s.InstanceTypes == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceTypes")) + } + if s.MaxvCpus == nil { + invalidParams.Add(request.NewErrParamRequired("MaxvCpus")) + } + if s.MinvCpus == nil { + invalidParams.Add(request.NewErrParamRequired("MinvCpus")) + } + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBidPercentage sets the BidPercentage field's value. +func (s *ComputeResource) SetBidPercentage(v int64) *ComputeResource { + s.BidPercentage = &v + return s +} + +// SetDesiredvCpus sets the DesiredvCpus field's value. +func (s *ComputeResource) SetDesiredvCpus(v int64) *ComputeResource { + s.DesiredvCpus = &v + return s +} + +// SetEc2KeyPair sets the Ec2KeyPair field's value. +func (s *ComputeResource) SetEc2KeyPair(v string) *ComputeResource { + s.Ec2KeyPair = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *ComputeResource) SetImageId(v string) *ComputeResource { + s.ImageId = &v + return s +} + +// SetInstanceRole sets the InstanceRole field's value. +func (s *ComputeResource) SetInstanceRole(v string) *ComputeResource { + s.InstanceRole = &v + return s +} + +// SetInstanceTypes sets the InstanceTypes field's value. +func (s *ComputeResource) SetInstanceTypes(v []*string) *ComputeResource { + s.InstanceTypes = v + return s +} + +// SetMaxvCpus sets the MaxvCpus field's value. +func (s *ComputeResource) SetMaxvCpus(v int64) *ComputeResource { + s.MaxvCpus = &v + return s +} + +// SetMinvCpus sets the MinvCpus field's value. +func (s *ComputeResource) SetMinvCpus(v int64) *ComputeResource { + s.MinvCpus = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *ComputeResource) SetSecurityGroupIds(v []*string) *ComputeResource { + s.SecurityGroupIds = v + return s +} + +// SetSpotIamFleetRole sets the SpotIamFleetRole field's value. +func (s *ComputeResource) SetSpotIamFleetRole(v string) *ComputeResource { + s.SpotIamFleetRole = &v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *ComputeResource) SetSubnets(v []*string) *ComputeResource { + s.Subnets = v + return s +} + +// SetTags sets the Tags field's value. +func (s *ComputeResource) SetTags(v map[string]*string) *ComputeResource { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *ComputeResource) SetType(v string) *ComputeResource { + s.Type = &v + return s +} + +// An object representing the attributes of a compute environment that can be +// updated. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ComputeResourceUpdate +type ComputeResourceUpdate struct { + _ struct{} `type:"structure"` + + // The desired number of EC2 vCPUS in the compute environment. + DesiredvCpus *int64 `locationName:"desiredvCpus" type:"integer"` + + // The maximum number of EC2 vCPUs that an environment can reach. + MaxvCpus *int64 `locationName:"maxvCpus" type:"integer"` + + // The minimum number of EC2 vCPUs that an environment should maintain. + MinvCpus *int64 `locationName:"minvCpus" type:"integer"` +} + +// String returns the string representation +func (s ComputeResourceUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ComputeResourceUpdate) GoString() string { + return s.String() +} + +// SetDesiredvCpus sets the DesiredvCpus field's value. +func (s *ComputeResourceUpdate) SetDesiredvCpus(v int64) *ComputeResourceUpdate { + s.DesiredvCpus = &v + return s +} + +// SetMaxvCpus sets the MaxvCpus field's value. +func (s *ComputeResourceUpdate) SetMaxvCpus(v int64) *ComputeResourceUpdate { + s.MaxvCpus = &v + return s +} + +// SetMinvCpus sets the MinvCpus field's value. +func (s *ComputeResourceUpdate) SetMinvCpus(v int64) *ComputeResourceUpdate { + s.MinvCpus = &v + return s +} + +// An object representing the details of a container that is part of a job. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ContainerDetail +type ContainerDetail struct { + _ struct{} `type:"structure"` + + // The command that is passed to the container. + Command []*string `locationName:"command" type:"list"` + + // The Amazon Resource Name (ARN) of the container instance on which the container + // is running. + ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` + + // The environment variables to pass to a container. + // + // Environment variables must not start with AWS_BATCH; this naming convention + // is reserved for variables that are set by the AWS Batch service. + Environment []*KeyValuePair `locationName:"environment" type:"list"` + + // The exit code to return upon completion. + ExitCode *int64 `locationName:"exitCode" type:"integer"` + + // The image used to start the container. + Image *string `locationName:"image" type:"string"` + + // The Amazon Resource Name (ARN) associated with the job upon execution. + JobRoleArn *string `locationName:"jobRoleArn" type:"string"` + + // The name of the CloudWatch Logs log stream associated with the container. + // The log group for AWS Batch jobs is /aws/batch/job. Each container attempt + // receives a log stream name when they reach the RUNNING status. + LogStreamName *string `locationName:"logStreamName" type:"string"` + + // The number of MiB of memory reserved for the job. + Memory *int64 `locationName:"memory" type:"integer"` + + // The mount points for data volumes in your container. + MountPoints []*MountPoint `locationName:"mountPoints" type:"list"` + + // When this parameter is true, the container is given elevated privileges on + // the host container instance (similar to the root user). + Privileged *bool `locationName:"privileged" type:"boolean"` + + // When this parameter is true, the container is given read-only access to its + // root file system. + ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"` + + // A short (255 max characters) human-readable string to provide additional + // details about a running or stopped container. + Reason *string `locationName:"reason" type:"string"` + + // The Amazon Resource Name (ARN) of the Amazon ECS task that is associated + // with the container job. Each container attempt receives a task ARN when they + // reach the STARTING status. + TaskArn *string `locationName:"taskArn" type:"string"` + + // A list of ulimit values to set in the container. + Ulimits []*Ulimit `locationName:"ulimits" type:"list"` + + // The user name to use inside the container. + User *string `locationName:"user" type:"string"` + + // The number of VCPUs allocated for the job. + Vcpus *int64 `locationName:"vcpus" type:"integer"` + + // A list of volumes associated with the job. + Volumes []*Volume `locationName:"volumes" type:"list"` +} + +// String returns the string representation +func (s ContainerDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContainerDetail) GoString() string { + return s.String() +} + +// SetCommand sets the Command field's value. +func (s *ContainerDetail) SetCommand(v []*string) *ContainerDetail { + s.Command = v + return s +} + +// SetContainerInstanceArn sets the ContainerInstanceArn field's value. +func (s *ContainerDetail) SetContainerInstanceArn(v string) *ContainerDetail { + s.ContainerInstanceArn = &v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *ContainerDetail) SetEnvironment(v []*KeyValuePair) *ContainerDetail { + s.Environment = v + return s +} + +// SetExitCode sets the ExitCode field's value. +func (s *ContainerDetail) SetExitCode(v int64) *ContainerDetail { + s.ExitCode = &v + return s +} + +// SetImage sets the Image field's value. +func (s *ContainerDetail) SetImage(v string) *ContainerDetail { + s.Image = &v + return s +} + +// SetJobRoleArn sets the JobRoleArn field's value. +func (s *ContainerDetail) SetJobRoleArn(v string) *ContainerDetail { + s.JobRoleArn = &v + return s +} + +// SetLogStreamName sets the LogStreamName field's value. +func (s *ContainerDetail) SetLogStreamName(v string) *ContainerDetail { + s.LogStreamName = &v + return s +} + +// SetMemory sets the Memory field's value. +func (s *ContainerDetail) SetMemory(v int64) *ContainerDetail { + s.Memory = &v + return s +} + +// SetMountPoints sets the MountPoints field's value. +func (s *ContainerDetail) SetMountPoints(v []*MountPoint) *ContainerDetail { + s.MountPoints = v + return s +} + +// SetPrivileged sets the Privileged field's value. +func (s *ContainerDetail) SetPrivileged(v bool) *ContainerDetail { + s.Privileged = &v + return s +} + +// SetReadonlyRootFilesystem sets the ReadonlyRootFilesystem field's value. +func (s *ContainerDetail) SetReadonlyRootFilesystem(v bool) *ContainerDetail { + s.ReadonlyRootFilesystem = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *ContainerDetail) SetReason(v string) *ContainerDetail { + s.Reason = &v + return s +} + +// SetTaskArn sets the TaskArn field's value. +func (s *ContainerDetail) SetTaskArn(v string) *ContainerDetail { + s.TaskArn = &v + return s +} + +// SetUlimits sets the Ulimits field's value. +func (s *ContainerDetail) SetUlimits(v []*Ulimit) *ContainerDetail { + s.Ulimits = v + return s +} + +// SetUser sets the User field's value. +func (s *ContainerDetail) SetUser(v string) *ContainerDetail { + s.User = &v + return s +} + +// SetVcpus sets the Vcpus field's value. +func (s *ContainerDetail) SetVcpus(v int64) *ContainerDetail { + s.Vcpus = &v + return s +} + +// SetVolumes sets the Volumes field's value. +func (s *ContainerDetail) SetVolumes(v []*Volume) *ContainerDetail { + s.Volumes = v + return s +} + +// The overrides that should be sent to a container. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ContainerOverrides +type ContainerOverrides struct { + _ struct{} `type:"structure"` + + // The command to send to the container that overrides the default command from + // the Docker image or the job definition. + Command []*string `locationName:"command" type:"list"` + + // The environment variables to send to the container. You can add new environment + // variables, which are added to the container at launch, or you can override + // the existing environment variables from the Docker image or the job definition. + // + // Environment variables must not start with AWS_BATCH; this naming convention + // is reserved for variables that are set by the AWS Batch service. + Environment []*KeyValuePair `locationName:"environment" type:"list"` + + // The number of MiB of memory reserved for the job. This value overrides the + // value set in the job definition. + Memory *int64 `locationName:"memory" type:"integer"` + + // The number of vCPUs to reserve for the container. This value overrides the + // value set in the job definition. + Vcpus *int64 `locationName:"vcpus" type:"integer"` +} + +// String returns the string representation +func (s ContainerOverrides) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContainerOverrides) GoString() string { + return s.String() +} + +// SetCommand sets the Command field's value. +func (s *ContainerOverrides) SetCommand(v []*string) *ContainerOverrides { + s.Command = v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *ContainerOverrides) SetEnvironment(v []*KeyValuePair) *ContainerOverrides { + s.Environment = v + return s +} + +// SetMemory sets the Memory field's value. +func (s *ContainerOverrides) SetMemory(v int64) *ContainerOverrides { + s.Memory = &v + return s +} + +// SetVcpus sets the Vcpus field's value. +func (s *ContainerOverrides) SetVcpus(v int64) *ContainerOverrides { + s.Vcpus = &v + return s +} + +// Container properties are used in job definitions to describe the container +// that is launched as part of a job. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ContainerProperties +type ContainerProperties struct { + _ struct{} `type:"structure"` + + // The command that is passed to the container. This parameter maps to Cmd in + // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/). + // For more information, see https://docs.docker.com/engine/reference/builder/#cmd + // (https://docs.docker.com/engine/reference/builder/#cmd). + Command []*string `locationName:"command" type:"list"` + + // The environment variables to pass to a container. This parameter maps to + // Env in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the --env option to docker run (https://docs.docker.com/engine/reference/run/). + // + // We do not recommend using plain text environment variables for sensitive + // information, such as credential data. + // + // Environment variables must not start with AWS_BATCH; this naming convention + // is reserved for variables that are set by the AWS Batch service. + Environment []*KeyValuePair `locationName:"environment" type:"list"` + + // The image used to start a container. This string is passed directly to the + // Docker daemon. Images in the Docker Hub registry are available by default. + // Other repositories are specified with repository-url/image:tag. Up to 255 + // letters (uppercase and lowercase), numbers, hyphens, underscores, colons, + // periods, forward slashes, and number signs are allowed. This parameter maps + // to Image in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/). + // + // * Images in Amazon ECR repositories use the full registry and repository + // URI (for example, 012345678910.dkr.ecr..amazonaws.com/). + // + // + // * Images in official repositories on Docker Hub use a single name (for + // example, ubuntu or mongo). + // + // * Images in other repositories on Docker Hub are qualified with an organization + // name (for example, amazon/amazon-ecs-agent). + // + // * Images in other online repositories are qualified further by a domain + // name (for example, quay.io/assemblyline/ubuntu). + // + // Image is a required field + Image *string `locationName:"image" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role that the container can assume + // for AWS permissions. + JobRoleArn *string `locationName:"jobRoleArn" type:"string"` + + // The hard limit (in MiB) of memory to present to the container. If your container + // attempts to exceed the memory specified here, the container is killed. This + // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/). + // You must specify at least 4 MiB of memory for a job. + // + // Memory is a required field + Memory *int64 `locationName:"memory" type:"integer" required:"true"` + + // The mount points for data volumes in your container. This parameter maps + // to Volumes in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the --volume option to docker run (https://docs.docker.com/engine/reference/run/). + MountPoints []*MountPoint `locationName:"mountPoints" type:"list"` + + // When this parameter is true, the container is given elevated privileges on + // the host container instance (similar to the root user). This parameter maps + // to Privileged in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/). + Privileged *bool `locationName:"privileged" type:"boolean"` + + // When this parameter is true, the container is given read-only access to its + // root file system. This parameter maps to ReadonlyRootfs in the Create a container + // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the --read-only option to docker run. + ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"` + + // A list of ulimits to set in the container. This parameter maps to Ulimits + // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/). + Ulimits []*Ulimit `locationName:"ulimits" type:"list"` + + // The user name to use inside the container. This parameter maps to User in + // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the --user option to docker run (https://docs.docker.com/engine/reference/run/). + User *string `locationName:"user" type:"string"` + + // The number of vCPUs reserved for the container. This parameter maps to CpuShares + // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/). + // Each vCPU is equivalent to 1,024 CPU shares. You must specify at least 1 + // vCPU. + // + // Vcpus is a required field + Vcpus *int64 `locationName:"vcpus" type:"integer" required:"true"` + + // A list of data volumes used in a job. + Volumes []*Volume `locationName:"volumes" type:"list"` +} + +// String returns the string representation +func (s ContainerProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContainerProperties) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContainerProperties) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContainerProperties"} + if s.Image == nil { + invalidParams.Add(request.NewErrParamRequired("Image")) + } + if s.Memory == nil { + invalidParams.Add(request.NewErrParamRequired("Memory")) + } + if s.Vcpus == nil { + invalidParams.Add(request.NewErrParamRequired("Vcpus")) + } + if s.Ulimits != nil { + for i, v := range s.Ulimits { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Ulimits", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCommand sets the Command field's value. +func (s *ContainerProperties) SetCommand(v []*string) *ContainerProperties { + s.Command = v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *ContainerProperties) SetEnvironment(v []*KeyValuePair) *ContainerProperties { + s.Environment = v + return s +} + +// SetImage sets the Image field's value. +func (s *ContainerProperties) SetImage(v string) *ContainerProperties { + s.Image = &v + return s +} + +// SetJobRoleArn sets the JobRoleArn field's value. +func (s *ContainerProperties) SetJobRoleArn(v string) *ContainerProperties { + s.JobRoleArn = &v + return s +} + +// SetMemory sets the Memory field's value. +func (s *ContainerProperties) SetMemory(v int64) *ContainerProperties { + s.Memory = &v + return s +} + +// SetMountPoints sets the MountPoints field's value. +func (s *ContainerProperties) SetMountPoints(v []*MountPoint) *ContainerProperties { + s.MountPoints = v + return s +} + +// SetPrivileged sets the Privileged field's value. +func (s *ContainerProperties) SetPrivileged(v bool) *ContainerProperties { + s.Privileged = &v + return s +} + +// SetReadonlyRootFilesystem sets the ReadonlyRootFilesystem field's value. +func (s *ContainerProperties) SetReadonlyRootFilesystem(v bool) *ContainerProperties { + s.ReadonlyRootFilesystem = &v + return s +} + +// SetUlimits sets the Ulimits field's value. +func (s *ContainerProperties) SetUlimits(v []*Ulimit) *ContainerProperties { + s.Ulimits = v + return s +} + +// SetUser sets the User field's value. +func (s *ContainerProperties) SetUser(v string) *ContainerProperties { + s.User = &v + return s +} + +// SetVcpus sets the Vcpus field's value. +func (s *ContainerProperties) SetVcpus(v int64) *ContainerProperties { + s.Vcpus = &v + return s +} + +// SetVolumes sets the Volumes field's value. +func (s *ContainerProperties) SetVolumes(v []*Volume) *ContainerProperties { + s.Volumes = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironmentRequest +type CreateComputeEnvironmentInput struct { + _ struct{} `type:"structure"` + + // The name for your compute environment. Up to 128 letters (uppercase and lowercase), + // numbers, hyphens, and underscores are allowed. + // + // ComputeEnvironmentName is a required field + ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string" required:"true"` + + // Details of the compute resources managed by the compute environment. This + // parameter is required for managed compute environments. + ComputeResources *ComputeResource `locationName:"computeResources" type:"structure"` + + // The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch + // to make calls to other AWS services on your behalf. + // + // If your specified role has a path other than /, then you must either specify + // the full role ARN (this is recommended) or prefix the role name with the + // path. + // + // Depending on how you created your AWS Batch service role, its ARN may contain + // the service-role path prefix. When you only specify the name of the service + // role, AWS Batch assumes that your ARN does not use the service-role path + // prefix. Because of this, we recommend that you specify the full ARN of your + // service role when you create compute environments. + // + // ServiceRole is a required field + ServiceRole *string `locationName:"serviceRole" type:"string" required:"true"` + + // The state of the compute environment. If the state is ENABLED, then the compute + // environment accepts jobs from a queue and can scale out automatically based + // on queues. + State *string `locationName:"state" type:"string" enum:"CEState"` + + // The type of the compute environment. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"CEType"` +} + +// String returns the string representation +func (s CreateComputeEnvironmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateComputeEnvironmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateComputeEnvironmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateComputeEnvironmentInput"} + if s.ComputeEnvironmentName == nil { + invalidParams.Add(request.NewErrParamRequired("ComputeEnvironmentName")) + } + if s.ServiceRole == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceRole")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.ComputeResources != nil { + if err := s.ComputeResources.Validate(); err != nil { + invalidParams.AddNested("ComputeResources", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComputeEnvironmentName sets the ComputeEnvironmentName field's value. +func (s *CreateComputeEnvironmentInput) SetComputeEnvironmentName(v string) *CreateComputeEnvironmentInput { + s.ComputeEnvironmentName = &v + return s +} + +// SetComputeResources sets the ComputeResources field's value. +func (s *CreateComputeEnvironmentInput) SetComputeResources(v *ComputeResource) *CreateComputeEnvironmentInput { + s.ComputeResources = v + return s +} + +// SetServiceRole sets the ServiceRole field's value. +func (s *CreateComputeEnvironmentInput) SetServiceRole(v string) *CreateComputeEnvironmentInput { + s.ServiceRole = &v + return s +} + +// SetState sets the State field's value. +func (s *CreateComputeEnvironmentInput) SetState(v string) *CreateComputeEnvironmentInput { + s.State = &v + return s +} + +// SetType sets the Type field's value. +func (s *CreateComputeEnvironmentInput) SetType(v string) *CreateComputeEnvironmentInput { + s.Type = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironmentResponse +type CreateComputeEnvironmentOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the compute environment. + ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string"` + + // The name of the compute environment. + ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string"` +} + +// String returns the string representation +func (s CreateComputeEnvironmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateComputeEnvironmentOutput) GoString() string { + return s.String() +} + +// SetComputeEnvironmentArn sets the ComputeEnvironmentArn field's value. +func (s *CreateComputeEnvironmentOutput) SetComputeEnvironmentArn(v string) *CreateComputeEnvironmentOutput { + s.ComputeEnvironmentArn = &v + return s +} + +// SetComputeEnvironmentName sets the ComputeEnvironmentName field's value. +func (s *CreateComputeEnvironmentOutput) SetComputeEnvironmentName(v string) *CreateComputeEnvironmentOutput { + s.ComputeEnvironmentName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueueRequest +type CreateJobQueueInput struct { + _ struct{} `type:"structure"` + + // The set of compute environments mapped to a job queue and their order relative + // to each other. The job scheduler uses this parameter to determine which compute + // environment should execute a given job. Compute environments must be in the + // VALID state before you can associate them with a job queue. You can associate + // up to 3 compute environments with a job queue. + // + // ComputeEnvironmentOrder is a required field + ComputeEnvironmentOrder []*ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list" required:"true"` + + // The name of the job queue. + // + // JobQueueName is a required field + JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"` + + // The priority of the job queue. Job queues with a higher priority (or a higher + // integer value for the priority parameter) are evaluated first when associated + // with same compute environment. Priority is determined in descending order, + // for example, a job queue with a priority value of 10 is given scheduling + // preference over a job queue with a priority value of 1. + // + // Priority is a required field + Priority *int64 `locationName:"priority" type:"integer" required:"true"` + + // The state of the job queue. If the job queue state is ENABLED, it is able + // to accept jobs. + State *string `locationName:"state" type:"string" enum:"JQState"` +} + +// String returns the string representation +func (s CreateJobQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateJobQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateJobQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateJobQueueInput"} + if s.ComputeEnvironmentOrder == nil { + invalidParams.Add(request.NewErrParamRequired("ComputeEnvironmentOrder")) + } + if s.JobQueueName == nil { + invalidParams.Add(request.NewErrParamRequired("JobQueueName")) + } + if s.Priority == nil { + invalidParams.Add(request.NewErrParamRequired("Priority")) + } + if s.ComputeEnvironmentOrder != nil { + for i, v := range s.ComputeEnvironmentOrder { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComputeEnvironmentOrder", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComputeEnvironmentOrder sets the ComputeEnvironmentOrder field's value. +func (s *CreateJobQueueInput) SetComputeEnvironmentOrder(v []*ComputeEnvironmentOrder) *CreateJobQueueInput { + s.ComputeEnvironmentOrder = v + return s +} + +// SetJobQueueName sets the JobQueueName field's value. +func (s *CreateJobQueueInput) SetJobQueueName(v string) *CreateJobQueueInput { + s.JobQueueName = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *CreateJobQueueInput) SetPriority(v int64) *CreateJobQueueInput { + s.Priority = &v + return s +} + +// SetState sets the State field's value. +func (s *CreateJobQueueInput) SetState(v string) *CreateJobQueueInput { + s.State = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueueResponse +type CreateJobQueueOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the job queue. + // + // JobQueueArn is a required field + JobQueueArn *string `locationName:"jobQueueArn" type:"string" required:"true"` + + // The name of the job queue. + // + // JobQueueName is a required field + JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateJobQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateJobQueueOutput) GoString() string { + return s.String() +} + +// SetJobQueueArn sets the JobQueueArn field's value. +func (s *CreateJobQueueOutput) SetJobQueueArn(v string) *CreateJobQueueOutput { + s.JobQueueArn = &v + return s +} + +// SetJobQueueName sets the JobQueueName field's value. +func (s *CreateJobQueueOutput) SetJobQueueName(v string) *CreateJobQueueOutput { + s.JobQueueName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironmentRequest +type DeleteComputeEnvironmentInput struct { + _ struct{} `type:"structure"` + + // The name or Amazon Resource Name (ARN) of the compute environment to delete. + // + // ComputeEnvironment is a required field + ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteComputeEnvironmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteComputeEnvironmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteComputeEnvironmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteComputeEnvironmentInput"} + if s.ComputeEnvironment == nil { + invalidParams.Add(request.NewErrParamRequired("ComputeEnvironment")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComputeEnvironment sets the ComputeEnvironment field's value. +func (s *DeleteComputeEnvironmentInput) SetComputeEnvironment(v string) *DeleteComputeEnvironmentInput { + s.ComputeEnvironment = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironmentResponse +type DeleteComputeEnvironmentOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteComputeEnvironmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteComputeEnvironmentOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueueRequest +type DeleteJobQueueInput struct { + _ struct{} `type:"structure"` + + // The short name or full Amazon Resource Name (ARN) of the queue to delete. + // + // JobQueue is a required field + JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteJobQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteJobQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteJobQueueInput"} + if s.JobQueue == nil { + invalidParams.Add(request.NewErrParamRequired("JobQueue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobQueue sets the JobQueue field's value. +func (s *DeleteJobQueueInput) SetJobQueue(v string) *DeleteJobQueueInput { + s.JobQueue = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueueResponse +type DeleteJobQueueOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteJobQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobQueueOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinitionRequest +type DeregisterJobDefinitionInput struct { + _ struct{} `type:"structure"` + + // The name and revision (name:revision) or full Amazon Resource Name (ARN) + // of the job definition to deregister. + // + // JobDefinition is a required field + JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeregisterJobDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterJobDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterJobDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterJobDefinitionInput"} + if s.JobDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("JobDefinition")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobDefinition sets the JobDefinition field's value. +func (s *DeregisterJobDefinitionInput) SetJobDefinition(v string) *DeregisterJobDefinitionInput { + s.JobDefinition = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinitionResponse +type DeregisterJobDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeregisterJobDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterJobDefinitionOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironmentsRequest +type DescribeComputeEnvironmentsInput struct { + _ struct{} `type:"structure"` + + // A list of up to 100 compute environment names or full Amazon Resource Name + // (ARN) entries. + ComputeEnvironments []*string `locationName:"computeEnvironments" type:"list"` + + // The maximum number of cluster results returned by DescribeComputeEnvironments + // in paginated output. When this parameter is used, DescribeComputeEnvironments + // only returns maxResults results in a single page along with a nextToken response + // element. The remaining results of the initial request can be seen by sending + // another DescribeComputeEnvironments request with the returned nextToken value. + // This value can be between 1 and 100. If this parameter is not used, then + // DescribeComputeEnvironments returns up to 100 results and a nextToken value + // if applicable. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The nextToken value returned from a previous paginated DescribeComputeEnvironments + // request where maxResults was used and the results exceeded the value of that + // parameter. Pagination continues from the end of the previous results that + // returned the nextToken value. This value is null when there are no more results + // to return. + // + // This token should be treated as an opaque identifier that is only used to + // retrieve the next items in a list and not for other programmatic purposes. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeComputeEnvironmentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeComputeEnvironmentsInput) GoString() string { + return s.String() +} + +// SetComputeEnvironments sets the ComputeEnvironments field's value. +func (s *DescribeComputeEnvironmentsInput) SetComputeEnvironments(v []*string) *DescribeComputeEnvironmentsInput { + s.ComputeEnvironments = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeComputeEnvironmentsInput) SetMaxResults(v int64) *DescribeComputeEnvironmentsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeComputeEnvironmentsInput) SetNextToken(v string) *DescribeComputeEnvironmentsInput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironmentsResponse +type DescribeComputeEnvironmentsOutput struct { + _ struct{} `type:"structure"` + + // The list of compute environments. + ComputeEnvironments []*ComputeEnvironmentDetail `locationName:"computeEnvironments" type:"list"` + + // The nextToken value to include in a future DescribeComputeEnvironments request. + // When the results of a DescribeJobDefinitions request exceed maxResults, this + // value can be used to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeComputeEnvironmentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeComputeEnvironmentsOutput) GoString() string { + return s.String() +} + +// SetComputeEnvironments sets the ComputeEnvironments field's value. +func (s *DescribeComputeEnvironmentsOutput) SetComputeEnvironments(v []*ComputeEnvironmentDetail) *DescribeComputeEnvironmentsOutput { + s.ComputeEnvironments = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeComputeEnvironmentsOutput) SetNextToken(v string) *DescribeComputeEnvironmentsOutput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitionsRequest +type DescribeJobDefinitionsInput struct { + _ struct{} `type:"structure"` + + // The name of the job definition to describe. + JobDefinitionName *string `locationName:"jobDefinitionName" type:"string"` + + // A space-separated list of up to 100 job definition names or full Amazon Resource + // Name (ARN) entries. + JobDefinitions []*string `locationName:"jobDefinitions" type:"list"` + + // The maximum number of results returned by DescribeJobDefinitions in paginated + // output. When this parameter is used, DescribeJobDefinitions only returns + // maxResults results in a single page along with a nextToken response element. + // The remaining results of the initial request can be seen by sending another + // DescribeJobDefinitions request with the returned nextToken value. This value + // can be between 1 and 100. If this parameter is not used, then DescribeJobDefinitions + // returns up to 100 results and a nextToken value if applicable. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The nextToken value returned from a previous paginated DescribeJobDefinitions + // request where maxResults was used and the results exceeded the value of that + // parameter. Pagination continues from the end of the previous results that + // returned the nextToken value. This value is null when there are no more results + // to return. + // + // This token should be treated as an opaque identifier that is only used to + // retrieve the next items in a list and not for other programmatic purposes. + NextToken *string `locationName:"nextToken" type:"string"` + + // The status with which to filter job definitions. + Status *string `locationName:"status" type:"string"` +} + +// String returns the string representation +func (s DescribeJobDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeJobDefinitionsInput) GoString() string { + return s.String() +} + +// SetJobDefinitionName sets the JobDefinitionName field's value. +func (s *DescribeJobDefinitionsInput) SetJobDefinitionName(v string) *DescribeJobDefinitionsInput { + s.JobDefinitionName = &v + return s +} + +// SetJobDefinitions sets the JobDefinitions field's value. +func (s *DescribeJobDefinitionsInput) SetJobDefinitions(v []*string) *DescribeJobDefinitionsInput { + s.JobDefinitions = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeJobDefinitionsInput) SetMaxResults(v int64) *DescribeJobDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeJobDefinitionsInput) SetNextToken(v string) *DescribeJobDefinitionsInput { + s.NextToken = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeJobDefinitionsInput) SetStatus(v string) *DescribeJobDefinitionsInput { + s.Status = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitionsResponse +type DescribeJobDefinitionsOutput struct { + _ struct{} `type:"structure"` + + // The list of job definitions. + JobDefinitions []*JobDefinition `locationName:"jobDefinitions" type:"list"` + + // The nextToken value to include in a future DescribeJobDefinitions request. + // When the results of a DescribeJobDefinitions request exceed maxResults, this + // value can be used to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeJobDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeJobDefinitionsOutput) GoString() string { + return s.String() +} + +// SetJobDefinitions sets the JobDefinitions field's value. +func (s *DescribeJobDefinitionsOutput) SetJobDefinitions(v []*JobDefinition) *DescribeJobDefinitionsOutput { + s.JobDefinitions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeJobDefinitionsOutput) SetNextToken(v string) *DescribeJobDefinitionsOutput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueuesRequest +type DescribeJobQueuesInput struct { + _ struct{} `type:"structure"` + + // A list of up to 100 queue names or full queue Amazon Resource Name (ARN) + // entries. + JobQueues []*string `locationName:"jobQueues" type:"list"` + + // The maximum number of results returned by DescribeJobQueues in paginated + // output. When this parameter is used, DescribeJobQueues only returns maxResults + // results in a single page along with a nextToken response element. The remaining + // results of the initial request can be seen by sending another DescribeJobQueues + // request with the returned nextToken value. This value can be between 1 and + // 100. If this parameter is not used, then DescribeJobQueues returns up to + // 100 results and a nextToken value if applicable. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The nextToken value returned from a previous paginated DescribeJobQueues + // request where maxResults was used and the results exceeded the value of that + // parameter. Pagination continues from the end of the previous results that + // returned the nextToken value. This value is null when there are no more results + // to return. + // + // This token should be treated as an opaque identifier that is only used to + // retrieve the next items in a list and not for other programmatic purposes. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeJobQueuesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeJobQueuesInput) GoString() string { + return s.String() +} + +// SetJobQueues sets the JobQueues field's value. +func (s *DescribeJobQueuesInput) SetJobQueues(v []*string) *DescribeJobQueuesInput { + s.JobQueues = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeJobQueuesInput) SetMaxResults(v int64) *DescribeJobQueuesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeJobQueuesInput) SetNextToken(v string) *DescribeJobQueuesInput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueuesResponse +type DescribeJobQueuesOutput struct { + _ struct{} `type:"structure"` + + // The list of job queues. + JobQueues []*JobQueueDetail `locationName:"jobQueues" type:"list"` + + // The nextToken value to include in a future DescribeJobQueues request. When + // the results of a DescribeJobQueues request exceed maxResults, this value + // can be used to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeJobQueuesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeJobQueuesOutput) GoString() string { + return s.String() +} + +// SetJobQueues sets the JobQueues field's value. +func (s *DescribeJobQueuesOutput) SetJobQueues(v []*JobQueueDetail) *DescribeJobQueuesOutput { + s.JobQueues = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeJobQueuesOutput) SetNextToken(v string) *DescribeJobQueuesOutput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobsRequest +type DescribeJobsInput struct { + _ struct{} `type:"structure"` + + // A space-separated list of up to 100 job IDs. + // + // Jobs is a required field + Jobs []*string `locationName:"jobs" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeJobsInput"} + if s.Jobs == nil { + invalidParams.Add(request.NewErrParamRequired("Jobs")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobs sets the Jobs field's value. +func (s *DescribeJobsInput) SetJobs(v []*string) *DescribeJobsInput { + s.Jobs = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobsResponse +type DescribeJobsOutput struct { + _ struct{} `type:"structure"` + + // The list of jobs. + Jobs []*JobDetail `locationName:"jobs" type:"list"` +} + +// String returns the string representation +func (s DescribeJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeJobsOutput) GoString() string { + return s.String() +} + +// SetJobs sets the Jobs field's value. +func (s *DescribeJobsOutput) SetJobs(v []*JobDetail) *DescribeJobsOutput { + s.Jobs = v + return s +} + +// The contents of the host parameter determine whether your data volume persists +// on the host container instance and where it is stored. If the host parameter +// is empty, then the Docker daemon assigns a host path for your data volume, +// but the data is not guaranteed to persist after the containers associated +// with it stop running. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/Host +type Host struct { + _ struct{} `type:"structure"` + + // The path on the host container instance that is presented to the container. + // If this parameter is empty, then the Docker daemon has assigned a host path + // for you. If the host parameter contains a sourcePath file location, then + // the data volume persists at the specified location on the host container + // instance until you delete it manually. If the sourcePath value does not exist + // on the host container instance, the Docker daemon creates it. If the location + // does exist, the contents of the source path folder are exported. + SourcePath *string `locationName:"sourcePath" type:"string"` +} + +// String returns the string representation +func (s Host) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Host) GoString() string { + return s.String() +} + +// SetSourcePath sets the SourcePath field's value. +func (s *Host) SetSourcePath(v string) *Host { + s.SourcePath = &v + return s +} + +// An object representing an AWS Batch job definition. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobDefinition +type JobDefinition struct { + _ struct{} `type:"structure"` + + // An object with various properties specific to container-based jobs. + ContainerProperties *ContainerProperties `locationName:"containerProperties" type:"structure"` + + // The Amazon Resource Name (ARN) for the job definition. + // + // JobDefinitionArn is a required field + JobDefinitionArn *string `locationName:"jobDefinitionArn" type:"string" required:"true"` + + // The name of the job definition. + // + // JobDefinitionName is a required field + JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"` + + // Default parameters or parameter substitution placeholders that are set in + // the job definition. Parameters are specified as a key-value pair mapping. + // Parameters in a SubmitJob request override any corresponding parameter defaults + // from the job definition. + Parameters map[string]*string `locationName:"parameters" type:"map"` + + // The retry strategy to use for failed jobs that are submitted with this job + // definition. + RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` + + // The revision of the job definition. + // + // Revision is a required field + Revision *int64 `locationName:"revision" type:"integer" required:"true"` + + // The status of the job definition. + Status *string `locationName:"status" type:"string"` + + // The type of job definition. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true"` +} + +// String returns the string representation +func (s JobDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobDefinition) GoString() string { + return s.String() +} + +// SetContainerProperties sets the ContainerProperties field's value. +func (s *JobDefinition) SetContainerProperties(v *ContainerProperties) *JobDefinition { + s.ContainerProperties = v + return s +} + +// SetJobDefinitionArn sets the JobDefinitionArn field's value. +func (s *JobDefinition) SetJobDefinitionArn(v string) *JobDefinition { + s.JobDefinitionArn = &v + return s +} + +// SetJobDefinitionName sets the JobDefinitionName field's value. +func (s *JobDefinition) SetJobDefinitionName(v string) *JobDefinition { + s.JobDefinitionName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *JobDefinition) SetParameters(v map[string]*string) *JobDefinition { + s.Parameters = v + return s +} + +// SetRetryStrategy sets the RetryStrategy field's value. +func (s *JobDefinition) SetRetryStrategy(v *RetryStrategy) *JobDefinition { + s.RetryStrategy = v + return s +} + +// SetRevision sets the Revision field's value. +func (s *JobDefinition) SetRevision(v int64) *JobDefinition { + s.Revision = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *JobDefinition) SetStatus(v string) *JobDefinition { + s.Status = &v + return s +} + +// SetType sets the Type field's value. +func (s *JobDefinition) SetType(v string) *JobDefinition { + s.Type = &v + return s +} + +// An object representing an AWS Batch job dependency. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobDependency +type JobDependency struct { + _ struct{} `type:"structure"` + + // The job ID of the AWS Batch job associated with this dependency. + JobId *string `locationName:"jobId" type:"string"` +} + +// String returns the string representation +func (s JobDependency) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobDependency) GoString() string { + return s.String() +} + +// SetJobId sets the JobId field's value. +func (s *JobDependency) SetJobId(v string) *JobDependency { + s.JobId = &v + return s +} + +// An object representing an AWS Batch job. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobDetail +type JobDetail struct { + _ struct{} `type:"structure"` + + // A list of job attempts associated with this job. + Attempts []*AttemptDetail `locationName:"attempts" type:"list"` + + // An object representing the details of the container that is associated with + // the job. + Container *ContainerDetail `locationName:"container" type:"structure"` + + // The Unix timestamp for when the job was created (when the task entered the + // PENDING state). + CreatedAt *int64 `locationName:"createdAt" type:"long"` + + // A list of job names or IDs on which this job depends. + DependsOn []*JobDependency `locationName:"dependsOn" type:"list"` + + // The job definition that is used by this job. + // + // JobDefinition is a required field + JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"` + + // The ID for the job. + // + // JobId is a required field + JobId *string `locationName:"jobId" type:"string" required:"true"` + + // The name of the job. + // + // JobName is a required field + JobName *string `locationName:"jobName" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the job queue with which the job is associated. + // + // JobQueue is a required field + JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` + + // Additional parameters passed to the job that replace parameter substitution + // placeholders or override any corresponding parameter defaults from the job + // definition. + Parameters map[string]*string `locationName:"parameters" type:"map"` + + // The retry strategy to use for this job if an attempt fails. + RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` + + // The Unix timestamp for when the job was started (when the task transitioned + // from the PENDING state to the RUNNING state). + // + // StartedAt is a required field + StartedAt *int64 `locationName:"startedAt" type:"long" required:"true"` + + // The current status for the job. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"JobStatus"` + + // A short, human-readable string to provide additional details about the current + // status of the job. + StatusReason *string `locationName:"statusReason" type:"string"` + + // The Unix timestamp for when the job was stopped (when the task transitioned + // from the RUNNING state to the STOPPED state). + StoppedAt *int64 `locationName:"stoppedAt" type:"long"` +} + +// String returns the string representation +func (s JobDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobDetail) GoString() string { + return s.String() +} + +// SetAttempts sets the Attempts field's value. +func (s *JobDetail) SetAttempts(v []*AttemptDetail) *JobDetail { + s.Attempts = v + return s +} + +// SetContainer sets the Container field's value. +func (s *JobDetail) SetContainer(v *ContainerDetail) *JobDetail { + s.Container = v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *JobDetail) SetCreatedAt(v int64) *JobDetail { + s.CreatedAt = &v + return s +} + +// SetDependsOn sets the DependsOn field's value. +func (s *JobDetail) SetDependsOn(v []*JobDependency) *JobDetail { + s.DependsOn = v + return s +} + +// SetJobDefinition sets the JobDefinition field's value. +func (s *JobDetail) SetJobDefinition(v string) *JobDetail { + s.JobDefinition = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *JobDetail) SetJobId(v string) *JobDetail { + s.JobId = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *JobDetail) SetJobName(v string) *JobDetail { + s.JobName = &v + return s +} + +// SetJobQueue sets the JobQueue field's value. +func (s *JobDetail) SetJobQueue(v string) *JobDetail { + s.JobQueue = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *JobDetail) SetParameters(v map[string]*string) *JobDetail { + s.Parameters = v + return s +} + +// SetRetryStrategy sets the RetryStrategy field's value. +func (s *JobDetail) SetRetryStrategy(v *RetryStrategy) *JobDetail { + s.RetryStrategy = v + return s +} + +// SetStartedAt sets the StartedAt field's value. +func (s *JobDetail) SetStartedAt(v int64) *JobDetail { + s.StartedAt = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *JobDetail) SetStatus(v string) *JobDetail { + s.Status = &v + return s +} + +// SetStatusReason sets the StatusReason field's value. +func (s *JobDetail) SetStatusReason(v string) *JobDetail { + s.StatusReason = &v + return s +} + +// SetStoppedAt sets the StoppedAt field's value. +func (s *JobDetail) SetStoppedAt(v int64) *JobDetail { + s.StoppedAt = &v + return s +} + +// An object representing the details of an AWS Batch job queue. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobQueueDetail +type JobQueueDetail struct { + _ struct{} `type:"structure"` + + // The compute environments that are attached to the job queue and the order + // in which job placement is preferred. Compute environments are selected for + // job placement in ascending order. + // + // ComputeEnvironmentOrder is a required field + ComputeEnvironmentOrder []*ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the job queue. + // + // JobQueueArn is a required field + JobQueueArn *string `locationName:"jobQueueArn" type:"string" required:"true"` + + // The name of the job queue. + // + // JobQueueName is a required field + JobQueueName *string `locationName:"jobQueueName" type:"string" required:"true"` + + // The priority of the job queue. + // + // Priority is a required field + Priority *int64 `locationName:"priority" type:"integer" required:"true"` + + // Describes the ability of the queue to accept new jobs. + // + // State is a required field + State *string `locationName:"state" type:"string" required:"true" enum:"JQState"` + + // The status of the job queue (for example, CREATING or VALID). + Status *string `locationName:"status" type:"string" enum:"JQStatus"` + + // A short, human-readable string to provide additional details about the current + // status of the job queue. + StatusReason *string `locationName:"statusReason" type:"string"` +} + +// String returns the string representation +func (s JobQueueDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobQueueDetail) GoString() string { + return s.String() +} + +// SetComputeEnvironmentOrder sets the ComputeEnvironmentOrder field's value. +func (s *JobQueueDetail) SetComputeEnvironmentOrder(v []*ComputeEnvironmentOrder) *JobQueueDetail { + s.ComputeEnvironmentOrder = v + return s +} + +// SetJobQueueArn sets the JobQueueArn field's value. +func (s *JobQueueDetail) SetJobQueueArn(v string) *JobQueueDetail { + s.JobQueueArn = &v + return s +} + +// SetJobQueueName sets the JobQueueName field's value. +func (s *JobQueueDetail) SetJobQueueName(v string) *JobQueueDetail { + s.JobQueueName = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *JobQueueDetail) SetPriority(v int64) *JobQueueDetail { + s.Priority = &v + return s +} + +// SetState sets the State field's value. +func (s *JobQueueDetail) SetState(v string) *JobQueueDetail { + s.State = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *JobQueueDetail) SetStatus(v string) *JobQueueDetail { + s.Status = &v + return s +} + +// SetStatusReason sets the StatusReason field's value. +func (s *JobQueueDetail) SetStatusReason(v string) *JobQueueDetail { + s.StatusReason = &v + return s +} + +// An object representing summary details of a job. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobSummary +type JobSummary struct { + _ struct{} `type:"structure"` + + // The ID of the job. + // + // JobId is a required field + JobId *string `locationName:"jobId" type:"string" required:"true"` + + // The name of the job. + // + // JobName is a required field + JobName *string `locationName:"jobName" type:"string" required:"true"` +} + +// String returns the string representation +func (s JobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobSummary) GoString() string { + return s.String() +} + +// SetJobId sets the JobId field's value. +func (s *JobSummary) SetJobId(v string) *JobSummary { + s.JobId = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *JobSummary) SetJobName(v string) *JobSummary { + s.JobName = &v + return s +} + +// A key-value pair object. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/KeyValuePair +type KeyValuePair struct { + _ struct{} `type:"structure"` + + // The name of the key value pair. For environment variables, this is the name + // of the environment variable. + Name *string `locationName:"name" type:"string"` + + // The value of the key value pair. For environment variables, this is the value + // of the environment variable. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s KeyValuePair) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KeyValuePair) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *KeyValuePair) SetName(v string) *KeyValuePair { + s.Name = &v + return s +} + +// SetValue sets the Value field's value. +func (s *KeyValuePair) SetValue(v string) *KeyValuePair { + s.Value = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobsRequest +type ListJobsInput struct { + _ struct{} `type:"structure"` + + // The name or full Amazon Resource Name (ARN) of the job queue with which to + // list jobs. + // + // JobQueue is a required field + JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` + + // The job status with which to filter jobs in the specified queue. If you do + // not specify a status, only RUNNING jobs are returned. + JobStatus *string `locationName:"jobStatus" type:"string" enum:"JobStatus"` + + // The maximum number of results returned by ListJobs in paginated output. When + // this parameter is used, ListJobs only returns maxResults results in a single + // page along with a nextToken response element. The remaining results of the + // initial request can be seen by sending another ListJobs request with the + // returned nextToken value. This value can be between 1 and 100. If this parameter + // is not used, then ListJobs returns up to 100 results and a nextToken value + // if applicable. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The nextToken value returned from a previous paginated ListJobs request where + // maxResults was used and the results exceeded the value of that parameter. + // Pagination continues from the end of the previous results that returned the + // nextToken value. This value is null when there are no more results to return. + // + // This token should be treated as an opaque identifier that is only used to + // retrieve the next items in a list and not for other programmatic purposes. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} + if s.JobQueue == nil { + invalidParams.Add(request.NewErrParamRequired("JobQueue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobQueue sets the JobQueue field's value. +func (s *ListJobsInput) SetJobQueue(v string) *ListJobsInput { + s.JobQueue = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *ListJobsInput) SetJobStatus(v string) *ListJobsInput { + s.JobStatus = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListJobsInput) SetMaxResults(v int64) *ListJobsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobsResponse +type ListJobsOutput struct { + _ struct{} `type:"structure"` + + // A list of job summaries that match the request. + // + // JobSummaryList is a required field + JobSummaryList []*JobSummary `locationName:"jobSummaryList" type:"list" required:"true"` + + // The nextToken value to include in a future ListJobs request. When the results + // of a ListJobs request exceed maxResults, this value can be used to retrieve + // the next page of results. This value is null when there are no more results + // to return. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListJobsOutput) GoString() string { + return s.String() +} + +// SetJobSummaryList sets the JobSummaryList field's value. +func (s *ListJobsOutput) SetJobSummaryList(v []*JobSummary) *ListJobsOutput { + s.JobSummaryList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { + s.NextToken = &v + return s +} + +// Details on a Docker volume mount point that is used in a job's container +// properties. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/MountPoint +type MountPoint struct { + _ struct{} `type:"structure"` + + // The path on the container at which to mount the host volume. + ContainerPath *string `locationName:"containerPath" type:"string"` + + // If this value is true, the container has read-only access to the volume; + // otherwise, the container can write to the volume. The default value is false. + ReadOnly *bool `locationName:"readOnly" type:"boolean"` + + // The name of the volume to mount. + SourceVolume *string `locationName:"sourceVolume" type:"string"` +} + +// String returns the string representation +func (s MountPoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MountPoint) GoString() string { + return s.String() +} + +// SetContainerPath sets the ContainerPath field's value. +func (s *MountPoint) SetContainerPath(v string) *MountPoint { + s.ContainerPath = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *MountPoint) SetReadOnly(v bool) *MountPoint { + s.ReadOnly = &v + return s +} + +// SetSourceVolume sets the SourceVolume field's value. +func (s *MountPoint) SetSourceVolume(v string) *MountPoint { + s.SourceVolume = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinitionRequest +type RegisterJobDefinitionInput struct { + _ struct{} `type:"structure"` + + // An object with various properties specific for container-based jobs. This + // parameter is required if the type parameter is container. + ContainerProperties *ContainerProperties `locationName:"containerProperties" type:"structure"` + + // The name of the job definition to register. Up to 128 letters (uppercase + // and lowercase), numbers, hyphens, and underscores are allowed. + // + // JobDefinitionName is a required field + JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"` + + // Default parameter substitution placeholders to set in the job definition. + // Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob + // request override any corresponding parameter defaults from the job definition. + Parameters map[string]*string `locationName:"parameters" type:"map"` + + // The retry strategy to use for failed jobs that are submitted with this job + // definition. Any retry strategy that is specified during a SubmitJob operation + // overrides the retry strategy defined here. + RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` + + // The type of job definition. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"JobDefinitionType"` +} + +// String returns the string representation +func (s RegisterJobDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterJobDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterJobDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterJobDefinitionInput"} + if s.JobDefinitionName == nil { + invalidParams.Add(request.NewErrParamRequired("JobDefinitionName")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.ContainerProperties != nil { + if err := s.ContainerProperties.Validate(); err != nil { + invalidParams.AddNested("ContainerProperties", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerProperties sets the ContainerProperties field's value. +func (s *RegisterJobDefinitionInput) SetContainerProperties(v *ContainerProperties) *RegisterJobDefinitionInput { + s.ContainerProperties = v + return s +} + +// SetJobDefinitionName sets the JobDefinitionName field's value. +func (s *RegisterJobDefinitionInput) SetJobDefinitionName(v string) *RegisterJobDefinitionInput { + s.JobDefinitionName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *RegisterJobDefinitionInput) SetParameters(v map[string]*string) *RegisterJobDefinitionInput { + s.Parameters = v + return s +} + +// SetRetryStrategy sets the RetryStrategy field's value. +func (s *RegisterJobDefinitionInput) SetRetryStrategy(v *RetryStrategy) *RegisterJobDefinitionInput { + s.RetryStrategy = v + return s +} + +// SetType sets the Type field's value. +func (s *RegisterJobDefinitionInput) SetType(v string) *RegisterJobDefinitionInput { + s.Type = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinitionResponse +type RegisterJobDefinitionOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the job definition. + // + // JobDefinitionArn is a required field + JobDefinitionArn *string `locationName:"jobDefinitionArn" type:"string" required:"true"` + + // The name of the job definition. + // + // JobDefinitionName is a required field + JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"` + + // The revision of the job definition. + // + // Revision is a required field + Revision *int64 `locationName:"revision" type:"integer" required:"true"` +} + +// String returns the string representation +func (s RegisterJobDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterJobDefinitionOutput) GoString() string { + return s.String() +} + +// SetJobDefinitionArn sets the JobDefinitionArn field's value. +func (s *RegisterJobDefinitionOutput) SetJobDefinitionArn(v string) *RegisterJobDefinitionOutput { + s.JobDefinitionArn = &v + return s +} + +// SetJobDefinitionName sets the JobDefinitionName field's value. +func (s *RegisterJobDefinitionOutput) SetJobDefinitionName(v string) *RegisterJobDefinitionOutput { + s.JobDefinitionName = &v + return s +} + +// SetRevision sets the Revision field's value. +func (s *RegisterJobDefinitionOutput) SetRevision(v int64) *RegisterJobDefinitionOutput { + s.Revision = &v + return s +} + +// The retry strategy associated with a job. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RetryStrategy +type RetryStrategy struct { + _ struct{} `type:"structure"` + + // The number of times to move a job to the RUNNABLE status. You may specify + // between 1 and 10 attempts. If attempts is greater than one, the job is retried + // if it fails until it has moved to RUNNABLE that many times. + Attempts *int64 `locationName:"attempts" type:"integer"` +} + +// String returns the string representation +func (s RetryStrategy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetryStrategy) GoString() string { + return s.String() +} + +// SetAttempts sets the Attempts field's value. +func (s *RetryStrategy) SetAttempts(v int64) *RetryStrategy { + s.Attempts = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJobRequest +type SubmitJobInput struct { + _ struct{} `type:"structure"` + + // A list of container overrides in JSON format that specify the name of a container + // in the specified job definition and the overrides it should receive. You + // can override the default command for a container (that is specified in the + // job definition or the Docker image) with a command override. You can also + // override existing environment variables (that are specified in the job definition + // or Docker image) on a container or add new environment variables to it with + // an environment override. + ContainerOverrides *ContainerOverrides `locationName:"containerOverrides" type:"structure"` + + // A list of job IDs on which this job depends. A job can depend upon a maximum + // of 20 jobs. + DependsOn []*JobDependency `locationName:"dependsOn" type:"list"` + + // The job definition used by this job. This value can be either a name:revision + // or the Amazon Resource Name (ARN) for the job definition. + // + // JobDefinition is a required field + JobDefinition *string `locationName:"jobDefinition" type:"string" required:"true"` + + // The name of the job. The first character must be alphanumeric, and up to + // 128 letters (uppercase and lowercase), numbers, hyphens, and underscores + // are allowed. + // + // JobName is a required field + JobName *string `locationName:"jobName" type:"string" required:"true"` + + // The job queue into which the job will be submitted. You can specify either + // the name or the Amazon Resource Name (ARN) of the queue. + // + // JobQueue is a required field + JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` + + // Additional parameters passed to the job that replace parameter substitution + // placeholders that are set in the job definition. Parameters are specified + // as a key and value pair mapping. Parameters in a SubmitJob request override + // any corresponding parameter defaults from the job definition. + Parameters map[string]*string `locationName:"parameters" type:"map"` + + // The retry strategy to use for failed jobs from this SubmitJob operation. + // When a retry strategy is specified here, it overrides the retry strategy + // defined in the job definition. + RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` +} + +// String returns the string representation +func (s SubmitJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubmitJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SubmitJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SubmitJobInput"} + if s.JobDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("JobDefinition")) + } + if s.JobName == nil { + invalidParams.Add(request.NewErrParamRequired("JobName")) + } + if s.JobQueue == nil { + invalidParams.Add(request.NewErrParamRequired("JobQueue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerOverrides sets the ContainerOverrides field's value. +func (s *SubmitJobInput) SetContainerOverrides(v *ContainerOverrides) *SubmitJobInput { + s.ContainerOverrides = v + return s +} + +// SetDependsOn sets the DependsOn field's value. +func (s *SubmitJobInput) SetDependsOn(v []*JobDependency) *SubmitJobInput { + s.DependsOn = v + return s +} + +// SetJobDefinition sets the JobDefinition field's value. +func (s *SubmitJobInput) SetJobDefinition(v string) *SubmitJobInput { + s.JobDefinition = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *SubmitJobInput) SetJobName(v string) *SubmitJobInput { + s.JobName = &v + return s +} + +// SetJobQueue sets the JobQueue field's value. +func (s *SubmitJobInput) SetJobQueue(v string) *SubmitJobInput { + s.JobQueue = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *SubmitJobInput) SetParameters(v map[string]*string) *SubmitJobInput { + s.Parameters = v + return s +} + +// SetRetryStrategy sets the RetryStrategy field's value. +func (s *SubmitJobInput) SetRetryStrategy(v *RetryStrategy) *SubmitJobInput { + s.RetryStrategy = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJobResponse +type SubmitJobOutput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the job. + // + // JobId is a required field + JobId *string `locationName:"jobId" type:"string" required:"true"` + + // The name of the job. + // + // JobName is a required field + JobName *string `locationName:"jobName" type:"string" required:"true"` +} + +// String returns the string representation +func (s SubmitJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubmitJobOutput) GoString() string { + return s.String() +} + +// SetJobId sets the JobId field's value. +func (s *SubmitJobOutput) SetJobId(v string) *SubmitJobOutput { + s.JobId = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *SubmitJobOutput) SetJobName(v string) *SubmitJobOutput { + s.JobName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJobRequest +type TerminateJobInput struct { + _ struct{} `type:"structure"` + + // The AWS Batch job ID of the job to terminate. + // + // JobId is a required field + JobId *string `locationName:"jobId" type:"string" required:"true"` + + // A message to attach to the job that explains the reason for cancelling it. + // This message is returned by future DescribeJobs operations on the job. This + // message is also recorded in the AWS Batch activity logs. + // + // Reason is a required field + Reason *string `locationName:"reason" type:"string" required:"true"` +} + +// String returns the string representation +func (s TerminateJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateJobInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.Reason == nil { + invalidParams.Add(request.NewErrParamRequired("Reason")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobId sets the JobId field's value. +func (s *TerminateJobInput) SetJobId(v string) *TerminateJobInput { + s.JobId = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *TerminateJobInput) SetReason(v string) *TerminateJobInput { + s.Reason = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJobResponse +type TerminateJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TerminateJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateJobOutput) GoString() string { + return s.String() +} + +// The ulimit settings to pass to the container. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/Ulimit +type Ulimit struct { + _ struct{} `type:"structure"` + + // The hard limit for the ulimit type. + // + // HardLimit is a required field + HardLimit *int64 `locationName:"hardLimit" type:"integer" required:"true"` + + // The type of the ulimit. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The soft limit for the ulimit type. + // + // SoftLimit is a required field + SoftLimit *int64 `locationName:"softLimit" type:"integer" required:"true"` +} + +// String returns the string representation +func (s Ulimit) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Ulimit) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Ulimit) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Ulimit"} + if s.HardLimit == nil { + invalidParams.Add(request.NewErrParamRequired("HardLimit")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.SoftLimit == nil { + invalidParams.Add(request.NewErrParamRequired("SoftLimit")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHardLimit sets the HardLimit field's value. +func (s *Ulimit) SetHardLimit(v int64) *Ulimit { + s.HardLimit = &v + return s +} + +// SetName sets the Name field's value. +func (s *Ulimit) SetName(v string) *Ulimit { + s.Name = &v + return s +} + +// SetSoftLimit sets the SoftLimit field's value. +func (s *Ulimit) SetSoftLimit(v int64) *Ulimit { + s.SoftLimit = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironmentRequest +type UpdateComputeEnvironmentInput struct { + _ struct{} `type:"structure"` + + // The name or full Amazon Resource Name (ARN) of the compute environment to + // update. + // + // ComputeEnvironment is a required field + ComputeEnvironment *string `locationName:"computeEnvironment" type:"string" required:"true"` + + // Details of the compute resources managed by the compute environment. Required + // for a managed compute environment. + ComputeResources *ComputeResourceUpdate `locationName:"computeResources" type:"structure"` + + // The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch + // to make calls to other AWS services on your behalf. + // + // If your specified role has a path other than /, then you must either specify + // the full role ARN (this is recommended) or prefix the role name with the + // path. + // + // Depending on how you created your AWS Batch service role, its ARN may contain + // the service-role path prefix. When you only specify the name of the service + // role, AWS Batch assumes that your ARN does not use the service-role path + // prefix. Because of this, we recommend that you specify the full ARN of your + // service role when you create compute environments. + ServiceRole *string `locationName:"serviceRole" type:"string"` + + // The state of the compute environment. Compute environments in the ENABLED + // state can accept jobs from a queue and scale in or out automatically based + // on the workload demand of its associated queues. + State *string `locationName:"state" type:"string" enum:"CEState"` +} + +// String returns the string representation +func (s UpdateComputeEnvironmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateComputeEnvironmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateComputeEnvironmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateComputeEnvironmentInput"} + if s.ComputeEnvironment == nil { + invalidParams.Add(request.NewErrParamRequired("ComputeEnvironment")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComputeEnvironment sets the ComputeEnvironment field's value. +func (s *UpdateComputeEnvironmentInput) SetComputeEnvironment(v string) *UpdateComputeEnvironmentInput { + s.ComputeEnvironment = &v + return s +} + +// SetComputeResources sets the ComputeResources field's value. +func (s *UpdateComputeEnvironmentInput) SetComputeResources(v *ComputeResourceUpdate) *UpdateComputeEnvironmentInput { + s.ComputeResources = v + return s +} + +// SetServiceRole sets the ServiceRole field's value. +func (s *UpdateComputeEnvironmentInput) SetServiceRole(v string) *UpdateComputeEnvironmentInput { + s.ServiceRole = &v + return s +} + +// SetState sets the State field's value. +func (s *UpdateComputeEnvironmentInput) SetState(v string) *UpdateComputeEnvironmentInput { + s.State = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironmentResponse +type UpdateComputeEnvironmentOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the compute environment. + ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string"` + + // The name of compute environment. + ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string"` +} + +// String returns the string representation +func (s UpdateComputeEnvironmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateComputeEnvironmentOutput) GoString() string { + return s.String() +} + +// SetComputeEnvironmentArn sets the ComputeEnvironmentArn field's value. +func (s *UpdateComputeEnvironmentOutput) SetComputeEnvironmentArn(v string) *UpdateComputeEnvironmentOutput { + s.ComputeEnvironmentArn = &v + return s +} + +// SetComputeEnvironmentName sets the ComputeEnvironmentName field's value. +func (s *UpdateComputeEnvironmentOutput) SetComputeEnvironmentName(v string) *UpdateComputeEnvironmentOutput { + s.ComputeEnvironmentName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueueRequest +type UpdateJobQueueInput struct { + _ struct{} `type:"structure"` + + // Details the set of compute environments mapped to a job queue and their order + // relative to each other. This is one of the parameters used by the job scheduler + // to determine which compute environment should execute a given job. + ComputeEnvironmentOrder []*ComputeEnvironmentOrder `locationName:"computeEnvironmentOrder" type:"list"` + + // The name or the Amazon Resource Name (ARN) of the job queue. + // + // JobQueue is a required field + JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` + + // The priority of the job queue. Job queues with a higher priority (or a higher + // integer value for the priority parameter) are evaluated first when associated + // with same compute environment. Priority is determined in descending order, + // for example, a job queue with a priority value of 10 is given scheduling + // preference over a job queue with a priority value of 1. + Priority *int64 `locationName:"priority" type:"integer"` + + // Describes the queue's ability to accept new jobs. + State *string `locationName:"state" type:"string" enum:"JQState"` +} + +// String returns the string representation +func (s UpdateJobQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateJobQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateJobQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateJobQueueInput"} + if s.JobQueue == nil { + invalidParams.Add(request.NewErrParamRequired("JobQueue")) + } + if s.ComputeEnvironmentOrder != nil { + for i, v := range s.ComputeEnvironmentOrder { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComputeEnvironmentOrder", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComputeEnvironmentOrder sets the ComputeEnvironmentOrder field's value. +func (s *UpdateJobQueueInput) SetComputeEnvironmentOrder(v []*ComputeEnvironmentOrder) *UpdateJobQueueInput { + s.ComputeEnvironmentOrder = v + return s +} + +// SetJobQueue sets the JobQueue field's value. +func (s *UpdateJobQueueInput) SetJobQueue(v string) *UpdateJobQueueInput { + s.JobQueue = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *UpdateJobQueueInput) SetPriority(v int64) *UpdateJobQueueInput { + s.Priority = &v + return s +} + +// SetState sets the State field's value. +func (s *UpdateJobQueueInput) SetState(v string) *UpdateJobQueueInput { + s.State = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueueResponse +type UpdateJobQueueOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the job queue. + JobQueueArn *string `locationName:"jobQueueArn" type:"string"` + + // The name of the job queue. + JobQueueName *string `locationName:"jobQueueName" type:"string"` +} + +// String returns the string representation +func (s UpdateJobQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateJobQueueOutput) GoString() string { + return s.String() +} + +// SetJobQueueArn sets the JobQueueArn field's value. +func (s *UpdateJobQueueOutput) SetJobQueueArn(v string) *UpdateJobQueueOutput { + s.JobQueueArn = &v + return s +} + +// SetJobQueueName sets the JobQueueName field's value. +func (s *UpdateJobQueueOutput) SetJobQueueName(v string) *UpdateJobQueueOutput { + s.JobQueueName = &v + return s +} + +// A data volume used in a job's container properties. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/Volume +type Volume struct { + _ struct{} `type:"structure"` + + // The contents of the host parameter determine whether your data volume persists + // on the host container instance and where it is stored. If the host parameter + // is empty, then the Docker daemon assigns a host path for your data volume, + // but the data is not guaranteed to persist after the containers associated + // with it stop running. + Host *Host `locationName:"host" type:"structure"` + + // The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, + // hyphens, and underscores are allowed. This name is referenced in the sourceVolume + // parameter of container definition mountPoints. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s Volume) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Volume) GoString() string { + return s.String() +} + +// SetHost sets the Host field's value. +func (s *Volume) SetHost(v *Host) *Volume { + s.Host = v + return s +} + +// SetName sets the Name field's value. +func (s *Volume) SetName(v string) *Volume { + s.Name = &v + return s +} + +const ( + // CEStateEnabled is a CEState enum value + CEStateEnabled = "ENABLED" + + // CEStateDisabled is a CEState enum value + CEStateDisabled = "DISABLED" +) + +const ( + // CEStatusCreating is a CEStatus enum value + CEStatusCreating = "CREATING" + + // CEStatusUpdating is a CEStatus enum value + CEStatusUpdating = "UPDATING" + + // CEStatusDeleting is a CEStatus enum value + CEStatusDeleting = "DELETING" + + // CEStatusDeleted is a CEStatus enum value + CEStatusDeleted = "DELETED" + + // CEStatusValid is a CEStatus enum value + CEStatusValid = "VALID" + + // CEStatusInvalid is a CEStatus enum value + CEStatusInvalid = "INVALID" +) + +const ( + // CETypeManaged is a CEType enum value + CETypeManaged = "MANAGED" + + // CETypeUnmanaged is a CEType enum value + CETypeUnmanaged = "UNMANAGED" +) + +const ( + // CRTypeEc2 is a CRType enum value + CRTypeEc2 = "EC2" + + // CRTypeSpot is a CRType enum value + CRTypeSpot = "SPOT" +) + +const ( + // JQStateEnabled is a JQState enum value + JQStateEnabled = "ENABLED" + + // JQStateDisabled is a JQState enum value + JQStateDisabled = "DISABLED" +) + +const ( + // JQStatusCreating is a JQStatus enum value + JQStatusCreating = "CREATING" + + // JQStatusUpdating is a JQStatus enum value + JQStatusUpdating = "UPDATING" + + // JQStatusDeleting is a JQStatus enum value + JQStatusDeleting = "DELETING" + + // JQStatusDeleted is a JQStatus enum value + JQStatusDeleted = "DELETED" + + // JQStatusValid is a JQStatus enum value + JQStatusValid = "VALID" + + // JQStatusInvalid is a JQStatus enum value + JQStatusInvalid = "INVALID" +) + +const ( + // JobDefinitionTypeContainer is a JobDefinitionType enum value + JobDefinitionTypeContainer = "container" +) + +const ( + // JobStatusSubmitted is a JobStatus enum value + JobStatusSubmitted = "SUBMITTED" + + // JobStatusPending is a JobStatus enum value + JobStatusPending = "PENDING" + + // JobStatusRunnable is a JobStatus enum value + JobStatusRunnable = "RUNNABLE" + + // JobStatusStarting is a JobStatus enum value + JobStatusStarting = "STARTING" + + // JobStatusRunning is a JobStatus enum value + JobStatusRunning = "RUNNING" + + // JobStatusSucceeded is a JobStatus enum value + JobStatusSucceeded = "SUCCEEDED" + + // JobStatusFailed is a JobStatus enum value + JobStatusFailed = "FAILED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/doc.go b/vendor/github.com/aws/aws-sdk-go/service/batch/doc.go new file mode 100644 index 000000000..f3a80c9f5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/doc.go @@ -0,0 +1,44 @@ +// 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 contact AWS Batch with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Batch client Batch for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/batch/#New +package batch diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/errors.go b/vendor/github.com/aws/aws-sdk-go/service/batch/errors.go new file mode 100644 index 000000000..8ad5a3bb0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/errors.go @@ -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" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/service.go b/vendor/github.com/aws/aws-sdk-go/service/batch/service.go new file mode 100644 index 000000000..11539325a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/service.go @@ -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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go index 3a4665747..86c60b3bd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go @@ -3559,6 +3559,88 @@ func (c *CloudFormation) UpdateStackSetWithContext(ctx aws.Context, input *Updat return out, req.Send() } +const opUpdateTerminationProtection = "UpdateTerminationProtection" + +// UpdateTerminationProtectionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTerminationProtection operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTerminationProtection for more information on using the UpdateTerminationProtection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTerminationProtectionRequest method. +// req, resp := client.UpdateTerminationProtectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateTerminationProtection +func (c *CloudFormation) UpdateTerminationProtectionRequest(input *UpdateTerminationProtectionInput) (req *request.Request, output *UpdateTerminationProtectionOutput) { + op := &request.Operation{ + Name: opUpdateTerminationProtection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTerminationProtectionInput{} + } + + output = &UpdateTerminationProtectionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTerminationProtection API operation for AWS CloudFormation. +// +// Updates termination protection for the specified stack. If a user attempts +// to delete a stack with termination protection enabled, the operation fails +// and the stack remains unchanged. For more information, see Protecting a Stack +// From Being Deleted (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) +// in the AWS CloudFormation User Guide. +// +// For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), +// termination protection is set on the root stack and cannot be changed directly +// on the nested stack. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudFormation's +// API operation UpdateTerminationProtection for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateTerminationProtection +func (c *CloudFormation) UpdateTerminationProtection(input *UpdateTerminationProtectionInput) (*UpdateTerminationProtectionOutput, error) { + req, out := c.UpdateTerminationProtectionRequest(input) + return out, req.Send() +} + +// UpdateTerminationProtectionWithContext is the same as UpdateTerminationProtection with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTerminationProtection for details on how to use this API operation. +// +// 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) UpdateTerminationProtectionWithContext(ctx aws.Context, input *UpdateTerminationProtectionInput, opts ...request.Option) (*UpdateTerminationProtectionOutput, error) { + req, out := c.UpdateTerminationProtectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opValidateTemplate = "ValidateTemplate" // ValidateTemplateRequest generates a "aws/request.Request" representing the @@ -4473,6 +4555,18 @@ type CreateStackInput struct { // Default: false DisableRollback *bool `type:"boolean"` + // Whether to enable termination protection on the specified stack. If a user + // attempts to delete a stack with termination protection enabled, the operation + // fails and the stack remains unchanged. For more information, see Protecting + // a Stack From Being Deleted (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) + // in the AWS CloudFormation User Guide. Termination protection is disabled + // on stacks by default. + // + // For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), + // termination protection is set on the root stack and cannot be changed directly + // on the nested stack. + EnableTerminationProtection *bool `type:"boolean"` + // The Simple Notification Service (SNS) topic ARNs to publish stack related // events. You can find your SNS topic ARNs using the SNS console or your Command // Line Interface (CLI). @@ -4651,6 +4745,12 @@ func (s *CreateStackInput) SetDisableRollback(v bool) *CreateStackInput { return s } +// SetEnableTerminationProtection sets the EnableTerminationProtection field's value. +func (s *CreateStackInput) SetEnableTerminationProtection(v bool) *CreateStackInput { + s.EnableTerminationProtection = &v + return s +} + // SetNotificationARNs sets the NotificationARNs field's value. func (s *CreateStackInput) SetNotificationARNs(v []*string) *CreateStackInput { s.NotificationARNs = v @@ -8723,6 +8823,9 @@ type Stack struct { // CreationTime is a required field CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + // The time the stack was deleted. + DeletionTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + // A user-defined description associated with the stack. Description *string `min:"1" type:"string"` @@ -8733,6 +8836,15 @@ type Stack struct { // * false: enable rollback DisableRollback *bool `type:"boolean"` + // Whether termination protection is enabled for the stack. + // + // For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), + // termination protection is set on the root stack and cannot be changed directly + // on the nested stack. For more information, see Protecting a Stack From Being + // Deleted (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) + // in the AWS CloudFormation User Guide. + EnableTerminationProtection *bool `type:"boolean"` + // The time the stack was last updated. This field will only be returned if // the stack has been updated at least once. LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` @@ -8746,6 +8858,14 @@ type Stack struct { // A list of Parameter structures. Parameters []*Parameter `type:"list"` + // For nested stacks--stacks created as resources for another stack--the stack + // ID of the direct parent of this stack. For the first level of nested stacks, + // the root stack is also the parent stack. + // + // For more information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // in the AWS CloudFormation User Guide. + ParentId *string `type:"string"` + // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) // role that is associated with the stack. During a stack operation, AWS CloudFormation // uses this role's credentials to make calls on your behalf. @@ -8755,6 +8875,13 @@ type Stack struct { // and updating operations, and for the specified monitoring period afterwards. RollbackConfiguration *RollbackConfiguration `type:"structure"` + // For nested stacks--stacks created as resources for another stack--the stack + // ID of the the top-level stack to which the nested stack ultimately belongs. + // + // For more information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // in the AWS CloudFormation User Guide. + RootId *string `type:"string"` + // Unique identifier of the stack. StackId *string `type:"string"` @@ -8806,6 +8933,12 @@ func (s *Stack) SetCreationTime(v time.Time) *Stack { return s } +// SetDeletionTime sets the DeletionTime field's value. +func (s *Stack) SetDeletionTime(v time.Time) *Stack { + s.DeletionTime = &v + return s +} + // SetDescription sets the Description field's value. func (s *Stack) SetDescription(v string) *Stack { s.Description = &v @@ -8818,6 +8951,12 @@ func (s *Stack) SetDisableRollback(v bool) *Stack { return s } +// SetEnableTerminationProtection sets the EnableTerminationProtection field's value. +func (s *Stack) SetEnableTerminationProtection(v bool) *Stack { + s.EnableTerminationProtection = &v + return s +} + // SetLastUpdatedTime sets the LastUpdatedTime field's value. func (s *Stack) SetLastUpdatedTime(v time.Time) *Stack { s.LastUpdatedTime = &v @@ -8842,6 +8981,12 @@ func (s *Stack) SetParameters(v []*Parameter) *Stack { return s } +// SetParentId sets the ParentId field's value. +func (s *Stack) SetParentId(v string) *Stack { + s.ParentId = &v + return s +} + // SetRoleARN sets the RoleARN field's value. func (s *Stack) SetRoleARN(v string) *Stack { s.RoleARN = &v @@ -8854,6 +8999,12 @@ func (s *Stack) SetRollbackConfiguration(v *RollbackConfiguration) *Stack { return s } +// SetRootId sets the RootId field's value. +func (s *Stack) SetRootId(v string) *Stack { + s.RootId = &v + return s +} + // SetStackId sets the StackId field's value. func (s *Stack) SetStackId(v string) *Stack { s.StackId = &v @@ -9768,6 +9919,10 @@ type StackSetOperationPreferences struct { // time. This is dependent on the value of FailureToleranceCount—MaxConcurrentCount // is at most one more than the FailureToleranceCount . // + // Note that this setting lets you specify the maximum for operations. For large + // deployments, under certain circumstances the actual number of accounts acted + // upon concurrently may be lower due to service throttling. + // // Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage, // but not both. MaxConcurrentCount *int64 `min:"1" type:"integer"` @@ -9780,6 +9935,10 @@ type StackSetOperationPreferences struct { // in cases where rounding down would result is zero. In this case, CloudFormation // sets the number as one instead. // + // Note that this setting lets you specify the maximum for operations. For large + // deployments, under certain circumstances the actual number of accounts acted + // upon concurrently may be lower due to service throttling. + // // Conditional: You must specify either MaxConcurrentCount or MaxConcurrentPercentage, // but not both. MaxConcurrentPercentage *int64 `min:"1" type:"integer"` @@ -10086,6 +10245,21 @@ type StackSummary struct { // the stack has been updated at least once. LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + // For nested stacks--stacks created as resources for another stack--the stack + // ID of the direct parent of this stack. For the first level of nested stacks, + // the root stack is also the parent stack. + // + // For more information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // in the AWS CloudFormation User Guide. + ParentId *string `type:"string"` + + // For nested stacks--stacks created as resources for another stack--the stack + // ID of the the top-level stack to which the nested stack ultimately belongs. + // + // For more information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // in the AWS CloudFormation User Guide. + RootId *string `type:"string"` + // Unique stack identifier. StackId *string `type:"string"` @@ -10134,6 +10308,18 @@ func (s *StackSummary) SetLastUpdatedTime(v time.Time) *StackSummary { return s } +// SetParentId sets the ParentId field's value. +func (s *StackSummary) SetParentId(v string) *StackSummary { + s.ParentId = &v + return s +} + +// SetRootId sets the RootId field's value. +func (s *StackSummary) SetRootId(v string) *StackSummary { + s.RootId = &v + return s +} + // SetStackId sets the StackId field's value. func (s *StackSummary) SetStackId(v string) *StackSummary { s.StackId = &v @@ -10955,6 +11141,87 @@ func (s *UpdateStackSetOutput) SetOperationId(v string) *UpdateStackSetOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateTerminationProtectionInput +type UpdateTerminationProtectionInput struct { + _ struct{} `type:"structure"` + + // Whether to enable termination protection on the specified stack. + // + // EnableTerminationProtection is a required field + EnableTerminationProtection *bool `type:"boolean" required:"true"` + + // The name or unique ID of the stack for which you want to set termination + // protection. + // + // StackName is a required field + StackName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateTerminationProtectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTerminationProtectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTerminationProtectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTerminationProtectionInput"} + if s.EnableTerminationProtection == nil { + invalidParams.Add(request.NewErrParamRequired("EnableTerminationProtection")) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnableTerminationProtection sets the EnableTerminationProtection field's value. +func (s *UpdateTerminationProtectionInput) SetEnableTerminationProtection(v bool) *UpdateTerminationProtectionInput { + s.EnableTerminationProtection = &v + return s +} + +// SetStackName sets the StackName field's value. +func (s *UpdateTerminationProtectionInput) SetStackName(v string) *UpdateTerminationProtectionInput { + s.StackName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateTerminationProtectionOutput +type UpdateTerminationProtectionOutput struct { + _ struct{} `type:"structure"` + + // The unique ID of the stack. + StackId *string `type:"string"` +} + +// String returns the string representation +func (s UpdateTerminationProtectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTerminationProtectionOutput) GoString() string { + return s.String() +} + +// SetStackId sets the StackId field's value. +func (s *UpdateTerminationProtectionOutput) SetStackId(v string) *UpdateTerminationProtectionOutput { + s.StackId = &v + return s +} + // The input for ValidateTemplate action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ValidateTemplateInput type ValidateTemplateInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go index d4f56e356..d82dd221d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go @@ -30,7 +30,7 @@ // // Using the Client // -// To AWS CloudFormation with the SDK use the New function to create +// To contact AWS CloudFormation with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index 8e802dc16..b44abab8c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -90,7 +90,7 @@ func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCl // The argument is invalid. // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateCloudFrontOriginAccessIdentity func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) { @@ -189,7 +189,7 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // Your request contains more trusted signers than are allowed per distribution. // // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers do not exist. +// One or more of your trusted signers don't exist. // // * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" // @@ -249,7 +249,7 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // * ErrCodeTooManyCertificates "TooManyCertificates" // You cannot create anymore custom SSL/TLS certificates. @@ -383,7 +383,7 @@ func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistribution // Your request contains more trusted signers than are allowed per distribution. // // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers do not exist. +// One or more of your trusted signers don't exist. // // * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" // @@ -443,7 +443,7 @@ func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistribution // * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // * ErrCodeTooManyCertificates "TooManyCertificates" // You cannot create anymore custom SSL/TLS certificates. @@ -579,7 +579,7 @@ func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) ( // batch requests, or invalidation objects. // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateInvalidation func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) { @@ -702,7 +702,7 @@ func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDi // Your request contains more trusted signers than are allowed per distribution. // // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers do not exist. +// One or more of your trusted signers don't exist. // // * ErrCodeMissingBody "MissingBody" // This operation requires a body. Ensure that the body is present and the Content-Type @@ -718,7 +718,7 @@ func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDi // The argument is invalid. // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistribution func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) { @@ -814,7 +814,7 @@ func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStr // Your request contains more trusted signers than are allowed per distribution. // // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers do not exist. +// One or more of your trusted signers don't exist. // // * ErrCodeMissingBody "MissingBody" // This operation requires a body. Ensure that the body is present and the Content-Type @@ -830,7 +830,7 @@ func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStr // The argument is invalid. // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // * ErrCodeInvalidTagging "InvalidTagging" // @@ -1042,6 +1042,92 @@ func (c *CloudFront) DeleteDistributionWithContext(ctx aws.Context, input *Delet return out, req.Send() } +const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole2017_03_25" + +// DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteServiceLinkedRole operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteServiceLinkedRole for more information on using the DeleteServiceLinkedRole +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteServiceLinkedRoleRequest method. +// req, resp := client.DeleteServiceLinkedRoleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteServiceLinkedRole +func (c *CloudFront) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput) (req *request.Request, output *DeleteServiceLinkedRoleOutput) { + op := &request.Operation{ + Name: opDeleteServiceLinkedRole, + HTTPMethod: "DELETE", + HTTPPath: "/2017-03-25/service-linked-role/{RoleName}", + } + + if input == nil { + input = &DeleteServiceLinkedRoleInput{} + } + + output = &DeleteServiceLinkedRoleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteServiceLinkedRole API operation for Amazon CloudFront. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation DeleteServiceLinkedRole for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeResourceInUse "ResourceInUse" +// +// * ErrCodeNoSuchResource "NoSuchResource" +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteServiceLinkedRole +func (c *CloudFront) DeleteServiceLinkedRole(input *DeleteServiceLinkedRoleInput) (*DeleteServiceLinkedRoleOutput, error) { + req, out := c.DeleteServiceLinkedRoleRequest(input) + return out, req.Send() +} + +// DeleteServiceLinkedRoleWithContext is the same as DeleteServiceLinkedRole with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteServiceLinkedRole for details on how to use this API operation. +// +// 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) DeleteServiceLinkedRoleWithContext(ctx aws.Context, input *DeleteServiceLinkedRoleInput, opts ...request.Option) (*DeleteServiceLinkedRoleOutput, error) { + req, out := c.DeleteServiceLinkedRoleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteStreamingDistribution = "DeleteStreamingDistribution2017_03_25" // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the @@ -2715,7 +2801,7 @@ func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCl // The argument is invalid. // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateCloudFrontOriginAccessIdentity func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { @@ -2888,7 +2974,7 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // Your request contains more trusted signers than are allowed per distribution. // // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers do not exist. +// One or more of your trusted signers don't exist. // // * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" // @@ -2923,7 +3009,7 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // * ErrCodeTooManyCertificates "TooManyCertificates" // You cannot create anymore custom SSL/TLS certificates. @@ -3067,10 +3153,10 @@ func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDi // Your request contains more trusted signers than are allowed per distribution. // // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers do not exist. +// One or more of your trusted signers don't exist. // // * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items do not match. +// The value of Quantity and the size of Items don't match. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateStreamingDistribution func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) { @@ -4783,7 +4869,7 @@ func (s *CustomOriginConfig) SetOriginSslProtocols(v *OriginSslProtocols) *Custo return s } -// A complex type that describes the default cache behavior if you do not specify +// A complex type that describes the default cache behavior if you don't specify // a CacheBehavior element or if files don't match any of the values of PathPattern // in CacheBehavior elements. You must create exactly one default cache behavior. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DefaultCacheBehavior @@ -5195,6 +5281,58 @@ func (s DeleteDistributionOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteServiceLinkedRoleRequest +type DeleteServiceLinkedRoleInput struct { + _ struct{} `type:"structure"` + + // RoleName is a required field + RoleName *string `location:"uri" locationName:"RoleName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteServiceLinkedRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceLinkedRoleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteServiceLinkedRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteServiceLinkedRoleInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRoleName sets the RoleName field's value. +func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinkedRoleInput { + s.RoleName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteServiceLinkedRoleOutput +type DeleteServiceLinkedRoleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteServiceLinkedRoleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceLinkedRoleOutput) GoString() string { + return s.String() +} + // The request to delete a streaming distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteStreamingDistributionRequest type DeleteStreamingDistributionInput struct { @@ -5289,7 +5427,7 @@ type Distribution struct { // DistributionConfig is a required field DistributionConfig *DistributionConfig `type:"structure" required:"true"` - // The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net. + // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net. // // DomainName is a required field DomainName *string `type:"string" required:"true"` @@ -5430,7 +5568,7 @@ type DistributionConfig struct { // in the Amazon CloudFront Developer Guide. CustomErrorResponses *CustomErrorResponses `type:"structure"` - // A complex type that describes the default cache behavior if you do not specify + // A complex type that describes the default cache behavior if you don't specify // a CacheBehavior element or if files don't match any of the values of PathPattern // in CacheBehavior elements. You must create exactly one default cache behavior. // @@ -5442,7 +5580,7 @@ type DistributionConfig struct { // instead of an object in your distribution (http://www.example.com/product-description.html). // Specifying a default root object avoids exposing the contents of your distribution. // - // Specify only the object name, for example, index.html. Do not add a / before + // Specify only the object name, for example, index.html. Don't add a / before // the object name. // // If you don't want to specify a default root object when you create a distribution, @@ -5490,7 +5628,7 @@ type DistributionConfig struct { // want to access your content. However, if you're using signed URLs or signed // cookies to restrict access to your content, and if you're using a custom // policy that includes the IpAddress parameter to restrict the IP addresses - // that can access your content, do not enable IPv6. If you want to restrict + // that can access your content, don't enable IPv6. If you want to restrict // access to some content by IP address and not restrict access to other content // (or restrict access but not by IP address), you can create two distributions. // For more information, see Creating a Signed URL Using a Custom Policy (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) @@ -5548,18 +5686,90 @@ type DistributionConfig struct { // A complex type that specifies the following: // - // * Which SSL/TLS certificate to use when viewers request objects using - // HTTPS + // * Whether you want viewers to use HTTP or HTTPS to request your objects. // - // * Whether you want CloudFront to use dedicated IP addresses or SNI when - // you're using alternate domain names in your object names + // * If you want viewers to use HTTPS, whether you're using an alternate + // domain name such as example.com or the CloudFront domain name for your + // distribution, such as d111111abcdef8.cloudfront.net. // - // * The minimum protocol version that you want CloudFront to use when communicating - // with viewers + // * If you're using an alternate domain name, whether AWS Certificate Manager + // (ACM) provided the certificate, or you purchased a certificate from a + // third-party certificate authority and imported it into ACM or uploaded + // it to the IAM certificate store. // - // For more information, see Using an HTTPS Connection to Access Your Objects - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) - // in the Amazon Amazon CloudFront Developer Guide. + // You must specify only one of the following values: + // + // * ViewerCertificate$ACMCertificateArn + // + // * ViewerCertificate$IAMCertificateId + // + // * ViewerCertificate$CloudFrontDefaultCertificate + // + // Don't specify false for CloudFrontDefaultCertificate. + // + // If you want viewers to use HTTP instead of HTTPS to request your objects: + // Specify the following value: + // + // true + // + // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache + // behaviors. + // + // If you want viewers to use HTTPS to request your objects: Choose the type + // of certificate that you want to use based on whether you're using an alternate + // domain name for your objects or the CloudFront domain name: + // + // * If you're using an alternate domain name, such as example.com: Specify + // one of the following values, depending on whether ACM provided your certificate + // or you purchased your certificate from third-party certificate authority: + // + // ARN for ACM SSL/TLS certificate where + // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate + // that you want to use for this distribution. + // + // IAM certificate ID where IAM certificate + // ID is the ID that IAM returned when you added the certificate to the IAM + // certificate store. + // + // If you specify ACMCertificateArn or IAMCertificateId, you must also specify + // a value for SSLSupportMethod. + // + // If you choose to use an ACM certificate or a certificate in the IAM certificate + // store, we recommend that you use only an alternate domain name in your + // object URLs (https://example.com/logo.jpg). If you use the domain name + // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) + // and the viewer supports SNI, then CloudFront behaves normally. However, + // if the browser does not support SNI, the user's experience depends on + // the value that you choose for SSLSupportMethod: + // + // vip: The viewer displays a warning because there is a mismatch between the + // CloudFront domain name and the domain name in your SSL/TLS certificate. + // + // sni-only: CloudFront drops the connection with the browser without returning + // the object. + // + // * If you're using the CloudFront domain name for your distribution, such + // as d111111abcdef8.cloudfront.net: Specify the following value: + // + // true + // + // If you want viewers to use HTTPS, you must also specify one of the following + // values in your cache behaviors: + // + // * https-only + // + // * redirect-to-https + // + // You can also optionally require that CloudFront use HTTPS to communicate + // with your origin by specifying one of the following values for the applicable + // origins: + // + // * https-only + // + // * match-viewer + // + // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) + // in the Amazon CloudFront Developer Guide. ViewerCertificate *ViewerCertificate `type:"structure"` // A unique identifier that specifies the AWS WAF web ACL, if any, to associate @@ -5923,14 +6133,14 @@ type DistributionSummary struct { // CustomErrorResponses is a required field CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"` - // A complex type that describes the default cache behavior if you do not specify + // A complex type that describes the default cache behavior if you don't specify // a CacheBehavior element or if files don't match any of the values of PathPattern // in CacheBehavior elements. You must create exactly one default cache behavior. // // DefaultCacheBehavior is a required field DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` - // The domain name that corresponds to the distribution. For example: d604721fxaaqy9.cloudfront.net. + // The domain name that corresponds to the distribution, for example, d111111abcdef8.cloudfront.net. // // DomainName is a required field DomainName *string `type:"string" required:"true"` @@ -5985,18 +6195,90 @@ type DistributionSummary struct { // A complex type that specifies the following: // - // * Which SSL/TLS certificate to use when viewers request objects using - // HTTPS + // * Whether you want viewers to use HTTP or HTTPS to request your objects. // - // * Whether you want CloudFront to use dedicated IP addresses or SNI when - // you're using alternate domain names in your object names + // * If you want viewers to use HTTPS, whether you're using an alternate + // domain name such as example.com or the CloudFront domain name for your + // distribution, such as d111111abcdef8.cloudfront.net. // - // * The minimum protocol version that you want CloudFront to use when communicating - // with viewers + // * If you're using an alternate domain name, whether AWS Certificate Manager + // (ACM) provided the certificate, or you purchased a certificate from a + // third-party certificate authority and imported it into ACM or uploaded + // it to the IAM certificate store. // - // For more information, see Using an HTTPS Connection to Access Your Objects - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) - // in the Amazon Amazon CloudFront Developer Guide. + // You must specify only one of the following values: + // + // * ViewerCertificate$ACMCertificateArn + // + // * ViewerCertificate$IAMCertificateId + // + // * ViewerCertificate$CloudFrontDefaultCertificate + // + // Don't specify false for CloudFrontDefaultCertificate. + // + // If you want viewers to use HTTP instead of HTTPS to request your objects: + // Specify the following value: + // + // true + // + // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache + // behaviors. + // + // If you want viewers to use HTTPS to request your objects: Choose the type + // of certificate that you want to use based on whether you're using an alternate + // domain name for your objects or the CloudFront domain name: + // + // * If you're using an alternate domain name, such as example.com: Specify + // one of the following values, depending on whether ACM provided your certificate + // or you purchased your certificate from third-party certificate authority: + // + // ARN for ACM SSL/TLS certificate where + // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate + // that you want to use for this distribution. + // + // IAM certificate ID where IAM certificate + // ID is the ID that IAM returned when you added the certificate to the IAM + // certificate store. + // + // If you specify ACMCertificateArn or IAMCertificateId, you must also specify + // a value for SSLSupportMethod. + // + // If you choose to use an ACM certificate or a certificate in the IAM certificate + // store, we recommend that you use only an alternate domain name in your + // object URLs (https://example.com/logo.jpg). If you use the domain name + // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) + // and the viewer supports SNI, then CloudFront behaves normally. However, + // if the browser does not support SNI, the user's experience depends on + // the value that you choose for SSLSupportMethod: + // + // vip: The viewer displays a warning because there is a mismatch between the + // CloudFront domain name and the domain name in your SSL/TLS certificate. + // + // sni-only: CloudFront drops the connection with the browser without returning + // the object. + // + // * If you're using the CloudFront domain name for your distribution, such + // as d111111abcdef8.cloudfront.net: Specify the following value: + // + // true + // + // If you want viewers to use HTTPS, you must also specify one of the following + // values in your cache behaviors: + // + // * https-only + // + // * redirect-to-https + // + // You can also optionally require that CloudFront use HTTPS to communicate + // with your origin by specifying one of the following values for the applicable + // origins: + // + // * https-only + // + // * match-viewer + // + // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) + // in the Amazon CloudFront Developer Guide. // // ViewerCertificate is a required field ViewerCertificate *ViewerCertificate `type:"structure" required:"true"` @@ -6140,7 +6422,7 @@ type ForwardedValues struct { Cookies *CookiePreference `type:"structure" required:"true"` // A complex type that specifies the Headers, if any, that you want CloudFront - // to vary upon for this cache behavior. + // to base caching on for this cache behavior. Headers *Headers `type:"structure"` // Indicates whether you want CloudFront to forward query strings to the origin @@ -6257,7 +6539,7 @@ type GeoRestriction struct { // CloudFront and MaxMind both use ISO 3166 country codes. For the current list // of countries and the corresponding codes, see ISO 3166-1-alpha-2 code on // the International Organization for Standardization website. You can also - // refer to the country list in the CloudFront console, which includes both + // refer to the country list on the CloudFront console, which includes both // country names and codes. Items []*string `locationNameList:"Location" type:"list"` @@ -6275,7 +6557,7 @@ type GeoRestriction struct { // restricted by client geo location. // // * blacklist: The Location elements specify the countries in which you - // do not want CloudFront to distribute your content. + // don't want CloudFront to distribute your content. // // * whitelist: The Location elements specify the countries in which you // want CloudFront to distribute your content. @@ -6855,49 +7137,54 @@ func (s *GetStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDi return s } -// A complex type that specifies the headers that you want CloudFront to forward -// to the origin for this cache behavior. +// A complex type that specifies the request headers, if any, that you want +// CloudFront to base caching on for this cache behavior. // -// For the headers that you specify, CloudFront also caches separate versions -// of a specified object based on the header values in viewer requests. For -// example, suppose viewer requests for logo.jpg contain a custom Product header -// that has a value of either Acme or Apex, and you configure CloudFront to -// cache your content based on values in the Product header. CloudFront forwards -// the Product header to the origin and caches the response from the origin -// once for each header value. For more information about caching based on header +// For the headers that you specify, CloudFront caches separate versions of +// a specified object based on the header values in viewer requests. For example, +// suppose viewer requests for logo.jpg contain a custom product header that +// has a value of either acme or apex, and you configure CloudFront to cache +// your content based on values in the product header. CloudFront forwards the +// product header to the origin and caches the response from the origin once +// for each header value. For more information about caching based on header // values, see How CloudFront Forwards and Caches Headers (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) // in the Amazon CloudFront Developer Guide. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Headers type Headers struct { _ struct{} `type:"structure"` - // A complex type that contains one Name element for each header that you want - // CloudFront to forward to the origin and to vary on for this cache behavior. - // If Quantity is 0, omit Items. + // A list that contains one Name element for each header that you want CloudFront + // to use for caching in this cache behavior. If Quantity is 0, omit Items. Items []*string `locationNameList:"Name" type:"list"` - // The number of different headers that you want CloudFront to forward to the - // origin for this cache behavior. You can configure each cache behavior in - // a web distribution to do one of the following: + // The number of different headers that you want CloudFront to base caching + // on for this cache behavior. You can configure each cache behavior in a web + // distribution to do one of the following: // // * Forward all headers to your origin: Specify 1 for Quantity and * for // Name. // - // If you configure CloudFront to forward all headers to your origin, CloudFront - // doesn't cache the objects associated with this cache behavior. Instead, - // it sends every request to the origin. + // CloudFront doesn't cache the objects that are associated with this cache + // behavior. Instead, CloudFront sends every request to the origin. // // * Forward a whitelist of headers you specify: Specify the number of headers - // that you want to forward, and specify the header names in Name elements. - // CloudFront caches your objects based on the values in all of the specified - // headers. CloudFront also forwards the headers that it forwards by default, - // but it caches your objects based only on the headers that you specify. - // + // that you want CloudFront to base caching on. Then specify the header names + // in Name elements. CloudFront caches your objects based on the values in + // the specified headers. // // * Forward only the default headers: Specify 0 for Quantity and omit Items. // In this configuration, CloudFront doesn't cache based on the values in // the request headers. // + // Regardless of which option you choose, CloudFront forwards headers to your + // origin based on whether the origin is an S3 bucket or a custom origin. See + // the following documentation: + // + // * S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates + // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorS3Origin.html#request-s3-removed-headers) + // + // * Custom origin: See HTTP Request Headers and CloudFront Behavior (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-headers-behavior) + // // Quantity is a required field Quantity *int64 `type:"integer" required:"true"` } @@ -7257,19 +7544,34 @@ func (s *KeyPairIds) SetQuantity(v int64) *KeyPairIds { type LambdaFunctionAssociation struct { _ struct{} `type:"structure"` - // Specifies the event type that triggers a Lambda function invocation. Valid - // values are: + // Specifies the event type that triggers a Lambda function invocation. You + // can specify the following values: // - // * viewer-request + // * viewer-request: The function executes when CloudFront receives a request + // from a viewer and before it checks to see whether the requested object + // is in the edge cache. // - // * origin-request + // * origin-request: The function executes only when CloudFront forwards + // a request to your origin. When the requested object is in the edge cache, + // the function doesn't execute. // - // * viewer-response + // * origin-response: The function executes after CloudFront receives a response + // from the origin and before it caches the object in the response. When + // the requested object is in the edge cache, the function doesn't execute. // - // * origin-response + // If the origin returns an HTTP status code other than HTTP 200 (OK), the function + // doesn't execute. + // + // * viewer-response: The function executes before CloudFront returns the + // requested object to the viewer. The function executes regardless of whether + // the object was already in the edge cache. + // + // If the origin returns an HTTP status code other than HTTP 200 (OK), the function + // doesn't execute. EventType *string `type:"string" enum:"EventType"` - // The ARN of the Lambda function. + // The ARN of the Lambda function. You must specify the ARN of a function version; + // you can't specify a Lambda alias or $LATEST. LambdaFunctionARN *string `type:"string"` } @@ -7800,7 +8102,7 @@ type LoggingConfig struct { Bucket *string `type:"string" required:"true"` // Specifies whether you want CloudFront to save access logs to an Amazon S3 - // bucket. If you do not want to enable logging when you create a distribution + // bucket. If you don't want to enable logging when you create a distribution // or if you want to disable logging for an existing distribution, specify false // for Enabled, and specify empty Bucket and Prefix elements. If you specify // false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, @@ -7812,7 +8114,7 @@ type LoggingConfig struct { // Specifies whether you want CloudFront to include cookies in access logs, // specify true for IncludeCookies. If you choose to include cookies in logs, // CloudFront logs all cookies regardless of how you configure the cache behaviors - // for this distribution. If you do not want to include cookies when you create + // for this distribution. If you don't want to include cookies when you create // a distribution or if you want to disable include cookies for an existing // distribution, specify false for IncludeCookies. // @@ -7821,8 +8123,8 @@ type LoggingConfig struct { // An optional string that you want CloudFront to prefix to the access log filenames // for this distribution, for example, myprefix/. If you want to enable logging, - // but you do not want to specify a prefix, you still must include an empty - // Prefix element in the Logging element. + // but you don't want to specify a prefix, you still must include an empty Prefix + // element in the Logging element. // // Prefix is a required field Prefix *string `type:"string" required:"true"` @@ -7908,8 +8210,8 @@ type Origin struct { // // Constraints for Amazon S3 origins: // - // * If you configured Amazon S3 Transfer Acceleration for your bucket, do - // not specify the s3-accelerate endpoint for DomainName. + // * If you configured Amazon S3 Transfer Acceleration for your bucket, don't + // specify the s3-accelerate endpoint for DomainName. // // * The bucket name must be between 3 and 63 characters long (inclusive). // @@ -8056,7 +8358,7 @@ type OriginAccessIdentity struct { // The current configuration information for the identity. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` - // The ID for the origin access identity. For example: E74FTE3AJFJ256A. + // The ID for the origin access identity, for example, E74FTE3AJFJ256A. // // Id is a required field Id *string `type:"string" required:"true"` @@ -8835,7 +9137,7 @@ type StreamingDistribution struct { // ActiveTrustedSigners is a required field ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"` - // The domain name that corresponds to the streaming distribution. For example: + // The domain name that corresponds to the streaming distribution, for example, // s5c39gqb8ow64r.cloudfront.net. // // DomainName is a required field @@ -9248,7 +9550,7 @@ type StreamingDistributionSummary struct { // Comment is a required field Comment *string `type:"string" required:"true"` - // The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net. + // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net. // // DomainName is a required field DomainName *string `type:"string" required:"true"` @@ -9258,7 +9560,7 @@ type StreamingDistributionSummary struct { // Enabled is a required field Enabled *bool `type:"boolean" required:"true"` - // The identifier for the distribution. For example: EDFDVBD632BHDS5. + // The identifier for the distribution, for example, EDFDVBD632BHDS5. // // Id is a required field Id *string `type:"string" required:"true"` @@ -9387,19 +9689,19 @@ type StreamingLoggingConfig struct { Bucket *string `type:"string" required:"true"` // Specifies whether you want CloudFront to save access logs to an Amazon S3 - // bucket. If you do not want to enable logging when you create a streaming - // distribution or if you want to disable logging for an existing streaming - // distribution, specify false for Enabled, and specify empty Bucket and Prefix - // elements. If you specify false for Enabled but you specify values for Bucket - // and Prefix, the values are automatically deleted. + // bucket. If you don't want to enable logging when you create a streaming distribution + // or if you want to disable logging for an existing streaming distribution, + // specify false for Enabled, and specify empty Bucket and Prefix elements. + // If you specify false for Enabled but you specify values for Bucket and Prefix, + // the values are automatically deleted. // // Enabled is a required field Enabled *bool `type:"boolean" required:"true"` // An optional string that you want CloudFront to prefix to the access log filenames // for this streaming distribution, for example, myprefix/. If you want to enable - // logging, but you do not want to specify a prefix, you still must include - // an empty Prefix element in the Logging element. + // logging, but you don't want to specify a prefix, you still must include an + // empty Prefix element in the Logging element. // // Prefix is a required field Prefix *string `type:"string" required:"true"` @@ -10116,130 +10418,157 @@ func (s *UpdateStreamingDistributionOutput) SetStreamingDistribution(v *Streamin // A complex type that specifies the following: // -// * Which SSL/TLS certificate to use when viewers request objects using -// HTTPS +// * Whether you want viewers to use HTTP or HTTPS to request your objects. // -// * Whether you want CloudFront to use dedicated IP addresses or SNI when -// you're using alternate domain names in your object names +// * If you want viewers to use HTTPS, whether you're using an alternate +// domain name such as example.com or the CloudFront domain name for your +// distribution, such as d111111abcdef8.cloudfront.net. // -// * The minimum protocol version that you want CloudFront to use when communicating -// with viewers +// * If you're using an alternate domain name, whether AWS Certificate Manager +// (ACM) provided the certificate, or you purchased a certificate from a +// third-party certificate authority and imported it into ACM or uploaded +// it to the IAM certificate store. // -// For more information, see Using an HTTPS Connection to Access Your Objects -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) -// in the Amazon Amazon CloudFront Developer Guide. +// You must specify only one of the following values: +// +// * ViewerCertificate$ACMCertificateArn +// +// * ViewerCertificate$IAMCertificateId +// +// * ViewerCertificate$CloudFrontDefaultCertificate +// +// Don't specify false for CloudFrontDefaultCertificate. +// +// If you want viewers to use HTTP instead of HTTPS to request your objects: +// Specify the following value: +// +// true +// +// In addition, specify allow-all for ViewerProtocolPolicy for all of your cache +// behaviors. +// +// If you want viewers to use HTTPS to request your objects: Choose the type +// of certificate that you want to use based on whether you're using an alternate +// domain name for your objects or the CloudFront domain name: +// +// * If you're using an alternate domain name, such as example.com: Specify +// one of the following values, depending on whether ACM provided your certificate +// or you purchased your certificate from third-party certificate authority: +// +// ARN for ACM SSL/TLS certificate where +// ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate +// that you want to use for this distribution. +// +// IAM certificate ID where IAM certificate +// ID is the ID that IAM returned when you added the certificate to the IAM +// certificate store. +// +// If you specify ACMCertificateArn or IAMCertificateId, you must also specify +// a value for SSLSupportMethod. +// +// If you choose to use an ACM certificate or a certificate in the IAM certificate +// store, we recommend that you use only an alternate domain name in your +// object URLs (https://example.com/logo.jpg). If you use the domain name +// that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) +// and the viewer supports SNI, then CloudFront behaves normally. However, +// if the browser does not support SNI, the user's experience depends on +// the value that you choose for SSLSupportMethod: +// +// vip: The viewer displays a warning because there is a mismatch between the +// CloudFront domain name and the domain name in your SSL/TLS certificate. +// +// sni-only: CloudFront drops the connection with the browser without returning +// the object. +// +// * If you're using the CloudFront domain name for your distribution, such +// as d111111abcdef8.cloudfront.net: Specify the following value: +// +// true +// +// If you want viewers to use HTTPS, you must also specify one of the following +// values in your cache behaviors: +// +// * https-only +// +// * redirect-to-https +// +// You can also optionally require that CloudFront use HTTPS to communicate +// with your origin by specifying one of the following values for the applicable +// origins: +// +// * https-only +// +// * match-viewer +// +// For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) +// in the Amazon CloudFront Developer Guide. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ViewerCertificate type ViewerCertificate struct { _ struct{} `type:"structure"` + // For information about how and when to use ACMCertificateArn, see ViewerCertificate. ACMCertificateArn *string `type:"string"` - // Include one of these values to specify the following: + // This field has been deprecated. Use one of the following fields instead: // - // * Whether you want viewers to use HTTP or HTTPS to request your objects. + // * ViewerCertificate$ACMCertificateArn // - // * If you want viewers to use HTTPS, whether you're using an alternate - // domain name such as example.com or the CloudFront domain name for your - // distribution, such as d111111abcdef8.cloudfront.net. + // * ViewerCertificate$IAMCertificateId // - // * If you're using an alternate domain name, whether AWS Certificate Manager - // (ACM) provided the certificate, or you purchased a certificate from a - // third-party certificate authority and imported it into ACM or uploaded - // it to the IAM certificate store. - // - // You must specify one (and only one) of the three values. Do not specify false - // for CloudFrontDefaultCertificate. - // - // If you want viewers to use HTTP to request your objects: Specify the following - // value: - // - // true - // - // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache - // behaviors. - // - // If you want viewers to use HTTPS to request your objects: Choose the type - // of certificate that you want to use based on whether you're using an alternate - // domain name for your objects or the CloudFront domain name: - // - // * If you're using an alternate domain name, such as example.com: Specify - // one of the following values, depending on whether ACM provided your certificate - // or you purchased your certificate from third-party certificate authority: - // - // ARN for ACM SSL/TLS certificate where - // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate - // that you want to use for this distribution. - // - // IAM certificate ID where IAM certificate - // ID is the ID that IAM returned when you added the certificate to the IAM - // certificate store. - // - // If you specify ACMCertificateArn or IAMCertificateId, you must also specify - // a value for SSLSupportMethod. - // - // If you choose to use an ACM certificate or a certificate in the IAM certificate - // store, we recommend that you use only an alternate domain name in your - // object URLs (https://example.com/logo.jpg). If you use the domain name - // that is associated with your CloudFront distribution (https://d111111abcdef8.cloudfront.net/logo.jpg) - // and the viewer supports SNI, then CloudFront behaves normally. However, - // if the browser does not support SNI, the user's experience depends on - // the value that you choose for SSLSupportMethod: - // - // vip: The viewer displays a warning because there is a mismatch between the - // CloudFront domain name and the domain name in your SSL/TLS certificate. - // - // sni-only: CloudFront drops the connection with the browser without returning - // the object. - // - // * If you're using the CloudFront domain name for your distribution, such - // as d111111abcdef8.cloudfront.net: Specify the following value: - // - // true - // - // If you want viewers to use HTTPS, you must also specify one of the following - // values in your cache behaviors: - // - // https-only - // - // redirect-to-https - // - // You can also optionally require that CloudFront use HTTPS to communicate - // with your origin by specifying one of the following values for the applicable - // origins: - // - // https-only - // - // match-viewer - // - // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) - // in the Amazon CloudFront Developer Guide. + // * ViewerCertificate$CloudFrontDefaultCertificate Certificate *string `deprecated:"true" type:"string"` - // This field is deprecated. You can use one of the following: [ACMCertificateArn, - // IAMCertificateId, or CloudFrontDefaultCertificate]. + // This field has been deprecated. Use one of the following fields instead: + // + // * ViewerCertificate$ACMCertificateArn + // + // * ViewerCertificate$IAMCertificateId + // + // * ViewerCertificate$CloudFrontDefaultCertificate CertificateSource *string `deprecated:"true" type:"string" enum:"CertificateSource"` + // For information about how and when to use CloudFrontDefaultCertificate, see + // ViewerCertificate. CloudFrontDefaultCertificate *bool `type:"boolean"` + // For information about how and when to use IAMCertificateId, see ViewerCertificate. IAMCertificateId *string `type:"string"` - // Specify the minimum version of the SSL/TLS protocol that you want CloudFront - // to use for HTTPS connections between viewers and CloudFront: SSLv3 or TLSv1. - // CloudFront serves your objects only to viewers that support SSL/TLS version - // that you specify and later versions. The TLSv1 protocol is more secure, so - // we recommend that you specify SSLv3 only if your users are using browsers - // or devices that don't support TLSv1. Note the following: + // Specify the security policy that you want CloudFront to use for HTTPS connections. + // A security policy determines two settings: // - // * If you specify true, - // the minimum SSL protocol version is TLSv1 and can't be changed. + // * The minimum SSL/TLS protocol that CloudFront uses to communicate with + // viewers // - // * If you're using a custom certificate (if you specify a value for ACMCertificateArn - // or for IAMCertificateId) and if you're using SNI (if you specify sni-only - // for SSLSupportMethod), you must specify TLSv1 for MinimumProtocolVersion. + // * The cipher that CloudFront uses to encrypt the content that it returns + // to viewers + // + // On the CloudFront console, this setting is called Security policy. + // + // We recommend that you specify TLSv1.1_2016 unless your users are using browsers + // or devices that do not support TLSv1.1 or later. + // + // When both of the following are true, you must specify TLSv1 or later for + // the security policy: + // + // * You're using a custom certificate: you specified a value for ACMCertificateArn + // or for IAMCertificateId + // + // * You're using SNI: you specified sni-only for SSLSupportMethod + // + // If you specify true for CloudFrontDefaultCertificate, CloudFront automatically + // sets the security policy to TLSv1 regardless of the value that you specify + // for MinimumProtocolVersion. + // + // For information about the relationship between the security policy that you + // choose and the protocols and ciphers that CloudFront uses to communicate + // with viewers, see Supported SSL/TLS Protocols and Ciphers for Communication + // Between Viewers and CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers) + // in the Amazon CloudFront Developer Guide. MinimumProtocolVersion *string `type:"string" enum:"MinimumProtocolVersion"` - // If you specify a value for ACMCertificateArn or for IAMCertificateId, you - // must also specify how you want CloudFront to serve HTTPS requests: using + // If you specify a value for ViewerCertificate$ACMCertificateArn or for ViewerCertificate$IAMCertificateId, + // you must also specify how you want CloudFront to serve HTTPS requests: using // a method that works for all clients or one that works for most clients: // // * vip: CloudFront uses dedicated IP addresses for your content and can @@ -10262,7 +10591,7 @@ type ViewerCertificate struct { // // Use HTTP instead of HTTPS. // - // Do not specify a value for SSLSupportMethod if you specified true. + // Don't specify a value for SSLSupportMethod if you specified true. // // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS.html) // in the Amazon CloudFront Developer Guide. @@ -10405,6 +10734,15 @@ const ( // MinimumProtocolVersionTlsv1 is a MinimumProtocolVersion enum value MinimumProtocolVersionTlsv1 = "TLSv1" + + // MinimumProtocolVersionTlsv12016 is a MinimumProtocolVersion enum value + MinimumProtocolVersionTlsv12016 = "TLSv1_2016" + + // MinimumProtocolVersionTlsv112016 is a MinimumProtocolVersion enum value + MinimumProtocolVersionTlsv112016 = "TLSv1.1_2016" + + // MinimumProtocolVersionTlsv122018 is a MinimumProtocolVersion enum value + MinimumProtocolVersionTlsv122018 = "TLSv1.2_2018" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go index 7dda612a9..5fb8d3622 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go @@ -4,9 +4,9 @@ // 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. +// who need detailed information about CloudFront API actions, data types, and +// errors. For detailed information about CloudFront features, see the Amazon +// CloudFront Developer Guide. // // See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25 for more information on this service. // @@ -15,7 +15,7 @@ // // Using the Client // -// To Amazon CloudFront with the SDK use the New function to create +// To contact Amazon CloudFront with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go index 2a38d5442..ed66a11e5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go @@ -38,7 +38,7 @@ const ( // ErrCodeInconsistentQuantities for service response error code // "InconsistentQuantities". // - // The value of Quantity and the size of Items do not match. + // The value of Quantity and the size of Items don't match. ErrCodeInconsistentQuantities = "InconsistentQuantities" // ErrCodeInvalidArgument for service response error code @@ -222,6 +222,10 @@ const ( // to false. ErrCodePreconditionFailed = "PreconditionFailed" + // ErrCodeResourceInUse for service response error code + // "ResourceInUse". + ErrCodeResourceInUse = "ResourceInUse" + // ErrCodeStreamingDistributionAlreadyExists for service response error code // "StreamingDistributionAlreadyExists". ErrCodeStreamingDistributionAlreadyExists = "StreamingDistributionAlreadyExists" @@ -328,6 +332,6 @@ const ( // ErrCodeTrustedSignerDoesNotExist for service response error code // "TrustedSignerDoesNotExist". // - // One or more of your trusted signers do not exist. + // One or more of your trusted signers don't exist. ErrCodeTrustedSignerDoesNotExist = "TrustedSignerDoesNotExist" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go index 2e5893e5a..8226ac8b0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go @@ -32,7 +32,7 @@ // // Using the Client // -// To AWS CloudTrail with the SDK use the New function to create +// To contact AWS CloudTrail with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go index d3cb024a1..662023540 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go @@ -26,7 +26,7 @@ // // Using the Client // -// To Amazon CloudWatch with the SDK use the New function to create +// To contact Amazon CloudWatch with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 6193f321d..fac78e968 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -830,6 +830,8 @@ func (c *CloudWatchEvents) PutPermissionRequest(input *PutPermissionInput) (req // To enable multiple AWS accounts to put events to your default event bus, // run PutPermission once for each of these accounts. // +// The permission policy on the default event bus cannot exceed 10KB in size. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -847,6 +849,9 @@ func (c *CloudWatchEvents) PutPermissionRequest(input *PutPermissionInput) (req // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a rule or target. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPermission func (c *CloudWatchEvents) PutPermission(input *PutPermissionInput) (*PutPermissionOutput, error) { req, out := c.PutPermissionRequest(input) @@ -1036,10 +1041,16 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // // * AWS Step Functions state machines // +// * Pipelines in Amazon Code Pipeline +// +// * Amazon Inspector assessment templates +// // * Amazon SNS topics // // * Amazon SQS queues // +// * The default event bus of another AWS account +// // Note that creating rules with built-in targets is supported only in the AWS // Management Console. // @@ -1058,10 +1069,16 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // in the Amazon CloudWatch Events User Guide. // // If another AWS account is in the same region and has granted you permission -// (using PutPermission), you can set that account's event bus as a target of -// the rules in your account. To send the matched events to the other account, -// specify that account's event bus as the Arn when you run PutTargets. For -// more information about enabling cross-account events, see PutPermission. +// (using PutPermission), you can send events to that account by setting that +// account's event bus as a target of the rules in your account. To send the +// matched events to the other account, specify that account's event bus as +// the Arn when you run PutTargets. If your account sends events to another +// account, your account is charged for each sent event. Each event sent to +// antoher account is charged as a custom event. The account receiving the event +// is not charged. For more information on pricing, see Amazon CloudWatch Pricing +// (https://aws.amazon.com/cloudwatch/pricing/). +// +// For more information about enabling cross-account events, see PutPermission. // // Input, InputPath and InputTransformer are mutually exclusive and optional // parameters of a target. When a rule is triggered due to a matched event: @@ -1201,6 +1218,9 @@ func (c *CloudWatchEvents) RemovePermissionRequest(input *RemovePermissionInput) // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a rule or target. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemovePermission func (c *CloudWatchEvents) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { req, out := c.RemovePermissionRequest(input) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go index 18792ebae..b55c8709d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go @@ -29,7 +29,7 @@ // // Using the Client // -// To Amazon CloudWatch Events with the SDK use the New function to create +// To contact Amazon CloudWatch Events with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go index a82afd444..a6fc9303b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go @@ -12,6 +12,109 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) +const opAssociateKmsKey = "AssociateKmsKey" + +// AssociateKmsKeyRequest generates a "aws/request.Request" representing the +// client's request for the AssociateKmsKey operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateKmsKey for more information on using the AssociateKmsKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateKmsKeyRequest method. +// req, resp := client.AssociateKmsKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey +func (c *CloudWatchLogs) AssociateKmsKeyRequest(input *AssociateKmsKeyInput) (req *request.Request, output *AssociateKmsKeyOutput) { + op := &request.Operation{ + Name: opAssociateKmsKey, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateKmsKeyInput{} + } + + output = &AssociateKmsKeyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateKmsKey API operation for Amazon CloudWatch Logs. +// +// Associates the specified AWS Key Management Service (AWS KMS) customer master +// key (CMK) with the specified log group. +// +// Associating an AWS KMS CMK with a log group overrides any existing associations +// between the log group and a CMK. After a CMK is associated with a log group, +// all newly ingested data for the log group is encrypted using the CMK. This +// association is stored as long as the data encrypted with the CMK is still +// within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt +// this data whenever it is requested. +// +// Note that it can take up to 5 minutes for this operation to take effect. +// +// If you attempt to associate a CMK with a log group but the CMK does not exist +// or the CMK is disabled, you will receive an InvalidParameterException error. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation AssociateKmsKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeOperationAbortedException "OperationAbortedException" +// Multiple requests to update the same resource were in conflict. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey +func (c *CloudWatchLogs) AssociateKmsKey(input *AssociateKmsKeyInput) (*AssociateKmsKeyOutput, error) { + req, out := c.AssociateKmsKeyRequest(input) + return out, req.Send() +} + +// AssociateKmsKeyWithContext is the same as AssociateKmsKey with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateKmsKey for details on how to use this API operation. +// +// 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 *CloudWatchLogs) AssociateKmsKeyWithContext(ctx aws.Context, input *AssociateKmsKeyInput, opts ...request.Option) (*AssociateKmsKeyOutput, error) { + req, out := c.AssociateKmsKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCancelExportTask = "CancelExportTask" // CancelExportTaskRequest generates a "aws/request.Request" representing the @@ -159,7 +262,7 @@ func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) ( // // You can export logs from multiple log groups or multiple time ranges to the // same S3 bucket. To separate out log data for each export task, you can specify -// a prefix that will be used as the Amazon S3 key prefix for all exported objects. +// a prefix to be used as the Amazon S3 key prefix for all exported objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -268,6 +371,16 @@ func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req // * Log group names consist of the following characters: a-z, A-Z, 0-9, // '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period). // +// If you associate a AWS Key Management Service (AWS KMS) customer master key +// (CMK) with the log group, ingested data is encrypted using the CMK. This +// association is stored as long as the data encrypted with the CMK is still +// within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt +// this data whenever it is requested. +// +// If you attempt to associate a CMK with the log group but the CMK does not +// exist or the CMK is disabled, you will receive an InvalidParameterException +// error. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -778,6 +891,94 @@ func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *D return out, req.Send() } +const opDeleteResourcePolicy = "DeleteResourcePolicy" + +// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResourcePolicyRequest method. +// req, resp := client.DeleteResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy +func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { + op := &request.Operation{ + Name: opDeleteResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteResourcePolicyInput{} + } + + output = &DeleteResourcePolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteResourcePolicy API operation for Amazon CloudWatch Logs. +// +// Deletes a resource policy from this account. This revokes the access of the +// identities in that policy to put log events to this account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation DeleteResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy +func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + return out, req.Send() +} + +// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourcePolicy for details on how to use this API operation. +// +// 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 *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRetentionPolicy = "DeleteRetentionPolicy" // DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the @@ -1519,7 +1720,7 @@ func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFilte // DescribeMetricFilters API operation for Amazon CloudWatch Logs. // // Lists the specified metric filters. You can list all the metric filters or -// filter the results by log name, prefix, metric name, and metric namespace. +// filter the results by log name, prefix, metric name, or metric namespace. // The results are ASCII-sorted by filter name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1611,6 +1812,88 @@ func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, return p.Err() } +const opDescribeResourcePolicies = "DescribeResourcePolicies" + +// DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeResourcePolicies operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeResourcePolicies for more information on using the DescribeResourcePolicies +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeResourcePoliciesRequest method. +// req, resp := client.DescribeResourcePoliciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies +func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) { + op := &request.Operation{ + Name: opDescribeResourcePolicies, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeResourcePoliciesInput{} + } + + output = &DescribeResourcePoliciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeResourcePolicies API operation for Amazon CloudWatch Logs. +// +// Lists the resource policies in this account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation DescribeResourcePolicies for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies +func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) { + req, out := c.DescribeResourcePoliciesRequest(input) + return out, req.Send() +} + +// DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeResourcePolicies for details on how to use this API operation. +// +// 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 *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) { + req, out := c.DescribeResourcePoliciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" // DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the @@ -1754,6 +2037,104 @@ func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Con return p.Err() } +const opDisassociateKmsKey = "DisassociateKmsKey" + +// DisassociateKmsKeyRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateKmsKey operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateKmsKey for more information on using the DisassociateKmsKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateKmsKeyRequest method. +// req, resp := client.DisassociateKmsKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey +func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) { + op := &request.Operation{ + Name: opDisassociateKmsKey, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateKmsKeyInput{} + } + + output = &DisassociateKmsKeyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateKmsKey API operation for Amazon CloudWatch Logs. +// +// Disassociates the associated AWS Key Management Service (AWS KMS) customer +// master key (CMK) from the specified log group. +// +// After the AWS KMS CMK is disassociated from the log group, AWS CloudWatch +// Logs stops encrypting newly ingested data for the log group. All previously +// ingested data remains encrypted, and AWS CloudWatch Logs requires permissions +// for the CMK whenever the encrypted data is requested. +// +// Note that it can take up to 5 minutes for this operation to take effect. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation DisassociateKmsKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeOperationAbortedException "OperationAbortedException" +// Multiple requests to update the same resource were in conflict. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey +func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) { + req, out := c.DisassociateKmsKeyRequest(input) + return out, req.Send() +} + +// DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateKmsKey for details on how to use this API operation. +// +// 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 *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) { + req, out := c.DisassociateKmsKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opFilterLogEvents = "FilterLogEvents" // FilterLogEventsRequest generates a "aws/request.Request" representing the @@ -1808,11 +2189,11 @@ func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (re // or filter the results using a filter pattern, a time range, and the name // of the log stream. // -// By default, this operation returns as many log events as can fit in 1MB (up -// to 10,000 log events), or all the events found within the time range that -// you specify. If the results include a token, then there are more log events -// available, and you can get additional results by specifying the token in -// a subsequent call. +// By default, this operation returns as many log events as can fit in 1 MB +// (up to 10,000 log events), or all the events found within the time range +// that you specify. If the results include a token, then there are more log +// events available, and you can get additional results by specifying the token +// in a subsequent call. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1957,9 +2338,8 @@ func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *req // events or filter using a time range. // // By default, this operation returns as many log events as can fit in a response -// size of 1MB (up to 10,000 log events). If the results include tokens, there -// are more log events available. You can get additional log events by specifying -// one of the tokens in a subsequent call. +// size of 1MB (up to 10,000 log events). You can get additional log events +// by specifying one of the tokens in a subsequent call. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2096,8 +2476,6 @@ func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) ( // // Lists the tags for the specified log group. // -// To add tags, use TagLogGroup. To remove tags, use UntagLogGroup. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2179,14 +2557,14 @@ func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req // PutDestination API operation for Amazon CloudWatch Logs. // // Creates or updates a destination. A destination encapsulates a physical resource -// (such as a Kinesis stream) and enables you to subscribe to a real-time stream -// of log events of a different account, ingested using PutLogEvents. Currently, -// the only supported physical resource is a Amazon Kinesis stream belonging +// (such as an Amazon Kinesis stream) and enables you to subscribe to a real-time +// stream of log events for a different account, ingested using PutLogEvents. +// Currently, the only supported physical resource is a Kinesis stream belonging // to the same account as the destination. // -// A destination controls what is written to its Amazon Kinesis stream through -// an access policy. By default, PutDestination does not set any access policy -// with the destination, which means a cross-account user cannot call PutSubscriptionFilter +// Through an access policy, a destination controls what is written to its Kinesis +// stream. By default, PutDestination does not set any access policy with the +// destination, which means a cross-account user cannot call PutSubscriptionFilter // against this destination. To enable this, the destination owner must call // PutDestinationPolicy after PutDestination. // @@ -2367,7 +2745,9 @@ func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *req // // You must include the sequence token obtained from the response of the previous // call. An upload in a newly created log stream does not require a sequence -// token. You can also get the sequence token using DescribeLogStreams. +// token. You can also get the sequence token using DescribeLogStreams. If you +// call PutLogEvents twice within a narrow time period using the same value +// for sequenceToken, both calls may be successful, or one may be rejected. // // The batch of events must satisfy the following constraints: // @@ -2382,8 +2762,8 @@ func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *req // retention period of the log group. // // * The log events in the batch must be in chronological ordered by their -// timestamp (the time the event occurred, expressed as the number of milliseconds -// since Jan 1, 1970 00:00:00 UTC). +// time stamp (the time the event occurred, expressed as the number of milliseconds +// after Jan 1, 1970 00:00:00 UTC). // // * The maximum number of log events in a batch is 10,000. // @@ -2533,6 +2913,93 @@ func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutM return out, req.Send() } +const opPutResourcePolicy = "PutResourcePolicy" + +// PutResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutResourcePolicy for more information on using the PutResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutResourcePolicyRequest method. +// req, resp := client.PutResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy +func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { + op := &request.Operation{ + Name: opPutResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutResourcePolicyInput{} + } + + output = &PutResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutResourcePolicy API operation for Amazon CloudWatch Logs. +// +// Creates or updates a resource policy allowing other AWS services to put log +// events to this account, such as Amazon Route 53. An account can have up to +// 50 resource policies per region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation PutResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have reached the maximum number of resources that can be created. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy +func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + return out, req.Send() +} + +// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutResourcePolicy for details on how to use this API operation. +// +// 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 *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutRetentionPolicy = "PutRetentionPolicy" // PutRetentionPolicyRequest generates a "aws/request.Request" representing the @@ -2580,7 +3047,7 @@ func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInpu // PutRetentionPolicy API operation for Amazon CloudWatch Logs. // // Sets the retention of the specified log group. A retention policy allows -// you to configure the number of days you want to retain log events in the +// you to configure the number of days for which to retain log events in the // specified log group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2682,16 +3149,16 @@ func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilt // * A logical destination that belongs to a different account, for cross-account // delivery. // -// * An Amazon Kinesis Firehose stream that belongs to the same account as -// the subscription filter, for same-account delivery. +// * An Amazon Kinesis Firehose delivery stream that belongs to the same +// account as the subscription filter, for same-account delivery. // // * An AWS Lambda function that belongs to the same account as the subscription // filter, for same-account delivery. // // There can only be one subscription filter associated with a log group. If // you are updating an existing filter, you must specify the correct name in -// filterName. Otherwise, the call will fail because you cannot associate a -// second filter with a log group. +// filterName. Otherwise, the call fails because you cannot associate a second +// filter with a log group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2997,6 +3464,79 @@ func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagL return out, req.Send() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKeyRequest +type AssociateKmsKeyInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. + // For more information, see Amazon Resource Names - AWS Key Management Service + // (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). + // + // KmsKeyId is a required field + KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"` + + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateKmsKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateKmsKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateKmsKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"} + if s.KmsKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput { + s.KmsKeyId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput { + s.LogGroupName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKeyOutput +type AssociateKmsKeyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateKmsKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateKmsKeyOutput) GoString() string { + return s.String() +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTaskRequest type CancelExportTaskInput struct { _ struct{} `type:"structure"` @@ -3069,7 +3609,7 @@ type CreateExportTaskInput struct { DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` // The start time of the range for the request, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this + // after Jan 1, 1970 00:00:00 UTC. Events with a time stamp earlier than this // time are not exported. // // From is a required field @@ -3088,8 +3628,8 @@ type CreateExportTaskInput struct { TaskName *string `locationName:"taskName" min:"1" type:"string"` // The end time of the range for the request, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time - // are not exported. + // after Jan 1, 1970 00:00:00 UTC. Events with a time stamp later than this + // time are not exported. // // To is a required field To *int64 `locationName:"to" type:"long" required:"true"` @@ -3209,6 +3749,11 @@ func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput { type CreateLogGroupInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. + // For more information, see Amazon Resource Names - AWS Key Management Service + // (AWS KMS) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + // The name of the log group. // // LogGroupName is a required field @@ -3247,6 +3792,12 @@ func (s *CreateLogGroupInput) Validate() error { return nil } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput { + s.KmsKeyId = &v + return s +} + // SetLogGroupName sets the LogGroupName field's value. func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput { s.LogGroupName = &v @@ -3610,6 +4161,45 @@ func (s DeleteMetricFilterOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicyRequest +type DeleteResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the policy to be revoked. This parameter is required. + PolicyName *string `locationName:"policyName" type:"string"` +} + +// String returns the string representation +func (s DeleteResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyInput) GoString() string { + return s.String() +} + +// SetPolicyName sets the PolicyName field's value. +func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput { + s.PolicyName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicyOutput +type DeleteResourcePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyOutput) GoString() string { + return s.String() +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicyRequest type DeleteRetentionPolicyInput struct { _ struct{} `type:"structure"` @@ -4063,7 +4653,7 @@ type DescribeLogStreamsInput struct { // The prefix to match. // - // You cannot specify this parameter if orderBy is LastEventTime. + // iIf orderBy is LastEventTime,you cannot specify this parameter. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` // The token for the next set of items to return. (You received this token from @@ -4079,7 +4669,7 @@ type DescribeLogStreamsInput struct { // // lastEventTimestamp represents the time of the most recent log event in the // log stream in CloudWatch Logs. This number is expressed as the number of - // milliseconds since Jan 1, 1970 00:00:00 UTC. lastEventTimeStamp updates on + // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimeStamp updates on // an eventual consistency basis. It typically updates in less than an hour // from ingestion, but may take longer in some rare situations. OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` @@ -4204,7 +4794,8 @@ type DescribeMetricFiltersInput struct { // The name of the log group. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // The name of the CloudWatch metric. + // The name of the CloudWatch metric to which the monitored log information + // should be published. For example, you may publish to a metric called ErrorCount. MetricName *string `locationName:"metricName" type:"string"` // The namespace of the CloudWatch metric. @@ -4317,6 +4908,91 @@ func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFilt return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePoliciesRequest +type DescribeResourcePoliciesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of resource policies to be displayed with one call of + // this API. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeResourcePoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeResourcePoliciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeResourcePoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePoliciesResponse +type DescribeResourcePoliciesOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The resource policies that exist in this account. + ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"` +} + +// String returns the string representation +func (s DescribeResourcePoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeResourcePoliciesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput { + s.NextToken = &v + return s +} + +// SetResourcePolicies sets the ResourcePolicies field's value. +func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput { + s.ResourcePolicies = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFiltersRequest type DescribeSubscriptionFiltersInput struct { _ struct{} `type:"structure"` @@ -4444,7 +5120,7 @@ type Destination struct { Arn *string `locationName:"arn" type:"string"` // The creation time of the destination, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. + // after Jan 1, 1970 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` // The name of the destination. @@ -4453,8 +5129,8 @@ type Destination struct { // A role for impersonation, used when delivering log events to the target. RoleArn *string `locationName:"roleArn" min:"1" type:"string"` - // The Amazon Resource Name (ARN) of the physical target where the log events - // will be delivered (for example, a Kinesis stream). + // The Amazon Resource Name (ARN) of the physical target to where the log events + // are delivered (for example, a Kinesis stream). TargetArn *string `locationName:"targetArn" min:"1" type:"string"` } @@ -4504,6 +5180,63 @@ func (s *Destination) SetTargetArn(v string) *Destination { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKeyRequest +type DisassociateKmsKeyInput struct { + _ struct{} `type:"structure"` + + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateKmsKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateKmsKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateKmsKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput { + s.LogGroupName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKeyOutput +type DisassociateKmsKeyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateKmsKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateKmsKeyOutput) GoString() string { + return s.String() +} + // Represents an export task. // Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ExportTask type ExportTask struct { @@ -4518,8 +5251,8 @@ type ExportTask struct { // Execution info about the export task. ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` - // The start time, expressed as the number of milliseconds since Jan 1, 1970 - // 00:00:00 UTC. Events with a timestamp prior to this time are not exported. + // The start time, expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC. Events with a time stamp before this time are not exported. From *int64 `locationName:"from" type:"long"` // The name of the log group from which logs data was exported. @@ -4534,8 +5267,8 @@ type ExportTask struct { // The name of the export task. TaskName *string `locationName:"taskName" min:"1" type:"string"` - // The end time, expressed as the number of milliseconds since Jan 1, 1970 00:00:00 - // UTC. Events with a timestamp later than this time are not exported. + // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 + // UTC. Events with a time stamp later than this time are not exported. To *int64 `locationName:"to" type:"long"` } @@ -4609,11 +5342,11 @@ type ExportTaskExecutionInfo struct { _ struct{} `type:"structure"` // The completion time of the export task, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. + // after Jan 1, 1970 00:00:00 UTC. CompletionTime *int64 `locationName:"completionTime" type:"long"` // The creation time of the export task, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. + // after Jan 1, 1970 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` } @@ -4677,8 +5410,8 @@ func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus { type FilterLogEventsInput struct { _ struct{} `type:"structure"` - // The end of the time range, expressed as the number of milliseconds since - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are + // The end of the time range, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. Events with a time stamp later than this time are // not returned. EndTime *int64 `locationName:"endTime" type:"long"` @@ -4686,8 +5419,8 @@ type FilterLogEventsInput struct { FilterPattern *string `locationName:"filterPattern" type:"string"` // If the value is true, the operation makes a best effort to provide responses - // that contain events from multiple log streams within the log group interleaved - // in a single response. If the value is false all the matched log events in + // that contain events from multiple log streams within the log group, interleaved + // in a single response. If the value is false, all the matched log events in // the first log stream are searched first, then those in the next log stream, // and so on. The default is false. Interleaved *bool `locationName:"interleaved" type:"boolean"` @@ -4707,9 +5440,9 @@ type FilterLogEventsInput struct { // from a previous call.) NextToken *string `locationName:"nextToken" min:"1" type:"string"` - // The start of the time range, expressed as the number of milliseconds since - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp prior to this time are - // not returned. + // The start of the time range, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. Events with a time stamp before this time are not + // returned. StartTime *int64 `locationName:"startTime" type:"long"` } @@ -4849,7 +5582,7 @@ type FilteredLogEvent struct { EventId *string `locationName:"eventId" type:"string"` // The time the event was ingested, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. + // after Jan 1, 1970 00:00:00 UTC. IngestionTime *int64 `locationName:"ingestionTime" type:"long"` // The name of the log stream this event belongs to. @@ -4858,7 +5591,7 @@ type FilteredLogEvent struct { // The data contained in the log event. Message *string `locationName:"message" min:"1" type:"string"` - // The time the event occurred, expressed as the number of milliseconds since + // The time the event occurred, expressed as the number of milliseconds after // Jan 1, 1970 00:00:00 UTC. Timestamp *int64 `locationName:"timestamp" type:"long"` } @@ -4907,14 +5640,14 @@ func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent { type GetLogEventsInput struct { _ struct{} `type:"structure"` - // The end of the time range, expressed as the number of milliseconds since - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are + // The end of the time range, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. Events with a time stamp later than this time are // not included. EndTime *int64 `locationName:"endTime" type:"long"` // The maximum number of log events returned. If you don't specify a value, - // the maximum is as many log events as can fit in a response size of 1MB, up - // to 10,000 log events. + // the maximum is as many log events as can fit in a response size of 1 MB, + // up to 10,000 log events. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The name of the log group. @@ -4936,8 +5669,8 @@ type GetLogEventsInput struct { // is false. StartFromHead *bool `locationName:"startFromHead" type:"boolean"` - // The start of the time range, expressed as the number of milliseconds since - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this time + // The start of the time range, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. Events with a time stamp earlier than this time // are not included. StartTime *int64 `locationName:"startTime" type:"long"` } @@ -5077,7 +5810,7 @@ type InputLogEvent struct { // Message is a required field Message *string `locationName:"message" min:"1" type:"string" required:"true"` - // The time the event occurred, expressed as the number of milliseconds since + // The time the event occurred, expressed as the number of milliseconds fter // Jan 1, 1970 00:00:00 UTC. // // Timestamp is a required field @@ -5171,7 +5904,7 @@ func (s *ListTagsLogGroupInput) SetLogGroupName(v string) *ListTagsLogGroupInput type ListTagsLogGroupOutput struct { _ struct{} `type:"structure"` - // The tags. + // The tags for the log group. Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } @@ -5200,9 +5933,12 @@ type LogGroup struct { Arn *string `locationName:"arn" type:"string"` // The creation time of the log group, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. + // after Jan 1, 1970 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` + // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + // The name of the log group. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` @@ -5240,6 +5976,12 @@ func (s *LogGroup) SetCreationTime(v int64) *LogGroup { return s } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *LogGroup) SetKmsKeyId(v string) *LogGroup { + s.KmsKeyId = &v + return s +} + // SetLogGroupName sets the LogGroupName field's value. func (s *LogGroup) SetLogGroupName(v string) *LogGroup { s.LogGroupName = &v @@ -5274,21 +6016,21 @@ type LogStream struct { Arn *string `locationName:"arn" type:"string"` // The creation time of the stream, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. + // after Jan 1, 1970 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` - // The time of the first event, expressed as the number of milliseconds since + // The time of the first event, expressed as the number of milliseconds after // Jan 1, 1970 00:00:00 UTC. FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` // the time of the most recent log event in the log stream in CloudWatch Logs. - // This number is expressed as the number of milliseconds since Jan 1, 1970 + // This number is expressed as the number of milliseconds after Jan 1, 1970 // 00:00:00 UTC. lastEventTime updates on an eventual consistency basis. It // typically updates in less than an hour from ingestion, but may take longer // in some rare situations. LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` - // The ingestion time, expressed as the number of milliseconds since Jan 1, + // The ingestion time, expressed as the number of milliseconds after Jan 1, // 1970 00:00:00 UTC. LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"` @@ -5368,14 +6110,14 @@ type MetricFilter struct { _ struct{} `type:"structure"` // The creation time of the metric filter, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. + // after Jan 1, 1970 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` // The name of the metric filter. FilterName *string `locationName:"filterName" min:"1" type:"string"` // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain timestamps, IP addresses, + // each log event. For example, a log event may contain time stamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. FilterPattern *string `locationName:"filterPattern" type:"string"` @@ -5470,7 +6212,7 @@ func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *Metr return s } -// Indicates how to transform ingested log events into metric data in a CloudWatch +// Indicates how to transform ingested log events in to metric data in a CloudWatch // metric. // Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/MetricTransformation type MetricTransformation struct { @@ -5556,13 +6298,13 @@ type OutputLogEvent struct { _ struct{} `type:"structure"` // The time the event was ingested, expressed as the number of milliseconds - // since Jan 1, 1970 00:00:00 UTC. + // after Jan 1, 1970 00:00:00 UTC. IngestionTime *int64 `locationName:"ingestionTime" type:"long"` // The data contained in the log event. Message *string `locationName:"message" min:"1" type:"string"` - // The time the event occurred, expressed as the number of milliseconds since + // The time the event occurred, expressed as the number of milliseconds after // Jan 1, 1970 00:00:00 UTC. Timestamp *int64 `locationName:"timestamp" type:"long"` } @@ -5604,13 +6346,13 @@ type PutDestinationInput struct { // DestinationName is a required field DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` - // The ARN of an IAM role that grants CloudWatch Logs permissions to call Amazon - // Kinesis PutRecord on the destination stream. + // The ARN of an IAM role that grants CloudWatch Logs permissions to call the + // Amazon Kinesis PutRecord operation on the destination stream. // // RoleArn is a required field RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` - // The ARN of an Amazon Kinesis stream to deliver matching log events to. + // The ARN of an Amazon Kinesis stream to which to deliver matching log events. // // TargetArn is a required field TargetArn *string `locationName:"targetArn" min:"1" type:"string" required:"true"` @@ -5790,7 +6532,11 @@ type PutLogEventsInput struct { // LogStreamName is a required field LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` - // The sequence token. + // The sequence token obtained from the response of the previous PutLogEvents + // call. An upload in a newly created log stream does not require a sequence + // token. You can also get the sequence token using DescribeLogStreams. If you + // call PutLogEvents twice within a narrow time period using the same value + // for sequenceToken, both calls may be successful, or one may be rejected. SequenceToken *string `locationName:"sequenceToken" min:"1" type:"string"` } @@ -5921,7 +6667,7 @@ type PutMetricFilterInput struct { // LogGroupName is a required field LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - // A collection of information needed to define how metric data gets emitted. + // A collection of information that defines how metric data gets emitted. // // MetricTransformations is a required field MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list" required:"true"` @@ -6017,6 +6763,85 @@ func (s PutMetricFilterOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicyRequest +type PutResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // Details of the new policy, including the identity of the principal that is + // enabled to put logs to this account. This is formatted as a JSON string. + // + // The following example creates a resource policy enabling the Route 53 service + // to put DNS query logs in to the specified log group. Replace "logArn" with + // the ARN of your CloudWatch Logs resource, such as a log group or log stream. + // + // { "Version": "2012-10-17" "Statement": [ { "Sid": "Route53LogsToCloudWatchLogs", + // "Effect": "Allow", "Principal": { "Service": [ "route53.amazonaws.com" ] + // }, "Action":"logs:PutLogEvents", "Resource": logArn } ] } + PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"` + + // Name of the new policy. This parameter is required. + PolicyName *string `locationName:"policyName" type:"string"` +} + +// String returns the string representation +func (s PutResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} + if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *PutResourcePolicyInput) SetPolicyDocument(v string) *PutResourcePolicyInput { + s.PolicyDocument = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *PutResourcePolicyInput) SetPolicyName(v string) *PutResourcePolicyInput { + s.PolicyName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicyResponse +type PutResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The new policy. + ResourcePolicy *ResourcePolicy `locationName:"resourcePolicy" type:"structure"` +} + +// String returns the string representation +func (s PutResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetResourcePolicy sets the ResourcePolicy field's value. +func (s *PutResourcePolicyOutput) SetResourcePolicy(v *ResourcePolicy) *PutResourcePolicyOutput { + s.ResourcePolicy = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicyRequest type PutRetentionPolicyInput struct { _ struct{} `type:"structure"` @@ -6103,8 +6928,8 @@ type PutSubscriptionFilterInput struct { // * A logical destination (specified using an ARN) belonging to a different // account, for cross-account delivery. // - // * An Amazon Kinesis Firehose stream belonging to the same account as the - // subscription filter, for same-account delivery. + // * An Amazon Kinesis Firehose delivery stream belonging to the same account + // as the subscription filter, for same-account delivery. // // * An AWS Lambda function belonging to the same account as the subscription // filter, for same-account delivery. @@ -6112,15 +6937,16 @@ type PutSubscriptionFilterInput struct { // DestinationArn is a required field DestinationArn *string `locationName:"destinationArn" min:"1" type:"string" required:"true"` - // The method used to distribute log data to the destination, when the destination - // is an Amazon Kinesis stream. By default, log data is grouped by log stream. - // For a more even distribution, you can group log data randomly. + // The method used to distribute log data to the destination. By default log + // data is grouped by log stream, but the grouping can be set to random for + // a more even distribution. This property is only applicable when the destination + // is an Amazon Kinesis stream. Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"` // A name for the subscription filter. If you are updating an existing filter, - // you must specify the correct name in filterName. Otherwise, the call will - // fail because you cannot associate a second filter with a log group. To find - // the name of the filter currently associated with a log group, use DescribeSubscriptionFilters. + // you must specify the correct name in filterName. Otherwise, the call fails + // because you cannot associate a second filter with a log group. To find the + // name of the filter currently associated with a log group, use DescribeSubscriptionFilters. // // FilterName is a required field FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` @@ -6280,6 +7106,51 @@ func (s *RejectedLogEventsInfo) SetTooOldLogEventEndIndex(v int64) *RejectedLogE return s } +// A policy enabling one or more entities to put logs to a log group in this +// account. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ResourcePolicy +type ResourcePolicy struct { + _ struct{} `type:"structure"` + + // Time stamp showing when this policy was last updated, expressed as the number + // of milliseconds after Jan 1, 1970 00:00:00 UTC. + LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` + + // The details of the policy. + PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"` + + // The name of the resource policy. + PolicyName *string `locationName:"policyName" type:"string"` +} + +// String returns the string representation +func (s ResourcePolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourcePolicy) GoString() string { + return s.String() +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *ResourcePolicy) SetLastUpdatedTime(v int64) *ResourcePolicy { + s.LastUpdatedTime = &v + return s +} + +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *ResourcePolicy) SetPolicyDocument(v string) *ResourcePolicy { + s.PolicyDocument = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *ResourcePolicy) SetPolicyName(v string) *ResourcePolicy { + s.PolicyName = &v + return s +} + // Represents the search status of a log stream. // Please also see https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/SearchedLogStream type SearchedLogStream struct { @@ -6320,21 +7191,21 @@ type SubscriptionFilter struct { _ struct{} `type:"structure"` // The creation time of the subscription filter, expressed as the number of - // milliseconds since Jan 1, 1970 00:00:00 UTC. + // milliseconds after Jan 1, 1970 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` // The Amazon Resource Name (ARN) of the destination. DestinationArn *string `locationName:"destinationArn" min:"1" type:"string"` - // The method used to distribute log data to the destination, when the destination - // is an Amazon Kinesis stream. + // The method used to distribute log data to the destination, which can be either + // random or grouped by log stream. Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"` // The name of the subscription filter. FilterName *string `locationName:"filterName" min:"1" type:"string"` // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain timestamps, IP addresses, + // each log event. For example, a log event may contain time stamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. FilterPattern *string `locationName:"filterPattern" type:"string"` @@ -6476,7 +7347,7 @@ type TestMetricFilterInput struct { _ struct{} `type:"structure"` // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain timestamps, IP addresses, + // each log event. For example, a log event may contain time stamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. // @@ -6628,6 +7499,8 @@ func (s UntagLogGroupOutput) GoString() string { return s.String() } +// The method used to distribute log data to the destination, which can be either +// random or grouped by log stream. const ( // DistributionRandom is a Distribution enum value DistributionRandom = "Random" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go index 9818551d1..a20147e7b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go @@ -4,30 +4,30 @@ // requests to Amazon CloudWatch Logs. // // You can use Amazon CloudWatch Logs to monitor, store, and access your log -// files from EC2 instances, Amazon CloudTrail, or other sources. You can then -// retrieve the associated log data from CloudWatch Logs using the Amazon CloudWatch -// console, the CloudWatch Logs commands in the AWS CLI, the CloudWatch Logs -// API, or the CloudWatch Logs SDK. +// files from Amazon EC2 instances, AWS CloudTrail, or other sources. You can +// then retrieve the associated log data from CloudWatch Logs using the CloudWatch +// console, CloudWatch Logs commands in the AWS CLI, CloudWatch Logs API, or +// CloudWatch Logs SDK. // // You can use CloudWatch Logs to: // -// * Monitor Logs from Amazon EC2 Instances in Real-time: You can use CloudWatch +// * Monitor logs from EC2 instances in real-time: You can use CloudWatch // Logs to monitor applications and systems using log data. For example, // CloudWatch Logs can track the number of errors that occur in your application // logs and send you a notification whenever the rate of errors exceeds a -// threshold you specify. CloudWatch Logs uses your log data for monitoring; +// threshold that you specify. CloudWatch Logs uses your log data for monitoring; // so, no code changes are required. For example, you can monitor application // logs for specific literal terms (such as "NullReferenceException") or // count the number of occurrences of a literal term at a particular position // in log data (such as "404" status codes in an Apache access log). When // the term you are searching for is found, CloudWatch Logs reports the data -// to a Amazon CloudWatch metric that you specify. +// to a CloudWatch metric that you specify. // -// * Monitor Amazon CloudTrail Logged Events: You can create alarms in Amazon -// CloudWatch and receive notifications of particular API activity as captured -// by CloudTrail and use the notification to perform troubleshooting. +// * Monitor AWS CloudTrail logged events: You can create alarms in CloudWatch +// and receive notifications of particular API activity as captured by CloudTrail +// and use the notification to perform troubleshooting. // -// * Archive Log Data: You can use CloudWatch Logs to store your log data +// * Archive log data: You can use CloudWatch Logs to store your log data // in highly durable storage. You can change the log retention setting so // that any log events older than this setting are automatically deleted. // The CloudWatch Logs agent makes it easy to quickly send both rotated and @@ -41,7 +41,7 @@ // // Using the Client // -// To Amazon CloudWatch Logs with the SDK use the New function to create +// To contact Amazon CloudWatch Logs with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 07596eda1..e4b4bdb4a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -334,6 +334,106 @@ func (c *CodeBuild) CreateProjectWithContext(ctx aws.Context, input *CreateProje return out, req.Send() } +const opCreateWebhook = "CreateWebhook" + +// CreateWebhookRequest generates a "aws/request.Request" representing the +// client's request for the CreateWebhook operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateWebhook for more information on using the CreateWebhook +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateWebhookRequest method. +// req, resp := client.CreateWebhookRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateWebhook +func (c *CodeBuild) CreateWebhookRequest(input *CreateWebhookInput) (req *request.Request, output *CreateWebhookOutput) { + op := &request.Operation{ + Name: opCreateWebhook, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateWebhookInput{} + } + + output = &CreateWebhookOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateWebhook API operation for AWS CodeBuild. +// +// For an existing AWS CodeBuild build project that has its source code stored +// in a GitHub repository, enables AWS CodeBuild to begin automatically rebuilding +// the source code every time a code change is pushed to the repository. +// +// If you enable webhooks for an AWS CodeBuild project, and the project is used +// as a build step in AWS CodePipeline, then two identical builds will be created +// for each commit. One build is triggered through webhooks, and one through +// AWS CodePipeline. Because billing is on a per-build basis, you will be billed +// for both builds. Therefore, if you are using AWS CodePipeline, we recommend +// that you disable webhooks in CodeBuild. In the AWS CodeBuild console, clear +// the Webhook box. For more information, see step 9 in Change a Build Project’s +// Settings (http://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeBuild's +// API operation CreateWebhook for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The input value that was provided is not valid. +// +// * ErrCodeOAuthProviderException "OAuthProviderException" +// There was a problem with the underlying OAuth provider. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The specified AWS resource cannot be created, because an AWS resource with +// the same settings already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified AWS resource cannot be found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateWebhook +func (c *CodeBuild) CreateWebhook(input *CreateWebhookInput) (*CreateWebhookOutput, error) { + req, out := c.CreateWebhookRequest(input) + return out, req.Send() +} + +// CreateWebhookWithContext is the same as CreateWebhook with the addition of +// the ability to pass a context and additional request options. +// +// See CreateWebhook for details on how to use this API operation. +// +// 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 *CodeBuild) CreateWebhookWithContext(ctx aws.Context, input *CreateWebhookInput, opts ...request.Option) (*CreateWebhookOutput, error) { + req, out := c.CreateWebhookRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteProject = "DeleteProject" // DeleteProjectRequest generates a "aws/request.Request" representing the @@ -413,6 +513,93 @@ func (c *CodeBuild) DeleteProjectWithContext(ctx aws.Context, input *DeleteProje return out, req.Send() } +const opDeleteWebhook = "DeleteWebhook" + +// DeleteWebhookRequest generates a "aws/request.Request" representing the +// client's request for the DeleteWebhook operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteWebhook for more information on using the DeleteWebhook +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteWebhookRequest method. +// req, resp := client.DeleteWebhookRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteWebhook +func (c *CodeBuild) DeleteWebhookRequest(input *DeleteWebhookInput) (req *request.Request, output *DeleteWebhookOutput) { + op := &request.Operation{ + Name: opDeleteWebhook, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteWebhookInput{} + } + + output = &DeleteWebhookOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteWebhook API operation for AWS CodeBuild. +// +// For an existing AWS CodeBuild build project that has its source code stored +// in a GitHub repository, stops AWS CodeBuild from automatically rebuilding +// the source code every time a code change is pushed to the repository. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeBuild's +// API operation DeleteWebhook for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The input value that was provided is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified AWS resource cannot be found. +// +// * ErrCodeOAuthProviderException "OAuthProviderException" +// There was a problem with the underlying OAuth provider. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteWebhook +func (c *CodeBuild) DeleteWebhook(input *DeleteWebhookInput) (*DeleteWebhookOutput, error) { + req, out := c.DeleteWebhookRequest(input) + return out, req.Send() +} + +// DeleteWebhookWithContext is the same as DeleteWebhook with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteWebhook for details on how to use this API operation. +// +// 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 *CodeBuild) DeleteWebhookWithContext(ctx aws.Context, input *DeleteWebhookInput, opts ...request.Option) (*DeleteWebhookOutput, error) { + req, out := c.DeleteWebhookRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListBuilds = "ListBuilds" // ListBuildsRequest generates a "aws/request.Request" representing the @@ -1778,6 +1965,73 @@ func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateWebhookInput +type CreateWebhookInput struct { + _ struct{} `type:"structure"` + + // The name of the build project. + // + // ProjectName is a required field + ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateWebhookInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateWebhookInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateWebhookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateWebhookInput"} + if s.ProjectName == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectName")) + } + if s.ProjectName != nil && len(*s.ProjectName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProjectName sets the ProjectName field's value. +func (s *CreateWebhookInput) SetProjectName(v string) *CreateWebhookInput { + s.ProjectName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateWebhookOutput +type CreateWebhookOutput struct { + _ struct{} `type:"structure"` + + // Information about a webhook in GitHub that connects repository events to + // a build project in AWS CodeBuild. + Webhook *Webhook `locationName:"webhook" type:"structure"` +} + +// String returns the string representation +func (s CreateWebhookOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateWebhookOutput) GoString() string { + return s.String() +} + +// SetWebhook sets the Webhook field's value. +func (s *CreateWebhookOutput) SetWebhook(v *Webhook) *CreateWebhookOutput { + s.Webhook = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteProjectInput type DeleteProjectInput struct { _ struct{} `type:"structure"` @@ -1835,6 +2089,63 @@ func (s DeleteProjectOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteWebhookInput +type DeleteWebhookInput struct { + _ struct{} `type:"structure"` + + // The name of the build project. + // + // ProjectName is a required field + ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteWebhookInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWebhookInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteWebhookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteWebhookInput"} + if s.ProjectName == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectName")) + } + if s.ProjectName != nil && len(*s.ProjectName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProjectName sets the ProjectName field's value. +func (s *DeleteWebhookInput) SetProjectName(v string) *DeleteWebhookInput { + s.ProjectName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteWebhookOutput +type DeleteWebhookOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteWebhookOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWebhookOutput) GoString() string { + return s.String() +} + // Information about a Docker image that is managed by AWS CodeBuild. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/EnvironmentImage type EnvironmentImage struct { @@ -1949,6 +2260,14 @@ type EnvironmentVariable struct { // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` + // The type of environment variable. Valid values include: + // + // * PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems + // Manager Parameter Store. + // + // * PLAINTEXT: An environment variable in plaintext format. + Type *string `locationName:"type" type:"string" enum:"EnvironmentVariableType"` + // The value of the environment variable. // // We strongly discourage using environment variables to store sensitive values, @@ -1995,6 +2314,12 @@ func (s *EnvironmentVariable) SetName(v string) *EnvironmentVariable { return s } +// SetType sets the Type field's value. +func (s *EnvironmentVariable) SetType(v string) *EnvironmentVariable { + s.Type = &v + return s +} + // SetValue sets the Value field's value. func (s *EnvironmentVariable) SetValue(v string) *EnvironmentVariable { s.Value = &v @@ -2470,6 +2795,10 @@ type Project struct { // before timing out any related build that did not get marked as completed. // The default is 60 minutes. TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"` + + // Information about a webhook in GitHub that connects repository events to + // a build project in AWS CodeBuild. + Webhook *Webhook `locationName:"webhook" type:"structure"` } // String returns the string representation @@ -2554,6 +2883,12 @@ func (s *Project) SetTimeoutInMinutes(v int64) *Project { return s } +// SetWebhook sets the Webhook field's value. +func (s *Project) SetWebhook(v *Webhook) *Project { + s.Webhook = v + return s +} + // Information about the build output artifacts for the build project. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ProjectArtifacts type ProjectArtifacts struct { @@ -3481,6 +3816,32 @@ func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { return s } +// Information about a webhook in GitHub that connects repository events to +// a build project in AWS CodeBuild. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/Webhook +type Webhook struct { + _ struct{} `type:"structure"` + + // The URL to the webhook. + Url *string `locationName:"url" min:"1" type:"string"` +} + +// String returns the string representation +func (s Webhook) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Webhook) GoString() string { + return s.String() +} + +// SetUrl sets the Url field's value. +func (s *Webhook) SetUrl(v string) *Webhook { + s.Url = &v + return s +} + const ( // ArtifactNamespaceNone is a ArtifactNamespace enum value ArtifactNamespaceNone = "NONE" @@ -3556,6 +3917,14 @@ const ( EnvironmentTypeLinuxContainer = "LINUX_CONTAINER" ) +const ( + // EnvironmentVariableTypePlaintext is a EnvironmentVariableType enum value + EnvironmentVariableTypePlaintext = "PLAINTEXT" + + // EnvironmentVariableTypeParameterStore is a EnvironmentVariableType enum value + EnvironmentVariableTypeParameterStore = "PARAMETER_STORE" +) + const ( // LanguageTypeJava is a LanguageType enum value LanguageTypeJava = "JAVA" diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go index c901dce75..5bab7179b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go @@ -7,7 +7,7 @@ // compiles your source code, runs unit tests, and produces artifacts that are // ready to deploy. AWS CodeBuild eliminates the need to provision, manage, // and scale your own build servers. It provides prepackaged build environments -// for the most popular programming languages and build tools, such as Apach +// for the most popular programming languages and build tools, such as Apache // Maven, Gradle, and more. You can also fully customize build environments // in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically // to meet peak build requests, and you pay only for the build time you consume. @@ -28,8 +28,18 @@ // // * CreateProject: Creates a build project. // +// * CreateWebhook: For an existing AWS CodeBuild build project that has +// its source code stored in a GitHub repository, enables AWS CodeBuild to +// begin automatically rebuilding the source code every time a code change +// is pushed to the repository. +// // * DeleteProject: Deletes a build project. // +// * DeleteWebhook: For an existing AWS CodeBuild build project that has +// its source code stored in a GitHub repository, stops AWS CodeBuild from +// automatically rebuilding the source code every time a code change is pushed +// to the repository. +// // * ListProjects: Gets a list of build project names, with each build project // name representing a single build project. // @@ -57,7 +67,7 @@ // // Using the Client // -// To AWS CodeBuild with the SDK use the New function to create +// To contact AWS CodeBuild with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go index 2b91b700a..eba0333fb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go @@ -16,6 +16,12 @@ const ( // The input value that was provided is not valid. ErrCodeInvalidInputException = "InvalidInputException" + // ErrCodeOAuthProviderException for service response error code + // "OAuthProviderException". + // + // There was a problem with the underlying OAuth provider. + ErrCodeOAuthProviderException = "OAuthProviderException" + // ErrCodeResourceAlreadyExistsException for service response error code // "ResourceAlreadyExistsException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index ca226cdbc..3799fa9fd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -362,6 +362,122 @@ func (c *CodeCommit) CreateRepositoryWithContext(ctx aws.Context, input *CreateR return out, req.Send() } +const opDeleteBranch = "DeleteBranch" + +// DeleteBranchRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBranch operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBranch for more information on using the DeleteBranch +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBranchRequest method. +// req, resp := client.DeleteBranchRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranch +func (c *CodeCommit) DeleteBranchRequest(input *DeleteBranchInput) (req *request.Request, output *DeleteBranchOutput) { + op := &request.Operation{ + Name: opDeleteBranch, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteBranchInput{} + } + + output = &DeleteBranchOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBranch API operation for AWS CodeCommit. +// +// Deletes a branch from a repository, unless that branch is the default branch +// for the repository. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeCommit's +// API operation DeleteBranch for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" +// A repository name is required but was not specified. +// +// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" +// The specified repository does not exist. +// +// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" +// At least one specified repository name is not valid. +// +// This exception only occurs when a specified repository name is not valid. +// Other exceptions occur when a required repository parameter is missing, or +// when a specified repository does not exist. +// +// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" +// A branch name is required but was not specified. +// +// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" +// The specified branch name is not valid. +// +// * ErrCodeDefaultBranchCannotBeDeletedException "DefaultBranchCannotBeDeletedException" +// The specified branch is the default branch for the repository, and cannot +// be deleted. To delete this branch, you must first set another branch as the +// default branch. +// +// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" +// An encryption integrity check failed. +// +// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" +// An encryption key could not be accessed. +// +// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" +// The encryption key is disabled. +// +// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" +// No encryption key was found. +// +// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" +// The encryption key is not available. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranch +func (c *CodeCommit) DeleteBranch(input *DeleteBranchInput) (*DeleteBranchOutput, error) { + req, out := c.DeleteBranchRequest(input) + return out, req.Send() +} + +// DeleteBranchWithContext is the same as DeleteBranch with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBranch for details on how to use this API operation. +// +// 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 *CodeCommit) DeleteBranchWithContext(ctx aws.Context, input *DeleteBranchInput, opts ...request.Option) (*DeleteBranchOutput, error) { + req, out := c.DeleteBranchRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the @@ -2326,6 +2442,9 @@ type Commit struct { // the email address for the author, as configured in Git. Author *UserInfo `locationName:"author" type:"structure"` + // The full SHA of the specified commit. + CommitId *string `locationName:"commitId" type:"string"` + // Information about the person who committed the specified commit, also known // as the committer. Information includes the date in timestamp format with // GMT offset, the name of the committer, and the email address for the committer, @@ -2368,6 +2487,12 @@ func (s *Commit) SetAuthor(v *UserInfo) *Commit { return s } +// SetCommitId sets the CommitId field's value. +func (s *Commit) SetCommitId(v string) *Commit { + s.CommitId = &v + return s +} + // SetCommitter sets the Committer field's value. func (s *Commit) SetCommitter(v *UserInfo) *Commit { s.Committer = v @@ -2570,6 +2695,92 @@ func (s *CreateRepositoryOutput) SetRepositoryMetadata(v *RepositoryMetadata) *C return s } +// Represents the input of a delete branch operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranchInput +type DeleteBranchInput struct { + _ struct{} `type:"structure"` + + // The name of the branch to delete. + // + // BranchName is a required field + BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` + + // The name of the repository that contains the branch to be deleted. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBranchInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBranchInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBranchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBranchInput"} + if s.BranchName == nil { + invalidParams.Add(request.NewErrParamRequired("BranchName")) + } + if s.BranchName != nil && len(*s.BranchName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBranchName sets the BranchName field's value. +func (s *DeleteBranchInput) SetBranchName(v string) *DeleteBranchInput { + s.BranchName = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *DeleteBranchInput) SetRepositoryName(v string) *DeleteBranchInput { + s.RepositoryName = &v + return s +} + +// Represents the output of a delete branch operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranchOutput +type DeleteBranchOutput struct { + _ struct{} `type:"structure"` + + // Information about the branch deleted by the operation, including the branch + // name and the commit ID that was the tip of the branch. + DeletedBranch *BranchInfo `locationName:"deletedBranch" type:"structure"` +} + +// String returns the string representation +func (s DeleteBranchOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBranchOutput) GoString() string { + return s.String() +} + +// SetDeletedBranch sets the DeletedBranch field's value. +func (s *DeleteBranchOutput) SetDeletedBranch(v *BranchInfo) *DeleteBranchOutput { + s.DeletedBranch = v + return s +} + // Represents the input of a delete repository operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteRepositoryInput type DeleteRepositoryInput struct { @@ -2851,7 +3062,7 @@ func (s *GetBranchOutput) SetBranch(v *BranchInfo) *GetBranchOutput { type GetCommitInput struct { _ struct{} `type:"structure"` - // The commit ID. + // The commit ID. Commit IDs are the full SHA of the commit. // // CommitId is a required field CommitId *string `locationName:"commitId" type:"string" required:"true"` @@ -3628,8 +3839,10 @@ func (s *RepositoryNameIdPair) SetRepositoryName(v string) *RepositoryNameIdPair type RepositoryTrigger struct { _ struct{} `type:"structure"` - // The branches that will be included in the trigger configuration. If no branches - // are specified, the trigger will apply to all branches. + // The branches that will be included in the trigger configuration. If you specify + // an empty array, the trigger will apply to all branches. + // + // While no content is required in the array, you must include the array itself. Branches []*string `locationName:"branches" type:"list"` // Any custom data associated with the trigger that will be included in the diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go index 47357f2f4..29b1798ea 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go @@ -34,6 +34,9 @@ // // * CreateBranch, which creates a new branch in a specified repository // +// * DeleteBranch, which deletes the specified branch in a repository unless +// it is the default branch +// // * GetBranch, which returns information about a specified branch // // * ListBranches, which lists all branches for a specified repository @@ -73,7 +76,7 @@ // // Using the Client // -// To AWS CodeCommit with the SDK use the New function to create +// To contact AWS CodeCommit with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go index 6200809f4..ad28090f2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go @@ -59,6 +59,14 @@ const ( // A commit was not specified. ErrCodeCommitRequiredException = "CommitRequiredException" + // ErrCodeDefaultBranchCannotBeDeletedException for service response error code + // "DefaultBranchCannotBeDeletedException". + // + // The specified branch is the default branch for the repository, and cannot + // be deleted. To delete this branch, you must first set another branch as the + // default branch. + ErrCodeDefaultBranchCannotBeDeletedException = "DefaultBranchCannotBeDeletedException" + // ErrCodeEncryptionIntegrityChecksFailedException for service response error code // "EncryptionIntegrityChecksFailedException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go index 53b211ea6..1af872872 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go @@ -65,7 +65,7 @@ // // Using the Client // -// To AWS CodeDeploy with the SDK use the New function to create +// To contact AWS CodeDeploy with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go index df74b2307..9ac88fcc5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go @@ -2440,7 +2440,7 @@ func (s *AWSSessionCredentials) SetSessionToken(v string) *AWSSessionCredentials return s } -// Represents the input of an acknowledge job action. +// Represents the input of an AcknowledgeJob action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeJobInput type AcknowledgeJobInput struct { _ struct{} `type:"structure"` @@ -2496,7 +2496,7 @@ func (s *AcknowledgeJobInput) SetNonce(v string) *AcknowledgeJobInput { return s } -// Represents the output of an acknowledge job action. +// Represents the output of an AcknowledgeJob action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeJobOutput type AcknowledgeJobOutput struct { _ struct{} `type:"structure"` @@ -2521,7 +2521,7 @@ func (s *AcknowledgeJobOutput) SetStatus(v string) *AcknowledgeJobOutput { return s } -// Represents the input of an acknowledge third party job action. +// Represents the input of an AcknowledgeThirdPartyJob action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeThirdPartyJobInput type AcknowledgeThirdPartyJobInput struct { _ struct{} `type:"structure"` @@ -2530,7 +2530,7 @@ type AcknowledgeThirdPartyJobInput struct { // that the calling entity is allowed access to the job and its details. // // ClientToken is a required field - ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + ClientToken *string `locationName:"clientToken" min:"1" type:"string" required:"true"` // The unique system-generated ID of the job. // @@ -2561,6 +2561,9 @@ func (s *AcknowledgeThirdPartyJobInput) Validate() error { if s.ClientToken == nil { invalidParams.Add(request.NewErrParamRequired("ClientToken")) } + if s.ClientToken != nil && len(*s.ClientToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } @@ -2595,7 +2598,7 @@ func (s *AcknowledgeThirdPartyJobInput) SetNonce(v string) *AcknowledgeThirdPart return s } -// Represents the output of an acknowledge third party job action. +// Represents the output of an AcknowledgeThirdPartyJob action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeThirdPartyJobOutput type AcknowledgeThirdPartyJobOutput struct { _ struct{} `type:"structure"` @@ -2664,7 +2667,7 @@ type ActionConfigurationProperty struct { // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` - // Indicates that the proprety will be used in conjunction with PollForJobs. + // Indicates that the property will be used in conjunction with PollForJobs. // When creating a custom action, an action can have up to one queryable property. // If it has one, that property must be both required and not secret. // @@ -3818,7 +3821,7 @@ func (s *BlockerDeclaration) SetType(v string) *BlockerDeclaration { return s } -// Represents the input of a create custom action operation. +// Represents the input of a CreateCustomActionType operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreateCustomActionTypeInput type CreateCustomActionTypeInput struct { _ struct{} `type:"structure"` @@ -3971,7 +3974,7 @@ func (s *CreateCustomActionTypeInput) SetVersion(v string) *CreateCustomActionTy return s } -// Represents the output of a create custom action operation. +// Represents the output of a CreateCustomActionType operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreateCustomActionTypeOutput type CreateCustomActionTypeOutput struct { _ struct{} `type:"structure"` @@ -3998,7 +4001,7 @@ func (s *CreateCustomActionTypeOutput) SetActionType(v *ActionType) *CreateCusto return s } -// Represents the input of a create pipeline action. +// Represents the input of a CreatePipeline action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreatePipelineInput type CreatePipelineInput struct { _ struct{} `type:"structure"` @@ -4043,7 +4046,7 @@ func (s *CreatePipelineInput) SetPipeline(v *PipelineDeclaration) *CreatePipelin return s } -// Represents the output of a create pipeline action. +// Represents the output of a CreatePipeline action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreatePipelineOutput type CreatePipelineOutput struct { _ struct{} `type:"structure"` @@ -4150,7 +4153,7 @@ func (s *CurrentRevision) SetRevisionSummary(v string) *CurrentRevision { return s } -// Represents the input of a delete custom action operation. The custom action +// Represents the input of a DeleteCustomActionType operation. The custom action // will be marked as deleted. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteCustomActionTypeInput type DeleteCustomActionTypeInput struct { @@ -4241,7 +4244,7 @@ func (s DeleteCustomActionTypeOutput) GoString() string { return s.String() } -// Represents the input of a delete pipeline action. +// Represents the input of a DeletePipeline action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeletePipelineInput type DeletePipelineInput struct { _ struct{} `type:"structure"` @@ -4299,7 +4302,7 @@ func (s DeletePipelineOutput) GoString() string { return s.String() } -// Represents the input of a disable stage transition input action. +// Represents the input of a DisableStageTransition action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DisableStageTransitionInput type DisableStageTransitionInput struct { _ struct{} `type:"structure"` @@ -4412,7 +4415,7 @@ func (s DisableStageTransitionOutput) GoString() string { return s.String() } -// Represents the input of an enable stage transition action. +// Represents the input of an EnableStageTransition action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/EnableStageTransitionInput type EnableStageTransitionInput struct { _ struct{} `type:"structure"` @@ -4724,7 +4727,7 @@ func (s *FailureDetails) SetType(v string) *FailureDetails { return s } -// Represents the input of a get job details action. +// Represents the input of a GetJobDetails action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetJobDetailsInput type GetJobDetailsInput struct { _ struct{} `type:"structure"` @@ -4764,7 +4767,7 @@ func (s *GetJobDetailsInput) SetJobId(v string) *GetJobDetailsInput { return s } -// Represents the output of a get job details action. +// Represents the output of a GetJobDetails action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetJobDetailsOutput type GetJobDetailsOutput struct { _ struct{} `type:"structure"` @@ -4792,7 +4795,7 @@ func (s *GetJobDetailsOutput) SetJobDetails(v *JobDetails) *GetJobDetailsOutput return s } -// Represents the input of a get pipeline execution action. +// Represents the input of a GetPipelineExecution action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineExecutionInput type GetPipelineExecutionInput struct { _ struct{} `type:"structure"` @@ -4849,7 +4852,7 @@ func (s *GetPipelineExecutionInput) SetPipelineName(v string) *GetPipelineExecut return s } -// Represents the output of a get pipeline execution action. +// Represents the output of a GetPipelineExecution action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineExecutionOutput type GetPipelineExecutionOutput struct { _ struct{} `type:"structure"` @@ -4874,7 +4877,7 @@ func (s *GetPipelineExecutionOutput) SetPipelineExecution(v *PipelineExecution) return s } -// Represents the input of a get pipeline action. +// Represents the input of a GetPipeline action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineInput type GetPipelineInput struct { _ struct{} `type:"structure"` @@ -4931,11 +4934,15 @@ func (s *GetPipelineInput) SetVersion(v int64) *GetPipelineInput { return s } -// Represents the output of a get pipeline action. +// Represents the output of a GetPipeline action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineOutput type GetPipelineOutput struct { _ struct{} `type:"structure"` + // Represents the pipeline metadata information returned as part of the output + // of a GetPipeline action. + Metadata *PipelineMetadata `locationName:"metadata" type:"structure"` + // Represents the structure of actions and stages to be performed in the pipeline. Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure"` } @@ -4950,13 +4957,19 @@ func (s GetPipelineOutput) GoString() string { return s.String() } +// SetMetadata sets the Metadata field's value. +func (s *GetPipelineOutput) SetMetadata(v *PipelineMetadata) *GetPipelineOutput { + s.Metadata = v + return s +} + // SetPipeline sets the Pipeline field's value. func (s *GetPipelineOutput) SetPipeline(v *PipelineDeclaration) *GetPipelineOutput { s.Pipeline = v return s } -// Represents the input of a get pipeline state action. +// Represents the input of a GetPipelineState action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineStateInput type GetPipelineStateInput struct { _ struct{} `type:"structure"` @@ -4999,7 +5012,7 @@ func (s *GetPipelineStateInput) SetName(v string) *GetPipelineStateInput { return s } -// Represents the output of a get pipeline state action. +// Represents the output of a GetPipelineState action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineStateOutput type GetPipelineStateOutput struct { _ struct{} `type:"structure"` @@ -5063,7 +5076,7 @@ func (s *GetPipelineStateOutput) SetUpdated(v time.Time) *GetPipelineStateOutput return s } -// Represents the input of a get third party job details action. +// Represents the input of a GetThirdPartyJobDetails action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetThirdPartyJobDetailsInput type GetThirdPartyJobDetailsInput struct { _ struct{} `type:"structure"` @@ -5072,7 +5085,7 @@ type GetThirdPartyJobDetailsInput struct { // that the calling entity is allowed access to the job and its details. // // ClientToken is a required field - ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + ClientToken *string `locationName:"clientToken" min:"1" type:"string" required:"true"` // The unique system-generated ID used for identifying the job. // @@ -5096,6 +5109,9 @@ func (s *GetThirdPartyJobDetailsInput) Validate() error { if s.ClientToken == nil { invalidParams.Add(request.NewErrParamRequired("ClientToken")) } + if s.ClientToken != nil && len(*s.ClientToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } @@ -5121,7 +5137,7 @@ func (s *GetThirdPartyJobDetailsInput) SetJobId(v string) *GetThirdPartyJobDetai return s } -// Represents the output of a get third party job details action. +// Represents the output of a GetThirdPartyJobDetails action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetThirdPartyJobDetailsOutput type GetThirdPartyJobDetailsOutput struct { _ struct{} `type:"structure"` @@ -5388,7 +5404,7 @@ func (s *JobDetails) SetId(v string) *JobDetails { return s } -// Represents the input of a list action types action. +// Represents the input of a ListActionTypes action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListActionTypesInput type ListActionTypesInput struct { _ struct{} `type:"structure"` @@ -5398,7 +5414,7 @@ type ListActionTypesInput struct { // An identifier that was returned from the previous list action types call, // which can be used to return the next set of action types in the list. - NextToken *string `locationName:"nextToken" type:"string"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation @@ -5411,6 +5427,19 @@ func (s ListActionTypesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListActionTypesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListActionTypesInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetActionOwnerFilter sets the ActionOwnerFilter field's value. func (s *ListActionTypesInput) SetActionOwnerFilter(v string) *ListActionTypesInput { s.ActionOwnerFilter = &v @@ -5423,7 +5452,7 @@ func (s *ListActionTypesInput) SetNextToken(v string) *ListActionTypesInput { return s } -// Represents the output of a list action types action. +// Represents the output of a ListActionTypes action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListActionTypesOutput type ListActionTypesOutput struct { _ struct{} `type:"structure"` @@ -5436,7 +5465,7 @@ type ListActionTypesOutput struct { // If the amount of returned information is significantly large, an identifier // is also returned which can be used in a subsequent list action types call // to return the next set of action types in the list. - NextToken *string `locationName:"nextToken" type:"string"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation @@ -5461,7 +5490,7 @@ func (s *ListActionTypesOutput) SetNextToken(v string) *ListActionTypesOutput { return s } -// Represents the input of a list pipeline executions action. +// Represents the input of a ListPipelineExecutions action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelineExecutionsInput type ListPipelineExecutionsInput struct { _ struct{} `type:"structure"` @@ -5472,9 +5501,9 @@ type ListPipelineExecutionsInput struct { // based on pipeline execution start times. Default value is 100. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - // The token that was returned from the previous list pipeline executions call, + // The token that was returned from the previous ListPipelineExecutions call, // which can be used to return the next set of pipeline executions in the list. - NextToken *string `locationName:"nextToken" type:"string"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` // The name of the pipeline for which you want to get execution summary information. // @@ -5498,6 +5527,9 @@ func (s *ListPipelineExecutionsInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } if s.PipelineName == nil { invalidParams.Add(request.NewErrParamRequired("PipelineName")) } @@ -5529,16 +5561,15 @@ func (s *ListPipelineExecutionsInput) SetPipelineName(v string) *ListPipelineExe return s } -// Represents the output of a list pipeline executions action. +// Represents the output of a ListPipelineExecutions action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelineExecutionsOutput type ListPipelineExecutionsOutput struct { _ struct{} `type:"structure"` - // A token that can be used in the next list pipeline executions call to return - // the next set of pipeline executions. To view all items in the list, continue - // to call this operation with each subsequent token until no more nextToken - // values are returned. - NextToken *string `locationName:"nextToken" type:"string"` + // A token that can be used in the next ListPipelineExecutions call. To view + // all items in the list, continue to call this operation with each subsequent + // token until no more nextToken values are returned. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` // A list of executions in the history of a pipeline. PipelineExecutionSummaries []*PipelineExecutionSummary `locationName:"pipelineExecutionSummaries" type:"list"` @@ -5566,14 +5597,14 @@ func (s *ListPipelineExecutionsOutput) SetPipelineExecutionSummaries(v []*Pipeli return s } -// Represents the input of a list pipelines action. +// Represents the input of a ListPipelines action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelinesInput type ListPipelinesInput struct { _ struct{} `type:"structure"` // An identifier that was returned from the previous list pipelines call, which // can be used to return the next set of pipelines in the list. - NextToken *string `locationName:"nextToken" type:"string"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation @@ -5586,13 +5617,26 @@ func (s ListPipelinesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPipelinesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPipelinesInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetNextToken sets the NextToken field's value. func (s *ListPipelinesInput) SetNextToken(v string) *ListPipelinesInput { s.NextToken = &v return s } -// Represents the output of a list pipelines action. +// Represents the output of a ListPipelines action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelinesOutput type ListPipelinesOutput struct { _ struct{} `type:"structure"` @@ -5600,7 +5644,7 @@ type ListPipelinesOutput struct { // If the amount of returned information is significantly large, an identifier // is also returned which can be used in a subsequent list pipelines call to // return the next set of pipelines in the list. - NextToken *string `locationName:"nextToken" type:"string"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` // The list of pipelines. Pipelines []*PipelineSummary `locationName:"pipelines" type:"list"` @@ -5684,8 +5728,7 @@ func (s *OutputArtifact) SetName(v string) *OutputArtifact { type PipelineContext struct { _ struct{} `type:"structure"` - // Represents the context of an action within the stage of a pipeline to a job - // worker. + // The context of an action to a job worker within the stage of a pipeline. Action *ActionContext `locationName:"action" type:"structure"` // The name of the pipeline. This is a user-specified value. Pipeline names @@ -5729,8 +5772,8 @@ func (s *PipelineContext) SetStage(v *StageContext) *PipelineContext { type PipelineDeclaration struct { _ struct{} `type:"structure"` - // Represents the context of an action within the stage of a pipeline to a job - // worker. + // Represents information about the Amazon S3 bucket where artifacts are stored + // for the pipeline. // // ArtifactStore is a required field ArtifactStore *ArtifactStore `locationName:"artifactStore" type:"structure" required:"true"` @@ -5861,13 +5904,13 @@ type PipelineExecution struct { // // * InProgress: The pipeline execution is currently running. // - // * Succeeded: The pipeline execution completed successfully. + // * Succeeded: The pipeline execution was completed successfully. // // * Superseded: While this pipeline execution was waiting for the next stage - // to be completed, a newer pipeline execution caught up and continued through + // to be completed, a newer pipeline execution advanced and continued through // the pipeline instead. // - // * Failed: The pipeline execution did not complete successfully. + // * Failed: The pipeline execution was not completed successfully. Status *string `locationName:"status" type:"string" enum:"PipelineExecutionStatus"` } @@ -5930,13 +5973,13 @@ type PipelineExecutionSummary struct { // // * InProgress: The pipeline execution is currently running. // - // * Succeeded: The pipeline execution completed successfully. + // * Succeeded: The pipeline execution was completed successfully. // // * Superseded: While this pipeline execution was waiting for the next stage - // to be completed, a newer pipeline execution caught up and continued through + // to be completed, a newer pipeline execution advanced and continued through // the pipeline instead. // - // * Failed: The pipeline execution did not complete successfully. + // * Failed: The pipeline execution was not completed successfully. Status *string `locationName:"status" type:"string" enum:"PipelineExecutionStatus"` } @@ -5974,6 +6017,49 @@ func (s *PipelineExecutionSummary) SetStatus(v string) *PipelineExecutionSummary return s } +// Information about a pipeline. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PipelineMetadata +type PipelineMetadata struct { + _ struct{} `type:"structure"` + + // The date and time the pipeline was created, in timestamp format. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + + // The Amazon Resource Name (ARN) of the pipeline. + PipelineArn *string `locationName:"pipelineArn" type:"string"` + + // The date and time the pipeline was last updated, in timestamp format. + Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s PipelineMetadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineMetadata) GoString() string { + return s.String() +} + +// SetCreated sets the Created field's value. +func (s *PipelineMetadata) SetCreated(v time.Time) *PipelineMetadata { + s.Created = &v + return s +} + +// SetPipelineArn sets the PipelineArn field's value. +func (s *PipelineMetadata) SetPipelineArn(v string) *PipelineMetadata { + s.PipelineArn = &v + return s +} + +// SetUpdated sets the Updated field's value. +func (s *PipelineMetadata) SetUpdated(v time.Time) *PipelineMetadata { + s.Updated = &v + return s +} + // Returns a summary of a pipeline. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PipelineSummary type PipelineSummary struct { @@ -6026,7 +6112,7 @@ func (s *PipelineSummary) SetVersion(v int64) *PipelineSummary { return s } -// Represents the input of a poll for jobs action. +// Represents the input of a PollForJobs action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForJobsInput type PollForJobsInput struct { _ struct{} `type:"structure"` @@ -6095,7 +6181,7 @@ func (s *PollForJobsInput) SetQueryParam(v map[string]*string) *PollForJobsInput return s } -// Represents the output of a poll for jobs action. +// Represents the output of a PollForJobs action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForJobsOutput type PollForJobsOutput struct { _ struct{} `type:"structure"` @@ -6120,7 +6206,7 @@ func (s *PollForJobsOutput) SetJobs(v []*Job) *PollForJobsOutput { return s } -// Represents the input of a poll for third party jobs action. +// Represents the input of a PollForThirdPartyJobs action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForThirdPartyJobsInput type PollForThirdPartyJobsInput struct { _ struct{} `type:"structure"` @@ -6177,7 +6263,7 @@ func (s *PollForThirdPartyJobsInput) SetMaxBatchSize(v int64) *PollForThirdParty return s } -// Represents the output of a poll for third party jobs action. +// Represents the output of a PollForThirdPartyJobs action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForThirdPartyJobsOutput type PollForThirdPartyJobsOutput struct { _ struct{} `type:"structure"` @@ -6202,7 +6288,7 @@ func (s *PollForThirdPartyJobsOutput) SetJobs(v []*ThirdPartyJob) *PollForThirdP return s } -// Represents the input of a put action revision action. +// Represents the input of a PutActionRevision action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutActionRevisionInput type PutActionRevisionInput struct { _ struct{} `type:"structure"` @@ -6298,7 +6384,7 @@ func (s *PutActionRevisionInput) SetStageName(v string) *PutActionRevisionInput return s } -// Represents the output of a put action revision action. +// Represents the output of a PutActionRevision action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutActionRevisionOutput type PutActionRevisionOutput struct { _ struct{} `type:"structure"` @@ -6333,7 +6419,7 @@ func (s *PutActionRevisionOutput) SetPipelineExecutionId(v string) *PutActionRev return s } -// Represents the input of a put approval result action. +// Represents the input of a PutApprovalResult action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutApprovalResultInput type PutApprovalResultInput struct { _ struct{} `type:"structure"` @@ -6446,7 +6532,7 @@ func (s *PutApprovalResultInput) SetToken(v string) *PutApprovalResultInput { return s } -// Represents the output of a put approval result action. +// Represents the output of a PutApprovalResult action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutApprovalResultOutput type PutApprovalResultOutput struct { _ struct{} `type:"structure"` @@ -6471,7 +6557,7 @@ func (s *PutApprovalResultOutput) SetApprovedAt(v time.Time) *PutApprovalResultO return s } -// Represents the input of a put job failure result action. +// Represents the input of a PutJobFailureResult action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobFailureResultInput type PutJobFailureResultInput struct { _ struct{} `type:"structure"` @@ -6546,7 +6632,7 @@ func (s PutJobFailureResultOutput) GoString() string { return s.String() } -// Represents the input of a put job success result action. +// Represents the input of a PutJobSuccessResult action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobSuccessResultInput type PutJobSuccessResultInput struct { _ struct{} `type:"structure"` @@ -6646,7 +6732,7 @@ func (s PutJobSuccessResultOutput) GoString() string { return s.String() } -// Represents the input of a third party job failure result action. +// Represents the input of a PutThirdPartyJobFailureResult action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobFailureResultInput type PutThirdPartyJobFailureResultInput struct { _ struct{} `type:"structure"` @@ -6655,7 +6741,7 @@ type PutThirdPartyJobFailureResultInput struct { // that the calling entity is allowed access to the job and its details. // // ClientToken is a required field - ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + ClientToken *string `locationName:"clientToken" min:"1" type:"string" required:"true"` // Represents information about failure details. // @@ -6684,6 +6770,9 @@ func (s *PutThirdPartyJobFailureResultInput) Validate() error { if s.ClientToken == nil { invalidParams.Add(request.NewErrParamRequired("ClientToken")) } + if s.ClientToken != nil && len(*s.ClientToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) + } if s.FailureDetails == nil { invalidParams.Add(request.NewErrParamRequired("FailureDetails")) } @@ -6738,7 +6827,7 @@ func (s PutThirdPartyJobFailureResultOutput) GoString() string { return s.String() } -// Represents the input of a put third party job success result action. +// Represents the input of a PutThirdPartyJobSuccessResult action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobSuccessResultInput type PutThirdPartyJobSuccessResultInput struct { _ struct{} `type:"structure"` @@ -6747,7 +6836,7 @@ type PutThirdPartyJobSuccessResultInput struct { // that the calling entity is allowed access to the job and its details. // // ClientToken is a required field - ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + ClientToken *string `locationName:"clientToken" min:"1" type:"string" required:"true"` // A token generated by a job worker, such as an AWS CodeDeploy deployment ID, // that a successful job provides to identify a partner action in progress. @@ -6787,6 +6876,9 @@ func (s *PutThirdPartyJobSuccessResultInput) Validate() error { if s.ClientToken == nil { invalidParams.Add(request.NewErrParamRequired("ClientToken")) } + if s.ClientToken != nil && len(*s.ClientToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } @@ -6855,7 +6947,7 @@ func (s PutThirdPartyJobSuccessResultOutput) GoString() string { return s.String() } -// Represents the input of a retry stage execution action. +// Represents the input of a RetryStageExecution action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecutionInput type RetryStageExecutionInput struct { _ struct{} `type:"structure"` @@ -6945,7 +7037,7 @@ func (s *RetryStageExecutionInput) SetStageName(v string) *RetryStageExecutionIn return s } -// Represents the output of a retry stage execution action. +// Represents the output of a RetryStageExecution action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecutionOutput type RetryStageExecutionOutput struct { _ struct{} `type:"structure"` @@ -7212,7 +7304,7 @@ func (s *StageState) SetStageName(v string) *StageState { return s } -// Represents the input of a start pipeline execution action. +// Represents the input of a StartPipelineExecution action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecutionInput type StartPipelineExecutionInput struct { _ struct{} `type:"structure"` @@ -7255,7 +7347,7 @@ func (s *StartPipelineExecutionInput) SetName(v string) *StartPipelineExecutionI return s } -// Represents the output of a start pipeline execution action. +// Represents the output of a StartPipelineExecution action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecutionOutput type StartPipelineExecutionOutput struct { _ struct{} `type:"structure"` @@ -7515,7 +7607,7 @@ func (s *TransitionState) SetLastChangedBy(v string) *TransitionState { return s } -// Represents the input of an update pipeline action. +// Represents the input of an UpdatePipeline action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/UpdatePipelineInput type UpdatePipelineInput struct { _ struct{} `type:"structure"` @@ -7560,7 +7652,7 @@ func (s *UpdatePipelineInput) SetPipeline(v *PipelineDeclaration) *UpdatePipelin return s } -// Represents the output of an update pipeline action. +// Represents the output of an UpdatePipeline action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/UpdatePipelineOutput type UpdatePipelineOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go index fc9b49554..bebd4b1bb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go @@ -22,7 +22,8 @@ // // * DeletePipeline, which deletes the specified pipeline. // -// * GetPipeline, which returns information about a pipeline structure. +// * GetPipeline, which returns information about the pipeline structure +// and pipeline metadata, including the pipeline Amazon Resource Name (ARN). // // * GetPipelineExecution, which returns information about a specific execution // of a pipeline. @@ -33,6 +34,9 @@ // * ListPipelines, which gets a summary of all of the pipelines associated // with your account. // +// * ListPipelineExecutions, which gets a summary of the most recent executions +// for a pipeline. +// // * StartPipelineExecution, which runs the the most recent revision of an // artifact through the pipeline. // @@ -120,7 +124,7 @@ // // Using the Client // -// To AWS CodePipeline with the SDK use the New function to create +// To contact AWS CodePipeline with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go index 26e7d48a1..8060d833a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go @@ -43,7 +43,7 @@ // // Using the Client // -// To Amazon Cognito Identity with the SDK use the New function to create +// To contact Amazon Cognito Identity with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index 1bb04281c..881e0c3ef 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -2889,8 +2889,9 @@ func (s *ComplianceSummaryByResourceType) SetResourceType(v string) *ComplianceS return s } -// A list that contains the status of the delivery of either the snapshot or -// the configuration history to the specified Amazon S3 bucket. +// Provides status of the delivery of the snapshot or the configuration history +// to the specified Amazon S3 bucket. Also provides the status of notifications +// about the Amazon S3 delivery to the specified Amazon SNS topic. // Please also see https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ConfigExportDeliveryInfo type ConfigExportDeliveryInfo struct { _ struct{} `type:"structure"` @@ -6245,8 +6246,8 @@ type Scope struct { // a resource ID for ComplianceResourceId. ComplianceResourceTypes []*string `type:"list"` - // The tag key that is applied to only those AWS resources that you want you - // want to trigger an evaluation for the rule. + // The tag key that is applied to only those AWS resources that you want to + // trigger an evaluation for the rule. TagKey *string `min:"1" type:"string"` // The tag value applied to only those AWS resources that you want to trigger @@ -6848,4 +6849,22 @@ const ( // ResourceTypeAwsCloudFormationStack is a ResourceType enum value ResourceTypeAwsCloudFormationStack = "AWS::CloudFormation::Stack" + + // ResourceTypeAwsDynamoDbTable is a ResourceType enum value + ResourceTypeAwsDynamoDbTable = "AWS::DynamoDB::Table" + + // ResourceTypeAwsAutoScalingAutoScalingGroup is a ResourceType enum value + ResourceTypeAwsAutoScalingAutoScalingGroup = "AWS::AutoScaling::AutoScalingGroup" + + // ResourceTypeAwsAutoScalingLaunchConfiguration is a ResourceType enum value + ResourceTypeAwsAutoScalingLaunchConfiguration = "AWS::AutoScaling::LaunchConfiguration" + + // ResourceTypeAwsAutoScalingScalingPolicy is a ResourceType enum value + ResourceTypeAwsAutoScalingScalingPolicy = "AWS::AutoScaling::ScalingPolicy" + + // ResourceTypeAwsAutoScalingScheduledAction is a ResourceType enum value + ResourceTypeAwsAutoScalingScheduledAction = "AWS::AutoScaling::ScheduledAction" + + // ResourceTypeAwsCodeBuildProject is a ResourceType enum value + ResourceTypeAwsCodeBuildProject = "AWS::CodeBuild::Project" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go index 96319515f..39b2880e1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go @@ -35,7 +35,7 @@ // // Using the Client // -// To AWS Config with the SDK use the New function to create +// To contact AWS Config with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 1da7e791a..e9b5704f5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -2874,6 +2874,10 @@ func (c *DatabaseMigrationService) DescribeTableStatisticsRequest(input *Describ // Returns table statistics on the database migration task, including table // name, rows inserted, rows updated, and rows deleted. // +// Note that the "last updated" column the DMS console only indicates the time +// that AWS DMS last updated the table statistics record for a table. It does +// not indicate the time of the last update to the table. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -7043,6 +7047,14 @@ func (s *DescribeSchemasOutput) SetSchemas(v []*string) *DescribeSchemasOutput { type DescribeTableStatisticsInput struct { _ struct{} `type:"structure"` + // Filters applied to the describe table statistics action. + // + // Valid filter names: schema-name | table-name | table-state + // + // A combination of filters creates an AND condition where each record matches + // all specified filters. + Filters []*Filter `locationNameList:"Filter" type:"list"` + // An optional pagination token provided by a previous request. If this parameter // is specified, the response includes only records beyond the marker, up to // the value specified by MaxRecords. @@ -7054,7 +7066,7 @@ type DescribeTableStatisticsInput struct { // // Default: 100 // - // Constraints: Minimum 20, maximum 100. + // Constraints: Minimum 20, maximum 500. MaxRecords *int64 `type:"integer"` // The Amazon Resource Name (ARN) of the replication task. @@ -7079,6 +7091,16 @@ func (s *DescribeTableStatisticsInput) Validate() error { if s.ReplicationTaskArn == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationTaskArn")) } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -7086,6 +7108,12 @@ func (s *DescribeTableStatisticsInput) Validate() error { return nil } +// SetFilters sets the Filters field's value. +func (s *DescribeTableStatisticsInput) SetFilters(v []*Filter) *DescribeTableStatisticsInput { + s.Filters = v + return s +} + // SetMarker sets the Marker field's value. func (s *DescribeTableStatisticsInput) SetMarker(v string) *DescribeTableStatisticsInput { s.Marker = &v @@ -7826,7 +7854,8 @@ type ModifyEndpointInput struct { // MONGODB, SYBASE, and SQLSERVER. EngineName *string `type:"string"` - // Additional attributes associated with the connection. + // Additional attributes associated with the connection. To reset this parameter, + // pass the empty string ("") as an argument. ExtraConnectionAttributes *string `type:"string"` // Settings in JSON format for the source MongoDB endpoint. For more information @@ -9921,7 +9950,11 @@ type TableStatistics struct { // The name of the table. TableName *string `type:"string"` - // The state of the table. + // The state of the tables described. + // + // Valid states: Table does not exist | Before load | Full load | Table completed + // | Table cancelled | Table error | Table all | Table updates | Table is being + // reloaded TableState *string `type:"string"` // The number of update actions performed on a table. diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go index 159b26156..ed8b2a336 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go @@ -21,7 +21,7 @@ // // Using the Client // -// To AWS Database Migration Service with the SDK use the New function to create +// To contact AWS Database Migration Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index f3c5229c0..b3deae70b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -5882,6 +5882,12 @@ func (s *CreateRemoteAccessSessionConfiguration) SetBillingMethod(v string) *Cre type CreateRemoteAccessSessionInput struct { _ struct{} `type:"structure"` + // Unique identifier for the client. If you want access to multiple devices + // on the same client, you should pass the same clientId value in each call + // to CreateRemoteAccessSession. This is required only if remoteDebugEnabled + // is set to true true. + ClientId *string `locationName:"clientId" type:"string"` + // The configuration information for the remote access session request. Configuration *CreateRemoteAccessSessionConfiguration `locationName:"configuration" type:"structure"` @@ -5899,6 +5905,15 @@ type CreateRemoteAccessSessionInput struct { // // ProjectArn is a required field ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` + + // Set to true if you want to access devices remotely for debugging in your + // remote access session. + RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` + + // The public key of the ssh key pair you want to use for connecting to remote + // devices in your remote debugging session. This is only required if remoteDebugEnabled + // is set to true. + SshPublicKey *string `locationName:"sshPublicKey" type:"string"` } // String returns the string representation @@ -5933,6 +5948,12 @@ func (s *CreateRemoteAccessSessionInput) Validate() error { return nil } +// SetClientId sets the ClientId field's value. +func (s *CreateRemoteAccessSessionInput) SetClientId(v string) *CreateRemoteAccessSessionInput { + s.ClientId = &v + return s +} + // SetConfiguration sets the Configuration field's value. func (s *CreateRemoteAccessSessionInput) SetConfiguration(v *CreateRemoteAccessSessionConfiguration) *CreateRemoteAccessSessionInput { s.Configuration = v @@ -5957,6 +5978,18 @@ func (s *CreateRemoteAccessSessionInput) SetProjectArn(v string) *CreateRemoteAc return s } +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *CreateRemoteAccessSessionInput) SetRemoteDebugEnabled(v bool) *CreateRemoteAccessSessionInput { + s.RemoteDebugEnabled = &v + return s +} + +// SetSshPublicKey sets the SshPublicKey field's value. +func (s *CreateRemoteAccessSessionInput) SetSshPublicKey(v string) *CreateRemoteAccessSessionInput { + s.SshPublicKey = &v + return s +} + // Represents the server response from a request to create a remote access session. // Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSessionResult type CreateRemoteAccessSessionOutput struct { @@ -6131,6 +6164,57 @@ func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput { return s } +// A JSON object specifying the paths where the artifacts generated by the customer's +// tests, on the device or in the test environment, will be pulled from. +// +// Specify deviceHostPaths and optionally specify either iosPaths or androidPaths. +// +// For web app tests, you can specify both iosPaths and androidPaths. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CustomerArtifactPaths +type CustomerArtifactPaths struct { + _ struct{} `type:"structure"` + + // Comma-separated list of paths on the Android device where the artifacts generated + // by the customer's tests will be pulled from. + AndroidPaths []*string `locationName:"androidPaths" type:"list"` + + // Comma-separated list of paths in the test execution environment where the + // artifacts generated by the customer's tests will be pulled from. + DeviceHostPaths []*string `locationName:"deviceHostPaths" type:"list"` + + // Comma-separated list of paths on the iOS device where the artifacts generated + // by the customer's tests will be pulled from. + IosPaths []*string `locationName:"iosPaths" type:"list"` +} + +// String returns the string representation +func (s CustomerArtifactPaths) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomerArtifactPaths) GoString() string { + return s.String() +} + +// SetAndroidPaths sets the AndroidPaths field's value. +func (s *CustomerArtifactPaths) SetAndroidPaths(v []*string) *CustomerArtifactPaths { + s.AndroidPaths = v + return s +} + +// SetDeviceHostPaths sets the DeviceHostPaths field's value. +func (s *CustomerArtifactPaths) SetDeviceHostPaths(v []*string) *CustomerArtifactPaths { + s.DeviceHostPaths = v + return s +} + +// SetIosPaths sets the IosPaths field's value. +func (s *CustomerArtifactPaths) SetIosPaths(v []*string) *CustomerArtifactPaths { + s.IosPaths = v + return s +} + // Represents a request to the delete device pool operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteDevicePoolRequest type DeleteDevicePoolInput struct { @@ -6554,6 +6638,9 @@ type Device struct { // Specifies whether remote access has been enabled for the specified device. RemoteAccessEnabled *bool `locationName:"remoteAccessEnabled" type:"boolean"` + // This flag is set to true if remote debugging is enabled for the device. + RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` + // The resolution of the device. Resolution *Resolution `locationName:"resolution" type:"structure"` } @@ -6664,6 +6751,12 @@ func (s *Device) SetRemoteAccessEnabled(v bool) *Device { return s } +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *Device) SetRemoteDebugEnabled(v bool) *Device { + s.RemoteDebugEnabled = &v + return s +} + // SetResolution sets the Resolution field's value. func (s *Device) SetResolution(v *Resolution) *Device { s.Resolution = v @@ -10425,6 +10518,10 @@ type RemoteAccessSession struct { // Device Farm terminology (http://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html#welcome-terminology)." BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` + // Unique identifier of your client for the remote access session. Only returned + // if remote debugging is enabled for the remote access session. + ClientId *string `locationName:"clientId" type:"string"` + // The date and time the remote access session was created. Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` @@ -10435,15 +10532,27 @@ type RemoteAccessSession struct { // setup and teardown minutes). DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` + // Unique device identifier for the remote device. Only returned if remote debugging + // is enabled for the remote access session. + DeviceUdid *string `locationName:"deviceUdid" type:"string"` + // The endpoint for the remote access sesssion. Endpoint *string `locationName:"endpoint" type:"string"` + // IP address of the EC2 host where you need to connect to remotely debug devices. + // Only returned if remote debugging is enabled for the remote access session. + HostAddress *string `locationName:"hostAddress" type:"string"` + // A message about the remote access session. Message *string `locationName:"message" type:"string"` // The name of the remote access session. Name *string `locationName:"name" type:"string"` + // This flag is set to true if remote debugging is enabled for the remote access + // session. + RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` + // The result of the remote access session. Can be any of the following: // // * PENDING: A pending condition. @@ -10511,6 +10620,12 @@ func (s *RemoteAccessSession) SetBillingMethod(v string) *RemoteAccessSession { return s } +// SetClientId sets the ClientId field's value. +func (s *RemoteAccessSession) SetClientId(v string) *RemoteAccessSession { + s.ClientId = &v + return s +} + // SetCreated sets the Created field's value. func (s *RemoteAccessSession) SetCreated(v time.Time) *RemoteAccessSession { s.Created = &v @@ -10529,12 +10644,24 @@ func (s *RemoteAccessSession) SetDeviceMinutes(v *DeviceMinutes) *RemoteAccessSe return s } +// SetDeviceUdid sets the DeviceUdid field's value. +func (s *RemoteAccessSession) SetDeviceUdid(v string) *RemoteAccessSession { + s.DeviceUdid = &v + return s +} + // SetEndpoint sets the Endpoint field's value. func (s *RemoteAccessSession) SetEndpoint(v string) *RemoteAccessSession { s.Endpoint = &v return s } +// SetHostAddress sets the HostAddress field's value. +func (s *RemoteAccessSession) SetHostAddress(v string) *RemoteAccessSession { + s.HostAddress = &v + return s +} + // SetMessage sets the Message field's value. func (s *RemoteAccessSession) SetMessage(v string) *RemoteAccessSession { s.Message = &v @@ -10547,6 +10674,12 @@ func (s *RemoteAccessSession) SetName(v string) *RemoteAccessSession { return s } +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *RemoteAccessSession) SetRemoteDebugEnabled(v bool) *RemoteAccessSession { + s.RemoteDebugEnabled = &v + return s +} + // SetResult sets the Result field's value. func (s *RemoteAccessSession) SetResult(v string) *RemoteAccessSession { s.Result = &v @@ -10747,7 +10880,8 @@ func (s *Rule) SetValue(v string) *Rule { return s } -// Represents an app on a set of devices with a specific test and configuration. +// Represents a test run on a set of devices with a given app package, test +// parameters, etc. // Please also see https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Run type Run struct { _ struct{} `type:"structure"` @@ -10768,6 +10902,9 @@ type Run struct { // When the run was created. Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + // Output CustomerArtifactPaths object for the test run. + CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` + // Represents the total (metered or unmetered) minutes used by the test run. DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` @@ -10780,6 +10917,11 @@ type Run struct { // The network profile being used for a test run. NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` + // Read-only URL for an object in S3 bucket where you can get the parsing results + // of the test package. If the test package doesn't parse, the reason why it + // doesn't parse appears in the file that this URL points to. + ParsingResultUrl *string `locationName:"parsingResultUrl" type:"string"` + // The run's platform. // // Allowed values include: @@ -10808,6 +10950,10 @@ type Run struct { // * STOPPED: A stopped condition. Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` + // Supporting field for the result field. Set only if result is SKIPPED. PARSING_FAILED + // if the result is skipped because of test package parsing failure. + ResultCode *string `locationName:"resultCode" type:"string" enum:"ExecutionResultCode"` + // The run's start time. Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` @@ -10916,6 +11062,12 @@ func (s *Run) SetCreated(v time.Time) *Run { return s } +// SetCustomerArtifactPaths sets the CustomerArtifactPaths field's value. +func (s *Run) SetCustomerArtifactPaths(v *CustomerArtifactPaths) *Run { + s.CustomerArtifactPaths = v + return s +} + // SetDeviceMinutes sets the DeviceMinutes field's value. func (s *Run) SetDeviceMinutes(v *DeviceMinutes) *Run { s.DeviceMinutes = v @@ -10940,6 +11092,12 @@ func (s *Run) SetNetworkProfile(v *NetworkProfile) *Run { return s } +// SetParsingResultUrl sets the ParsingResultUrl field's value. +func (s *Run) SetParsingResultUrl(v string) *Run { + s.ParsingResultUrl = &v + return s +} + // SetPlatform sets the Platform field's value. func (s *Run) SetPlatform(v string) *Run { s.Platform = &v @@ -10952,6 +11110,12 @@ func (s *Run) SetResult(v string) *Run { return s } +// SetResultCode sets the ResultCode field's value. +func (s *Run) SetResultCode(v string) *Run { + s.ResultCode = &v + return s +} + // SetStarted sets the Started field's value. func (s *Run) SetStarted(v time.Time) *Run { s.Started = &v @@ -11080,6 +11244,9 @@ type ScheduleRunConfiguration struct { // parameter is not specified, the default value is metered. BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` + // Input CustomerArtifactPaths object for the scheduled run configuration. + CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` + // The ARN of the extra data for the run. The extra data is a .zip file that // AWS Device Farm will extract to external data for Android or the app's sandbox // for iOS. @@ -11141,6 +11308,12 @@ func (s *ScheduleRunConfiguration) SetBillingMethod(v string) *ScheduleRunConfig return s } +// SetCustomerArtifactPaths sets the CustomerArtifactPaths field's value. +func (s *ScheduleRunConfiguration) SetCustomerArtifactPaths(v *CustomerArtifactPaths) *ScheduleRunConfiguration { + s.CustomerArtifactPaths = v + return s +} + // SetExtraDataPackageArn sets the ExtraDataPackageArn field's value. func (s *ScheduleRunConfiguration) SetExtraDataPackageArn(v string) *ScheduleRunConfiguration { s.ExtraDataPackageArn = &v @@ -12656,6 +12829,12 @@ const ( // ArtifactTypeVideo is a ArtifactType enum value ArtifactTypeVideo = "VIDEO" + + // ArtifactTypeCustomerArtifact is a ArtifactType enum value + ArtifactTypeCustomerArtifact = "CUSTOMER_ARTIFACT" + + // ArtifactTypeCustomerArtifactLog is a ArtifactType enum value + ArtifactTypeCustomerArtifactLog = "CUSTOMER_ARTIFACT_LOG" ) const ( @@ -12687,6 +12866,9 @@ const ( // DeviceAttributeRemoteAccessEnabled is a DeviceAttribute enum value DeviceAttributeRemoteAccessEnabled = "REMOTE_ACCESS_ENABLED" + // DeviceAttributeRemoteDebugEnabled is a DeviceAttribute enum value + DeviceAttributeRemoteDebugEnabled = "REMOTE_DEBUG_ENABLED" + // DeviceAttributeAppiumVersion is a DeviceAttribute enum value DeviceAttributeAppiumVersion = "APPIUM_VERSION" ) @@ -12738,6 +12920,11 @@ const ( ExecutionResultStopped = "STOPPED" ) +const ( + // ExecutionResultCodeParsingFailed is a ExecutionResultCode enum value + ExecutionResultCodeParsingFailed = "PARSING_FAILED" +) + const ( // ExecutionStatusPending is a ExecutionStatus enum value ExecutionStatusPending = "PENDING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go index 3159ae0b3..35e8d6e4d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go @@ -14,7 +14,7 @@ // // Using the Client // -// To AWS Device Farm with the SDK use the New function to create +// To contact AWS Device Farm with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go new file mode 100644 index 000000000..642b223db --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go @@ -0,0 +1,9624 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package directconnect + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opAllocateConnectionOnInterconnect = "AllocateConnectionOnInterconnect" + +// AllocateConnectionOnInterconnectRequest generates a "aws/request.Request" representing the +// client's request for the AllocateConnectionOnInterconnect operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AllocateConnectionOnInterconnect for more information on using the AllocateConnectionOnInterconnect +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AllocateConnectionOnInterconnectRequest method. +// req, resp := client.AllocateConnectionOnInterconnectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnect +func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateConnectionOnInterconnectInput) (req *request.Request, output *Connection) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, AllocateConnectionOnInterconnect, has been deprecated") + } + op := &request.Operation{ + Name: opAllocateConnectionOnInterconnect, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AllocateConnectionOnInterconnectInput{} + } + + output = &Connection{} + req = c.newRequest(op, input, output) + return +} + +// AllocateConnectionOnInterconnect API operation for AWS Direct Connect. +// +// Deprecated in favor of AllocateHostedConnection. +// +// Creates a hosted connection on an interconnect. +// +// Allocates a VLAN number and a specified amount of bandwidth for use by a +// hosted connection on the given interconnect. +// +// This is intended for use by AWS Direct Connect partners only. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation AllocateConnectionOnInterconnect for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnect +func (c *DirectConnect) AllocateConnectionOnInterconnect(input *AllocateConnectionOnInterconnectInput) (*Connection, error) { + req, out := c.AllocateConnectionOnInterconnectRequest(input) + return out, req.Send() +} + +// AllocateConnectionOnInterconnectWithContext is the same as AllocateConnectionOnInterconnect with the addition of +// the ability to pass a context and additional request options. +// +// See AllocateConnectionOnInterconnect for details on how to use this API operation. +// +// 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 *DirectConnect) AllocateConnectionOnInterconnectWithContext(ctx aws.Context, input *AllocateConnectionOnInterconnectInput, opts ...request.Option) (*Connection, error) { + req, out := c.AllocateConnectionOnInterconnectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAllocateHostedConnection = "AllocateHostedConnection" + +// AllocateHostedConnectionRequest generates a "aws/request.Request" representing the +// client's request for the AllocateHostedConnection operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AllocateHostedConnection for more information on using the AllocateHostedConnection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AllocateHostedConnectionRequest method. +// req, resp := client.AllocateHostedConnectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateHostedConnection +func (c *DirectConnect) AllocateHostedConnectionRequest(input *AllocateHostedConnectionInput) (req *request.Request, output *Connection) { + op := &request.Operation{ + Name: opAllocateHostedConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AllocateHostedConnectionInput{} + } + + output = &Connection{} + req = c.newRequest(op, input, output) + return +} + +// AllocateHostedConnection API operation for AWS Direct Connect. +// +// Creates a hosted connection on an interconnect or a link aggregation group +// (LAG). +// +// Allocates a VLAN number and a specified amount of bandwidth for use by a +// hosted connection on the given interconnect or LAG. +// +// This is intended for use by AWS Direct Connect partners only. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation AllocateHostedConnection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateHostedConnection +func (c *DirectConnect) AllocateHostedConnection(input *AllocateHostedConnectionInput) (*Connection, error) { + req, out := c.AllocateHostedConnectionRequest(input) + return out, req.Send() +} + +// AllocateHostedConnectionWithContext is the same as AllocateHostedConnection with the addition of +// the ability to pass a context and additional request options. +// +// See AllocateHostedConnection for details on how to use this API operation. +// +// 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 *DirectConnect) AllocateHostedConnectionWithContext(ctx aws.Context, input *AllocateHostedConnectionInput, opts ...request.Option) (*Connection, error) { + req, out := c.AllocateHostedConnectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAllocatePrivateVirtualInterface = "AllocatePrivateVirtualInterface" + +// AllocatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the AllocatePrivateVirtualInterface operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AllocatePrivateVirtualInterface for more information on using the AllocatePrivateVirtualInterface +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AllocatePrivateVirtualInterfaceRequest method. +// req, resp := client.AllocatePrivateVirtualInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePrivateVirtualInterface +func (c *DirectConnect) AllocatePrivateVirtualInterfaceRequest(input *AllocatePrivateVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { + op := &request.Operation{ + Name: opAllocatePrivateVirtualInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AllocatePrivateVirtualInterfaceInput{} + } + + output = &VirtualInterface{} + req = c.newRequest(op, input, output) + return +} + +// AllocatePrivateVirtualInterface API operation for AWS Direct Connect. +// +// Provisions a private virtual interface to be owned by another AWS customer. +// +// Virtual interfaces created using this action must be confirmed by the virtual +// interface owner by using the ConfirmPrivateVirtualInterface action. Until +// then, the virtual interface will be in 'Confirming' state, and will not be +// available for handling traffic. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation AllocatePrivateVirtualInterface for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePrivateVirtualInterface +func (c *DirectConnect) AllocatePrivateVirtualInterface(input *AllocatePrivateVirtualInterfaceInput) (*VirtualInterface, error) { + req, out := c.AllocatePrivateVirtualInterfaceRequest(input) + return out, req.Send() +} + +// AllocatePrivateVirtualInterfaceWithContext is the same as AllocatePrivateVirtualInterface with the addition of +// the ability to pass a context and additional request options. +// +// See AllocatePrivateVirtualInterface for details on how to use this API operation. +// +// 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 *DirectConnect) AllocatePrivateVirtualInterfaceWithContext(ctx aws.Context, input *AllocatePrivateVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { + req, out := c.AllocatePrivateVirtualInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAllocatePublicVirtualInterface = "AllocatePublicVirtualInterface" + +// AllocatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the AllocatePublicVirtualInterface operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AllocatePublicVirtualInterface for more information on using the AllocatePublicVirtualInterface +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AllocatePublicVirtualInterfaceRequest method. +// req, resp := client.AllocatePublicVirtualInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePublicVirtualInterface +func (c *DirectConnect) AllocatePublicVirtualInterfaceRequest(input *AllocatePublicVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { + op := &request.Operation{ + Name: opAllocatePublicVirtualInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AllocatePublicVirtualInterfaceInput{} + } + + output = &VirtualInterface{} + req = c.newRequest(op, input, output) + return +} + +// AllocatePublicVirtualInterface API operation for AWS Direct Connect. +// +// Provisions a public virtual interface to be owned by a different customer. +// +// The owner of a connection calls this function to provision a public virtual +// interface which will be owned by another AWS customer. +// +// Virtual interfaces created using this function must be confirmed by the virtual +// interface owner by calling ConfirmPublicVirtualInterface. Until this step +// has been completed, the virtual interface will be in 'Confirming' state, +// and will not be available for handling traffic. +// +// When creating an IPv6 public virtual interface (addressFamily is 'ipv6'), +// the customer and amazon address fields should be left blank to use auto-assigned +// IPv6 space. Custom IPv6 Addresses are currently not supported. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation AllocatePublicVirtualInterface for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePublicVirtualInterface +func (c *DirectConnect) AllocatePublicVirtualInterface(input *AllocatePublicVirtualInterfaceInput) (*VirtualInterface, error) { + req, out := c.AllocatePublicVirtualInterfaceRequest(input) + return out, req.Send() +} + +// AllocatePublicVirtualInterfaceWithContext is the same as AllocatePublicVirtualInterface with the addition of +// the ability to pass a context and additional request options. +// +// See AllocatePublicVirtualInterface for details on how to use this API operation. +// +// 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 *DirectConnect) AllocatePublicVirtualInterfaceWithContext(ctx aws.Context, input *AllocatePublicVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { + req, out := c.AllocatePublicVirtualInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateConnectionWithLag = "AssociateConnectionWithLag" + +// AssociateConnectionWithLagRequest generates a "aws/request.Request" representing the +// client's request for the AssociateConnectionWithLag operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateConnectionWithLag for more information on using the AssociateConnectionWithLag +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateConnectionWithLagRequest method. +// req, resp := client.AssociateConnectionWithLagRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateConnectionWithLag +func (c *DirectConnect) AssociateConnectionWithLagRequest(input *AssociateConnectionWithLagInput) (req *request.Request, output *Connection) { + op := &request.Operation{ + Name: opAssociateConnectionWithLag, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateConnectionWithLagInput{} + } + + output = &Connection{} + req = c.newRequest(op, input, output) + return +} + +// AssociateConnectionWithLag API operation for AWS Direct Connect. +// +// Associates an existing connection with a link aggregation group (LAG). The +// connection is interrupted and re-established as a member of the LAG (connectivity +// to AWS will be interrupted). The connection must be hosted on the same AWS +// Direct Connect endpoint as the LAG, and its bandwidth must match the bandwidth +// for the LAG. You can reassociate a connection that's currently associated +// with a different LAG; however, if removing the connection will cause the +// original LAG to fall below its setting for minimum number of operational +// connections, the request fails. +// +// Any virtual interfaces that are directly associated with the connection are +// automatically re-associated with the LAG. If the connection was originally +// associated with a different LAG, the virtual interfaces remain associated +// with the original LAG. +// +// For interconnects, any hosted connections are automatically re-associated +// with the LAG. If the interconnect was originally associated with a different +// LAG, the hosted connections remain associated with the original LAG. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation AssociateConnectionWithLag for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateConnectionWithLag +func (c *DirectConnect) AssociateConnectionWithLag(input *AssociateConnectionWithLagInput) (*Connection, error) { + req, out := c.AssociateConnectionWithLagRequest(input) + return out, req.Send() +} + +// AssociateConnectionWithLagWithContext is the same as AssociateConnectionWithLag with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateConnectionWithLag for details on how to use this API operation. +// +// 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 *DirectConnect) AssociateConnectionWithLagWithContext(ctx aws.Context, input *AssociateConnectionWithLagInput, opts ...request.Option) (*Connection, error) { + req, out := c.AssociateConnectionWithLagRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateHostedConnection = "AssociateHostedConnection" + +// AssociateHostedConnectionRequest generates a "aws/request.Request" representing the +// client's request for the AssociateHostedConnection operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateHostedConnection for more information on using the AssociateHostedConnection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateHostedConnectionRequest method. +// req, resp := client.AssociateHostedConnectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateHostedConnection +func (c *DirectConnect) AssociateHostedConnectionRequest(input *AssociateHostedConnectionInput) (req *request.Request, output *Connection) { + op := &request.Operation{ + Name: opAssociateHostedConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateHostedConnectionInput{} + } + + output = &Connection{} + req = c.newRequest(op, input, output) + return +} + +// AssociateHostedConnection API operation for AWS Direct Connect. +// +// Associates a hosted connection and its virtual interfaces with a link aggregation +// group (LAG) or interconnect. If the target interconnect or LAG has an existing +// hosted connection with a conflicting VLAN number or IP address, the operation +// fails. This action temporarily interrupts the hosted connection's connectivity +// to AWS as it is being migrated. +// +// This is intended for use by AWS Direct Connect partners only. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation AssociateHostedConnection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateHostedConnection +func (c *DirectConnect) AssociateHostedConnection(input *AssociateHostedConnectionInput) (*Connection, error) { + req, out := c.AssociateHostedConnectionRequest(input) + return out, req.Send() +} + +// AssociateHostedConnectionWithContext is the same as AssociateHostedConnection with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateHostedConnection for details on how to use this API operation. +// +// 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 *DirectConnect) AssociateHostedConnectionWithContext(ctx aws.Context, input *AssociateHostedConnectionInput, opts ...request.Option) (*Connection, error) { + req, out := c.AssociateHostedConnectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateVirtualInterface = "AssociateVirtualInterface" + +// AssociateVirtualInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the AssociateVirtualInterface operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateVirtualInterface for more information on using the AssociateVirtualInterface +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateVirtualInterfaceRequest method. +// req, resp := client.AssociateVirtualInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateVirtualInterface +func (c *DirectConnect) AssociateVirtualInterfaceRequest(input *AssociateVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { + op := &request.Operation{ + Name: opAssociateVirtualInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateVirtualInterfaceInput{} + } + + output = &VirtualInterface{} + req = c.newRequest(op, input, output) + return +} + +// AssociateVirtualInterface API operation for AWS Direct Connect. +// +// Associates a virtual interface with a specified link aggregation group (LAG) +// or connection. Connectivity to AWS is temporarily interrupted as the virtual +// interface is being migrated. If the target connection or LAG has an associated +// virtual interface with a conflicting VLAN number or a conflicting IP address, +// the operation fails. +// +// Virtual interfaces associated with a hosted connection cannot be associated +// with a LAG; hosted connections must be migrated along with their virtual +// interfaces using AssociateHostedConnection. +// +// In order to reassociate a virtual interface to a new connection or LAG, the +// requester must own either the virtual interface itself or the connection +// to which the virtual interface is currently associated. Additionally, the +// requester must own the connection or LAG to which the virtual interface will +// be newly associated. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation AssociateVirtualInterface for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateVirtualInterface +func (c *DirectConnect) AssociateVirtualInterface(input *AssociateVirtualInterfaceInput) (*VirtualInterface, error) { + req, out := c.AssociateVirtualInterfaceRequest(input) + return out, req.Send() +} + +// AssociateVirtualInterfaceWithContext is the same as AssociateVirtualInterface with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateVirtualInterface for details on how to use this API operation. +// +// 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 *DirectConnect) AssociateVirtualInterfaceWithContext(ctx aws.Context, input *AssociateVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { + req, out := c.AssociateVirtualInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opConfirmConnection = "ConfirmConnection" + +// ConfirmConnectionRequest generates a "aws/request.Request" representing the +// client's request for the ConfirmConnection operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ConfirmConnection for more information on using the ConfirmConnection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ConfirmConnectionRequest method. +// req, resp := client.ConfirmConnectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmConnection +func (c *DirectConnect) ConfirmConnectionRequest(input *ConfirmConnectionInput) (req *request.Request, output *ConfirmConnectionOutput) { + op := &request.Operation{ + Name: opConfirmConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ConfirmConnectionInput{} + } + + output = &ConfirmConnectionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ConfirmConnection API operation for AWS Direct Connect. +// +// Confirm the creation of a hosted connection on an interconnect. +// +// Upon creation, the hosted connection is initially in the 'Ordering' state, +// and will remain in this state until the owner calls ConfirmConnection to +// confirm creation of the hosted connection. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation ConfirmConnection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmConnection +func (c *DirectConnect) ConfirmConnection(input *ConfirmConnectionInput) (*ConfirmConnectionOutput, error) { + req, out := c.ConfirmConnectionRequest(input) + return out, req.Send() +} + +// ConfirmConnectionWithContext is the same as ConfirmConnection with the addition of +// the ability to pass a context and additional request options. +// +// See ConfirmConnection for details on how to use this API operation. +// +// 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 *DirectConnect) ConfirmConnectionWithContext(ctx aws.Context, input *ConfirmConnectionInput, opts ...request.Option) (*ConfirmConnectionOutput, error) { + req, out := c.ConfirmConnectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opConfirmPrivateVirtualInterface = "ConfirmPrivateVirtualInterface" + +// ConfirmPrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the ConfirmPrivateVirtualInterface operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ConfirmPrivateVirtualInterface for more information on using the ConfirmPrivateVirtualInterface +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ConfirmPrivateVirtualInterfaceRequest method. +// req, resp := client.ConfirmPrivateVirtualInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPrivateVirtualInterface +func (c *DirectConnect) ConfirmPrivateVirtualInterfaceRequest(input *ConfirmPrivateVirtualInterfaceInput) (req *request.Request, output *ConfirmPrivateVirtualInterfaceOutput) { + op := &request.Operation{ + Name: opConfirmPrivateVirtualInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ConfirmPrivateVirtualInterfaceInput{} + } + + output = &ConfirmPrivateVirtualInterfaceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ConfirmPrivateVirtualInterface API operation for AWS Direct Connect. +// +// Accept ownership of a private virtual interface created by another customer. +// +// After the virtual interface owner calls this function, the virtual interface +// will be created and attached to the given virtual private gateway or direct +// connect gateway, and will be available for handling traffic. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation ConfirmPrivateVirtualInterface for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPrivateVirtualInterface +func (c *DirectConnect) ConfirmPrivateVirtualInterface(input *ConfirmPrivateVirtualInterfaceInput) (*ConfirmPrivateVirtualInterfaceOutput, error) { + req, out := c.ConfirmPrivateVirtualInterfaceRequest(input) + return out, req.Send() +} + +// ConfirmPrivateVirtualInterfaceWithContext is the same as ConfirmPrivateVirtualInterface with the addition of +// the ability to pass a context and additional request options. +// +// See ConfirmPrivateVirtualInterface for details on how to use this API operation. +// +// 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 *DirectConnect) ConfirmPrivateVirtualInterfaceWithContext(ctx aws.Context, input *ConfirmPrivateVirtualInterfaceInput, opts ...request.Option) (*ConfirmPrivateVirtualInterfaceOutput, error) { + req, out := c.ConfirmPrivateVirtualInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opConfirmPublicVirtualInterface = "ConfirmPublicVirtualInterface" + +// ConfirmPublicVirtualInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the ConfirmPublicVirtualInterface operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ConfirmPublicVirtualInterface for more information on using the ConfirmPublicVirtualInterface +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ConfirmPublicVirtualInterfaceRequest method. +// req, resp := client.ConfirmPublicVirtualInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPublicVirtualInterface +func (c *DirectConnect) ConfirmPublicVirtualInterfaceRequest(input *ConfirmPublicVirtualInterfaceInput) (req *request.Request, output *ConfirmPublicVirtualInterfaceOutput) { + op := &request.Operation{ + Name: opConfirmPublicVirtualInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ConfirmPublicVirtualInterfaceInput{} + } + + output = &ConfirmPublicVirtualInterfaceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ConfirmPublicVirtualInterface API operation for AWS Direct Connect. +// +// Accept ownership of a public virtual interface created by another customer. +// +// After the virtual interface owner calls this function, the specified virtual +// interface will be created and made available for handling traffic. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation ConfirmPublicVirtualInterface for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPublicVirtualInterface +func (c *DirectConnect) ConfirmPublicVirtualInterface(input *ConfirmPublicVirtualInterfaceInput) (*ConfirmPublicVirtualInterfaceOutput, error) { + req, out := c.ConfirmPublicVirtualInterfaceRequest(input) + return out, req.Send() +} + +// ConfirmPublicVirtualInterfaceWithContext is the same as ConfirmPublicVirtualInterface with the addition of +// the ability to pass a context and additional request options. +// +// See ConfirmPublicVirtualInterface for details on how to use this API operation. +// +// 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 *DirectConnect) ConfirmPublicVirtualInterfaceWithContext(ctx aws.Context, input *ConfirmPublicVirtualInterfaceInput, opts ...request.Option) (*ConfirmPublicVirtualInterfaceOutput, error) { + req, out := c.ConfirmPublicVirtualInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateBGPPeer = "CreateBGPPeer" + +// CreateBGPPeerRequest generates a "aws/request.Request" representing the +// client's request for the CreateBGPPeer operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateBGPPeer for more information on using the CreateBGPPeer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateBGPPeerRequest method. +// req, resp := client.CreateBGPPeerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateBGPPeer +func (c *DirectConnect) CreateBGPPeerRequest(input *CreateBGPPeerInput) (req *request.Request, output *CreateBGPPeerOutput) { + op := &request.Operation{ + Name: opCreateBGPPeer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateBGPPeerInput{} + } + + output = &CreateBGPPeerOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateBGPPeer API operation for AWS Direct Connect. +// +// Creates a new BGP peer on a specified virtual interface. The BGP peer cannot +// be in the same address family (IPv4/IPv6) of an existing BGP peer on the +// virtual interface. +// +// You must create a BGP peer for the corresponding address family in order +// to access AWS resources that also use that address family. +// +// When creating a IPv6 BGP peer, the Amazon address and customer address fields +// must be left blank. IPv6 addresses are automatically assigned from Amazon's +// pool of IPv6 addresses; you cannot specify custom IPv6 addresses. +// +// For a public virtual interface, the Autonomous System Number (ASN) must be +// private or already whitelisted for the virtual interface. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation CreateBGPPeer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateBGPPeer +func (c *DirectConnect) CreateBGPPeer(input *CreateBGPPeerInput) (*CreateBGPPeerOutput, error) { + req, out := c.CreateBGPPeerRequest(input) + return out, req.Send() +} + +// CreateBGPPeerWithContext is the same as CreateBGPPeer with the addition of +// the ability to pass a context and additional request options. +// +// See CreateBGPPeer for details on how to use this API operation. +// +// 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 *DirectConnect) CreateBGPPeerWithContext(ctx aws.Context, input *CreateBGPPeerInput, opts ...request.Option) (*CreateBGPPeerOutput, error) { + req, out := c.CreateBGPPeerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateConnection = "CreateConnection" + +// CreateConnectionRequest generates a "aws/request.Request" representing the +// client's request for the CreateConnection operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateConnection for more information on using the CreateConnection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateConnectionRequest method. +// req, resp := client.CreateConnectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateConnection +func (c *DirectConnect) CreateConnectionRequest(input *CreateConnectionInput) (req *request.Request, output *Connection) { + op := &request.Operation{ + Name: opCreateConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateConnectionInput{} + } + + output = &Connection{} + req = c.newRequest(op, input, output) + return +} + +// CreateConnection API operation for AWS Direct Connect. +// +// Creates a new connection between the customer network and a specific AWS +// Direct Connect location. +// +// A connection links your internal network to an AWS Direct Connect location +// over a standard 1 gigabit or 10 gigabit Ethernet fiber-optic cable. One end +// of the cable is connected to your router, the other to an AWS Direct Connect +// router. An AWS Direct Connect location provides access to Amazon Web Services +// in the region it is associated with. You can establish connections with AWS +// Direct Connect locations in multiple regions, but a connection in one region +// does not provide connectivity to other regions. +// +// To find the locations for your region, use DescribeLocations. +// +// You can automatically add the new connection to a link aggregation group +// (LAG) by specifying a LAG ID in the request. This ensures that the new connection +// is allocated on the same AWS Direct Connect endpoint that hosts the specified +// LAG. If there are no available ports on the endpoint, the request fails and +// no connection will be created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation CreateConnection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateConnection +func (c *DirectConnect) CreateConnection(input *CreateConnectionInput) (*Connection, error) { + req, out := c.CreateConnectionRequest(input) + return out, req.Send() +} + +// CreateConnectionWithContext is the same as CreateConnection with the addition of +// the ability to pass a context and additional request options. +// +// See CreateConnection for details on how to use this API operation. +// +// 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 *DirectConnect) CreateConnectionWithContext(ctx aws.Context, input *CreateConnectionInput, opts ...request.Option) (*Connection, error) { + req, out := c.CreateConnectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDirectConnectGateway = "CreateDirectConnectGateway" + +// CreateDirectConnectGatewayRequest generates a "aws/request.Request" representing the +// client's request for the CreateDirectConnectGateway operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDirectConnectGateway for more information on using the CreateDirectConnectGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDirectConnectGatewayRequest method. +// req, resp := client.CreateDirectConnectGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGateway +func (c *DirectConnect) CreateDirectConnectGatewayRequest(input *CreateDirectConnectGatewayInput) (req *request.Request, output *CreateDirectConnectGatewayOutput) { + op := &request.Operation{ + Name: opCreateDirectConnectGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDirectConnectGatewayInput{} + } + + output = &CreateDirectConnectGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDirectConnectGateway API operation for AWS Direct Connect. +// +// Creates a new direct connect gateway. A direct connect gateway is an intermediate +// object that enables you to connect a set of virtual interfaces and virtual +// private gateways. direct connect gateways are global and visible in any AWS +// region after they are created. The virtual interfaces and virtual private +// gateways that are connected through a direct connect gateway can be in different +// regions. This enables you to connect to a VPC in any region, regardless of +// the region in which the virtual interfaces are located, and pass traffic +// between them. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation CreateDirectConnectGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGateway +func (c *DirectConnect) CreateDirectConnectGateway(input *CreateDirectConnectGatewayInput) (*CreateDirectConnectGatewayOutput, error) { + req, out := c.CreateDirectConnectGatewayRequest(input) + return out, req.Send() +} + +// CreateDirectConnectGatewayWithContext is the same as CreateDirectConnectGateway with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDirectConnectGateway for details on how to use this API operation. +// +// 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 *DirectConnect) CreateDirectConnectGatewayWithContext(ctx aws.Context, input *CreateDirectConnectGatewayInput, opts ...request.Option) (*CreateDirectConnectGatewayOutput, error) { + req, out := c.CreateDirectConnectGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDirectConnectGatewayAssociation = "CreateDirectConnectGatewayAssociation" + +// CreateDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the +// client's request for the CreateDirectConnectGatewayAssociation operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDirectConnectGatewayAssociation for more information on using the CreateDirectConnectGatewayAssociation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDirectConnectGatewayAssociationRequest method. +// req, resp := client.CreateDirectConnectGatewayAssociationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayAssociation +func (c *DirectConnect) CreateDirectConnectGatewayAssociationRequest(input *CreateDirectConnectGatewayAssociationInput) (req *request.Request, output *CreateDirectConnectGatewayAssociationOutput) { + op := &request.Operation{ + Name: opCreateDirectConnectGatewayAssociation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDirectConnectGatewayAssociationInput{} + } + + output = &CreateDirectConnectGatewayAssociationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDirectConnectGatewayAssociation API operation for AWS Direct Connect. +// +// Creates an association between a direct connect gateway and a virtual private +// gateway (VGW). The VGW must be attached to a VPC and must not be associated +// with another direct connect gateway. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation CreateDirectConnectGatewayAssociation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayAssociation +func (c *DirectConnect) CreateDirectConnectGatewayAssociation(input *CreateDirectConnectGatewayAssociationInput) (*CreateDirectConnectGatewayAssociationOutput, error) { + req, out := c.CreateDirectConnectGatewayAssociationRequest(input) + return out, req.Send() +} + +// CreateDirectConnectGatewayAssociationWithContext is the same as CreateDirectConnectGatewayAssociation with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDirectConnectGatewayAssociation for details on how to use this API operation. +// +// 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 *DirectConnect) CreateDirectConnectGatewayAssociationWithContext(ctx aws.Context, input *CreateDirectConnectGatewayAssociationInput, opts ...request.Option) (*CreateDirectConnectGatewayAssociationOutput, error) { + req, out := c.CreateDirectConnectGatewayAssociationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateInterconnect = "CreateInterconnect" + +// CreateInterconnectRequest generates a "aws/request.Request" representing the +// client's request for the CreateInterconnect operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateInterconnect for more information on using the CreateInterconnect +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateInterconnectRequest method. +// req, resp := client.CreateInterconnectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateInterconnect +func (c *DirectConnect) CreateInterconnectRequest(input *CreateInterconnectInput) (req *request.Request, output *Interconnect) { + op := &request.Operation{ + Name: opCreateInterconnect, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateInterconnectInput{} + } + + output = &Interconnect{} + req = c.newRequest(op, input, output) + return +} + +// CreateInterconnect API operation for AWS Direct Connect. +// +// Creates a new interconnect between a AWS Direct Connect partner's network +// and a specific AWS Direct Connect location. +// +// An interconnect is a connection which is capable of hosting other connections. +// The AWS Direct Connect partner can use an interconnect to provide sub-1Gbps +// AWS Direct Connect service to tier 2 customers who do not have their own +// connections. Like a standard connection, an interconnect links the AWS Direct +// Connect partner's network to an AWS Direct Connect location over a standard +// 1 Gbps or 10 Gbps Ethernet fiber-optic cable. One end is connected to the +// partner's router, the other to an AWS Direct Connect router. +// +// You can automatically add the new interconnect to a link aggregation group +// (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect +// is allocated on the same AWS Direct Connect endpoint that hosts the specified +// LAG. If there are no available ports on the endpoint, the request fails and +// no interconnect will be created. +// +// For each end customer, the AWS Direct Connect partner provisions a connection +// on their interconnect by calling AllocateConnectionOnInterconnect. The end +// customer can then connect to AWS resources by creating a virtual interface +// on their connection, using the VLAN assigned to them by the AWS Direct Connect +// partner. +// +// This is intended for use by AWS Direct Connect partners only. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation CreateInterconnect for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateInterconnect +func (c *DirectConnect) CreateInterconnect(input *CreateInterconnectInput) (*Interconnect, error) { + req, out := c.CreateInterconnectRequest(input) + return out, req.Send() +} + +// CreateInterconnectWithContext is the same as CreateInterconnect with the addition of +// the ability to pass a context and additional request options. +// +// See CreateInterconnect for details on how to use this API operation. +// +// 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 *DirectConnect) CreateInterconnectWithContext(ctx aws.Context, input *CreateInterconnectInput, opts ...request.Option) (*Interconnect, error) { + req, out := c.CreateInterconnectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateLag = "CreateLag" + +// CreateLagRequest generates a "aws/request.Request" representing the +// client's request for the CreateLag operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLag for more information on using the CreateLag +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLagRequest method. +// req, resp := client.CreateLagRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateLag +func (c *DirectConnect) CreateLagRequest(input *CreateLagInput) (req *request.Request, output *Lag) { + op := &request.Operation{ + Name: opCreateLag, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateLagInput{} + } + + output = &Lag{} + req = c.newRequest(op, input, output) + return +} + +// CreateLag API operation for AWS Direct Connect. +// +// Creates a new link aggregation group (LAG) with the specified number of bundled +// physical connections between the customer network and a specific AWS Direct +// Connect location. A LAG is a logical interface that uses the Link Aggregation +// Control Protocol (LACP) to aggregate multiple 1 gigabit or 10 gigabit interfaces, +// allowing you to treat them as a single interface. +// +// All connections in a LAG must use the same bandwidth (for example, 10 Gbps), +// and must terminate at the same AWS Direct Connect endpoint. +// +// You can have up to 10 connections per LAG. Regardless of this limit, if you +// request more connections for the LAG than AWS Direct Connect can allocate +// on a single endpoint, no LAG is created. +// +// You can specify an existing physical connection or interconnect to include +// in the LAG (which counts towards the total number of connections). Doing +// so interrupts the current physical connection or hosted connections, and +// re-establishes them as a member of the LAG. The LAG will be created on the +// same AWS Direct Connect endpoint to which the connection terminates. Any +// virtual interfaces associated with the connection are automatically disassociated +// and re-associated with the LAG. The connection ID does not change. +// +// If the AWS account used to create a LAG is a registered AWS Direct Connect +// partner, the LAG is automatically enabled to host sub-connections. For a +// LAG owned by a partner, any associated virtual interfaces cannot be directly +// configured. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation CreateLag for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateLag +func (c *DirectConnect) CreateLag(input *CreateLagInput) (*Lag, error) { + req, out := c.CreateLagRequest(input) + return out, req.Send() +} + +// CreateLagWithContext is the same as CreateLag with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLag for details on how to use this API operation. +// +// 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 *DirectConnect) CreateLagWithContext(ctx aws.Context, input *CreateLagInput, opts ...request.Option) (*Lag, error) { + req, out := c.CreateLagRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreatePrivateVirtualInterface = "CreatePrivateVirtualInterface" + +// CreatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the CreatePrivateVirtualInterface operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePrivateVirtualInterface for more information on using the CreatePrivateVirtualInterface +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePrivateVirtualInterfaceRequest method. +// req, resp := client.CreatePrivateVirtualInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePrivateVirtualInterface +func (c *DirectConnect) CreatePrivateVirtualInterfaceRequest(input *CreatePrivateVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { + op := &request.Operation{ + Name: opCreatePrivateVirtualInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreatePrivateVirtualInterfaceInput{} + } + + output = &VirtualInterface{} + req = c.newRequest(op, input, output) + return +} + +// CreatePrivateVirtualInterface API operation for AWS Direct Connect. +// +// Creates a new private virtual interface. A virtual interface is the VLAN +// that transports AWS Direct Connect traffic. A private virtual interface supports +// sending traffic to a single virtual private cloud (VPC). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation CreatePrivateVirtualInterface for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePrivateVirtualInterface +func (c *DirectConnect) CreatePrivateVirtualInterface(input *CreatePrivateVirtualInterfaceInput) (*VirtualInterface, error) { + req, out := c.CreatePrivateVirtualInterfaceRequest(input) + return out, req.Send() +} + +// CreatePrivateVirtualInterfaceWithContext is the same as CreatePrivateVirtualInterface with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePrivateVirtualInterface for details on how to use this API operation. +// +// 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 *DirectConnect) CreatePrivateVirtualInterfaceWithContext(ctx aws.Context, input *CreatePrivateVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { + req, out := c.CreatePrivateVirtualInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreatePublicVirtualInterface = "CreatePublicVirtualInterface" + +// CreatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the CreatePublicVirtualInterface operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePublicVirtualInterface for more information on using the CreatePublicVirtualInterface +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePublicVirtualInterfaceRequest method. +// req, resp := client.CreatePublicVirtualInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePublicVirtualInterface +func (c *DirectConnect) CreatePublicVirtualInterfaceRequest(input *CreatePublicVirtualInterfaceInput) (req *request.Request, output *VirtualInterface) { + op := &request.Operation{ + Name: opCreatePublicVirtualInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreatePublicVirtualInterfaceInput{} + } + + output = &VirtualInterface{} + req = c.newRequest(op, input, output) + return +} + +// CreatePublicVirtualInterface API operation for AWS Direct Connect. +// +// Creates a new public virtual interface. A virtual interface is the VLAN that +// transports AWS Direct Connect traffic. A public virtual interface supports +// sending traffic to public services of AWS such as Amazon Simple Storage Service +// (Amazon S3). +// +// When creating an IPv6 public virtual interface (addressFamily is 'ipv6'), +// the customer and amazon address fields should be left blank to use auto-assigned +// IPv6 space. Custom IPv6 Addresses are currently not supported. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation CreatePublicVirtualInterface for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePublicVirtualInterface +func (c *DirectConnect) CreatePublicVirtualInterface(input *CreatePublicVirtualInterfaceInput) (*VirtualInterface, error) { + req, out := c.CreatePublicVirtualInterfaceRequest(input) + return out, req.Send() +} + +// CreatePublicVirtualInterfaceWithContext is the same as CreatePublicVirtualInterface with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePublicVirtualInterface for details on how to use this API operation. +// +// 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 *DirectConnect) CreatePublicVirtualInterfaceWithContext(ctx aws.Context, input *CreatePublicVirtualInterfaceInput, opts ...request.Option) (*VirtualInterface, error) { + req, out := c.CreatePublicVirtualInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBGPPeer = "DeleteBGPPeer" + +// DeleteBGPPeerRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBGPPeer operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBGPPeer for more information on using the DeleteBGPPeer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBGPPeerRequest method. +// req, resp := client.DeleteBGPPeerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteBGPPeer +func (c *DirectConnect) DeleteBGPPeerRequest(input *DeleteBGPPeerInput) (req *request.Request, output *DeleteBGPPeerOutput) { + op := &request.Operation{ + Name: opDeleteBGPPeer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteBGPPeerInput{} + } + + output = &DeleteBGPPeerOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBGPPeer API operation for AWS Direct Connect. +// +// Deletes a BGP peer on the specified virtual interface that matches the specified +// customer address and ASN. You cannot delete the last BGP peer from a virtual +// interface. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DeleteBGPPeer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteBGPPeer +func (c *DirectConnect) DeleteBGPPeer(input *DeleteBGPPeerInput) (*DeleteBGPPeerOutput, error) { + req, out := c.DeleteBGPPeerRequest(input) + return out, req.Send() +} + +// DeleteBGPPeerWithContext is the same as DeleteBGPPeer with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBGPPeer for details on how to use this API operation. +// +// 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 *DirectConnect) DeleteBGPPeerWithContext(ctx aws.Context, input *DeleteBGPPeerInput, opts ...request.Option) (*DeleteBGPPeerOutput, error) { + req, out := c.DeleteBGPPeerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteConnection = "DeleteConnection" + +// DeleteConnectionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteConnection operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteConnection for more information on using the DeleteConnection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteConnectionRequest method. +// req, resp := client.DeleteConnectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteConnection +func (c *DirectConnect) DeleteConnectionRequest(input *DeleteConnectionInput) (req *request.Request, output *Connection) { + op := &request.Operation{ + Name: opDeleteConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteConnectionInput{} + } + + output = &Connection{} + req = c.newRequest(op, input, output) + return +} + +// DeleteConnection API operation for AWS Direct Connect. +// +// Deletes the connection. +// +// Deleting a connection only stops the AWS Direct Connect port hour and data +// transfer charges. You need to cancel separately with the providers any services +// or charges for cross-connects or network circuits that connect you to the +// AWS Direct Connect location. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DeleteConnection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteConnection +func (c *DirectConnect) DeleteConnection(input *DeleteConnectionInput) (*Connection, error) { + req, out := c.DeleteConnectionRequest(input) + return out, req.Send() +} + +// DeleteConnectionWithContext is the same as DeleteConnection with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteConnection for details on how to use this API operation. +// +// 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 *DirectConnect) DeleteConnectionWithContext(ctx aws.Context, input *DeleteConnectionInput, opts ...request.Option) (*Connection, error) { + req, out := c.DeleteConnectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDirectConnectGateway = "DeleteDirectConnectGateway" + +// DeleteDirectConnectGatewayRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDirectConnectGateway operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDirectConnectGateway for more information on using the DeleteDirectConnectGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDirectConnectGatewayRequest method. +// req, resp := client.DeleteDirectConnectGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGateway +func (c *DirectConnect) DeleteDirectConnectGatewayRequest(input *DeleteDirectConnectGatewayInput) (req *request.Request, output *DeleteDirectConnectGatewayOutput) { + op := &request.Operation{ + Name: opDeleteDirectConnectGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDirectConnectGatewayInput{} + } + + output = &DeleteDirectConnectGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDirectConnectGateway API operation for AWS Direct Connect. +// +// Deletes a direct connect gateway. You must first delete all virtual interfaces +// that are attached to the direct connect gateway and disassociate all virtual +// private gateways that are associated with the direct connect gateway. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DeleteDirectConnectGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGateway +func (c *DirectConnect) DeleteDirectConnectGateway(input *DeleteDirectConnectGatewayInput) (*DeleteDirectConnectGatewayOutput, error) { + req, out := c.DeleteDirectConnectGatewayRequest(input) + return out, req.Send() +} + +// DeleteDirectConnectGatewayWithContext is the same as DeleteDirectConnectGateway with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDirectConnectGateway for details on how to use this API operation. +// +// 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 *DirectConnect) DeleteDirectConnectGatewayWithContext(ctx aws.Context, input *DeleteDirectConnectGatewayInput, opts ...request.Option) (*DeleteDirectConnectGatewayOutput, error) { + req, out := c.DeleteDirectConnectGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDirectConnectGatewayAssociation = "DeleteDirectConnectGatewayAssociation" + +// DeleteDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDirectConnectGatewayAssociation operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDirectConnectGatewayAssociation for more information on using the DeleteDirectConnectGatewayAssociation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDirectConnectGatewayAssociationRequest method. +// req, resp := client.DeleteDirectConnectGatewayAssociationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayAssociation +func (c *DirectConnect) DeleteDirectConnectGatewayAssociationRequest(input *DeleteDirectConnectGatewayAssociationInput) (req *request.Request, output *DeleteDirectConnectGatewayAssociationOutput) { + op := &request.Operation{ + Name: opDeleteDirectConnectGatewayAssociation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDirectConnectGatewayAssociationInput{} + } + + output = &DeleteDirectConnectGatewayAssociationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDirectConnectGatewayAssociation API operation for AWS Direct Connect. +// +// Deletes the association between a direct connect gateway and a virtual private +// gateway. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DeleteDirectConnectGatewayAssociation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayAssociation +func (c *DirectConnect) DeleteDirectConnectGatewayAssociation(input *DeleteDirectConnectGatewayAssociationInput) (*DeleteDirectConnectGatewayAssociationOutput, error) { + req, out := c.DeleteDirectConnectGatewayAssociationRequest(input) + return out, req.Send() +} + +// DeleteDirectConnectGatewayAssociationWithContext is the same as DeleteDirectConnectGatewayAssociation with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDirectConnectGatewayAssociation for details on how to use this API operation. +// +// 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 *DirectConnect) DeleteDirectConnectGatewayAssociationWithContext(ctx aws.Context, input *DeleteDirectConnectGatewayAssociationInput, opts ...request.Option) (*DeleteDirectConnectGatewayAssociationOutput, error) { + req, out := c.DeleteDirectConnectGatewayAssociationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteInterconnect = "DeleteInterconnect" + +// DeleteInterconnectRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInterconnect operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteInterconnect for more information on using the DeleteInterconnect +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteInterconnectRequest method. +// req, resp := client.DeleteInterconnectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteInterconnect +func (c *DirectConnect) DeleteInterconnectRequest(input *DeleteInterconnectInput) (req *request.Request, output *DeleteInterconnectOutput) { + op := &request.Operation{ + Name: opDeleteInterconnect, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteInterconnectInput{} + } + + output = &DeleteInterconnectOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteInterconnect API operation for AWS Direct Connect. +// +// Deletes the specified interconnect. +// +// This is intended for use by AWS Direct Connect partners only. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DeleteInterconnect for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteInterconnect +func (c *DirectConnect) DeleteInterconnect(input *DeleteInterconnectInput) (*DeleteInterconnectOutput, error) { + req, out := c.DeleteInterconnectRequest(input) + return out, req.Send() +} + +// DeleteInterconnectWithContext is the same as DeleteInterconnect with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInterconnect for details on how to use this API operation. +// +// 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 *DirectConnect) DeleteInterconnectWithContext(ctx aws.Context, input *DeleteInterconnectInput, opts ...request.Option) (*DeleteInterconnectOutput, error) { + req, out := c.DeleteInterconnectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteLag = "DeleteLag" + +// DeleteLagRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLag operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLag for more information on using the DeleteLag +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLagRequest method. +// req, resp := client.DeleteLagRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteLag +func (c *DirectConnect) DeleteLagRequest(input *DeleteLagInput) (req *request.Request, output *Lag) { + op := &request.Operation{ + Name: opDeleteLag, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLagInput{} + } + + output = &Lag{} + req = c.newRequest(op, input, output) + return +} + +// DeleteLag API operation for AWS Direct Connect. +// +// Deletes a link aggregation group (LAG). You cannot delete a LAG if it has +// active virtual interfaces or hosted connections. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DeleteLag for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteLag +func (c *DirectConnect) DeleteLag(input *DeleteLagInput) (*Lag, error) { + req, out := c.DeleteLagRequest(input) + return out, req.Send() +} + +// DeleteLagWithContext is the same as DeleteLag with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLag for details on how to use this API operation. +// +// 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 *DirectConnect) DeleteLagWithContext(ctx aws.Context, input *DeleteLagInput, opts ...request.Option) (*Lag, error) { + req, out := c.DeleteLagRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteVirtualInterface = "DeleteVirtualInterface" + +// DeleteVirtualInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVirtualInterface operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteVirtualInterface for more information on using the DeleteVirtualInterface +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteVirtualInterfaceRequest method. +// req, resp := client.DeleteVirtualInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteVirtualInterface +func (c *DirectConnect) DeleteVirtualInterfaceRequest(input *DeleteVirtualInterfaceInput) (req *request.Request, output *DeleteVirtualInterfaceOutput) { + op := &request.Operation{ + Name: opDeleteVirtualInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVirtualInterfaceInput{} + } + + output = &DeleteVirtualInterfaceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVirtualInterface API operation for AWS Direct Connect. +// +// Deletes a virtual interface. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DeleteVirtualInterface for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteVirtualInterface +func (c *DirectConnect) DeleteVirtualInterface(input *DeleteVirtualInterfaceInput) (*DeleteVirtualInterfaceOutput, error) { + req, out := c.DeleteVirtualInterfaceRequest(input) + return out, req.Send() +} + +// DeleteVirtualInterfaceWithContext is the same as DeleteVirtualInterface with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVirtualInterface for details on how to use this API operation. +// +// 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 *DirectConnect) DeleteVirtualInterfaceWithContext(ctx aws.Context, input *DeleteVirtualInterfaceInput, opts ...request.Option) (*DeleteVirtualInterfaceOutput, error) { + req, out := c.DeleteVirtualInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeConnectionLoa = "DescribeConnectionLoa" + +// DescribeConnectionLoaRequest generates a "aws/request.Request" representing the +// client's request for the DescribeConnectionLoa operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeConnectionLoa for more information on using the DescribeConnectionLoa +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeConnectionLoaRequest method. +// req, resp := client.DescribeConnectionLoaRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoa +func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLoaInput) (req *request.Request, output *DescribeConnectionLoaOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, DescribeConnectionLoa, has been deprecated") + } + op := &request.Operation{ + Name: opDescribeConnectionLoa, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeConnectionLoaInput{} + } + + output = &DescribeConnectionLoaOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeConnectionLoa API operation for AWS Direct Connect. +// +// Deprecated in favor of DescribeLoa. +// +// Returns the LOA-CFA for a Connection. +// +// The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is +// a document that your APN partner or service provider uses when establishing +// your cross connect to AWS at the colocation facility. For more information, +// see Requesting Cross Connects at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) +// in the AWS Direct Connect user guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeConnectionLoa for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoa +func (c *DirectConnect) DescribeConnectionLoa(input *DescribeConnectionLoaInput) (*DescribeConnectionLoaOutput, error) { + req, out := c.DescribeConnectionLoaRequest(input) + return out, req.Send() +} + +// DescribeConnectionLoaWithContext is the same as DescribeConnectionLoa with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeConnectionLoa for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeConnectionLoaWithContext(ctx aws.Context, input *DescribeConnectionLoaInput, opts ...request.Option) (*DescribeConnectionLoaOutput, error) { + req, out := c.DescribeConnectionLoaRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeConnections = "DescribeConnections" + +// DescribeConnectionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeConnections operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeConnections for more information on using the DescribeConnections +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeConnectionsRequest method. +// req, resp := client.DescribeConnectionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnections +func (c *DirectConnect) DescribeConnectionsRequest(input *DescribeConnectionsInput) (req *request.Request, output *Connections) { + op := &request.Operation{ + Name: opDescribeConnections, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeConnectionsInput{} + } + + output = &Connections{} + req = c.newRequest(op, input, output) + return +} + +// DescribeConnections API operation for AWS Direct Connect. +// +// Displays all connections in this region. +// +// If a connection ID is provided, the call returns only that particular connection. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeConnections for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnections +func (c *DirectConnect) DescribeConnections(input *DescribeConnectionsInput) (*Connections, error) { + req, out := c.DescribeConnectionsRequest(input) + return out, req.Send() +} + +// DescribeConnectionsWithContext is the same as DescribeConnections with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeConnections for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeConnectionsWithContext(ctx aws.Context, input *DescribeConnectionsInput, opts ...request.Option) (*Connections, error) { + req, out := c.DescribeConnectionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeConnectionsOnInterconnect = "DescribeConnectionsOnInterconnect" + +// DescribeConnectionsOnInterconnectRequest generates a "aws/request.Request" representing the +// client's request for the DescribeConnectionsOnInterconnect operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeConnectionsOnInterconnect for more information on using the DescribeConnectionsOnInterconnect +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeConnectionsOnInterconnectRequest method. +// req, resp := client.DescribeConnectionsOnInterconnectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnect +func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *DescribeConnectionsOnInterconnectInput) (req *request.Request, output *Connections) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, DescribeConnectionsOnInterconnect, has been deprecated") + } + op := &request.Operation{ + Name: opDescribeConnectionsOnInterconnect, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeConnectionsOnInterconnectInput{} + } + + output = &Connections{} + req = c.newRequest(op, input, output) + return +} + +// DescribeConnectionsOnInterconnect API operation for AWS Direct Connect. +// +// Deprecated in favor of DescribeHostedConnections. +// +// Returns a list of connections that have been provisioned on the given interconnect. +// +// This is intended for use by AWS Direct Connect partners only. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeConnectionsOnInterconnect for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnect +func (c *DirectConnect) DescribeConnectionsOnInterconnect(input *DescribeConnectionsOnInterconnectInput) (*Connections, error) { + req, out := c.DescribeConnectionsOnInterconnectRequest(input) + return out, req.Send() +} + +// DescribeConnectionsOnInterconnectWithContext is the same as DescribeConnectionsOnInterconnect with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeConnectionsOnInterconnect for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeConnectionsOnInterconnectWithContext(ctx aws.Context, input *DescribeConnectionsOnInterconnectInput, opts ...request.Option) (*Connections, error) { + req, out := c.DescribeConnectionsOnInterconnectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDirectConnectGatewayAssociations = "DescribeDirectConnectGatewayAssociations" + +// DescribeDirectConnectGatewayAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDirectConnectGatewayAssociations operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDirectConnectGatewayAssociations for more information on using the DescribeDirectConnectGatewayAssociations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDirectConnectGatewayAssociationsRequest method. +// req, resp := client.DescribeDirectConnectGatewayAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAssociations +func (c *DirectConnect) DescribeDirectConnectGatewayAssociationsRequest(input *DescribeDirectConnectGatewayAssociationsInput) (req *request.Request, output *DescribeDirectConnectGatewayAssociationsOutput) { + op := &request.Operation{ + Name: opDescribeDirectConnectGatewayAssociations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDirectConnectGatewayAssociationsInput{} + } + + output = &DescribeDirectConnectGatewayAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDirectConnectGatewayAssociations API operation for AWS Direct Connect. +// +// Returns a list of all direct connect gateway and virtual private gateway +// (VGW) associations. Either a direct connect gateway ID or a VGW ID must be +// provided in the request. If a direct connect gateway ID is provided, the +// response returns all VGWs associated with the direct connect gateway. If +// a VGW ID is provided, the response returns all direct connect gateways associated +// with the VGW. If both are provided, the response only returns the association +// that matches both the direct connect gateway and the VGW. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeDirectConnectGatewayAssociations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAssociations +func (c *DirectConnect) DescribeDirectConnectGatewayAssociations(input *DescribeDirectConnectGatewayAssociationsInput) (*DescribeDirectConnectGatewayAssociationsOutput, error) { + req, out := c.DescribeDirectConnectGatewayAssociationsRequest(input) + return out, req.Send() +} + +// DescribeDirectConnectGatewayAssociationsWithContext is the same as DescribeDirectConnectGatewayAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDirectConnectGatewayAssociations for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeDirectConnectGatewayAssociationsWithContext(ctx aws.Context, input *DescribeDirectConnectGatewayAssociationsInput, opts ...request.Option) (*DescribeDirectConnectGatewayAssociationsOutput, error) { + req, out := c.DescribeDirectConnectGatewayAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDirectConnectGatewayAttachments = "DescribeDirectConnectGatewayAttachments" + +// DescribeDirectConnectGatewayAttachmentsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDirectConnectGatewayAttachments operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDirectConnectGatewayAttachments for more information on using the DescribeDirectConnectGatewayAttachments +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDirectConnectGatewayAttachmentsRequest method. +// req, resp := client.DescribeDirectConnectGatewayAttachmentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAttachments +func (c *DirectConnect) DescribeDirectConnectGatewayAttachmentsRequest(input *DescribeDirectConnectGatewayAttachmentsInput) (req *request.Request, output *DescribeDirectConnectGatewayAttachmentsOutput) { + op := &request.Operation{ + Name: opDescribeDirectConnectGatewayAttachments, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDirectConnectGatewayAttachmentsInput{} + } + + output = &DescribeDirectConnectGatewayAttachmentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDirectConnectGatewayAttachments API operation for AWS Direct Connect. +// +// Returns a list of all direct connect gateway and virtual interface (VIF) +// attachments. Either a direct connect gateway ID or a VIF ID must be provided +// in the request. If a direct connect gateway ID is provided, the response +// returns all VIFs attached to the direct connect gateway. If a VIF ID is provided, +// the response returns all direct connect gateways attached to the VIF. If +// both are provided, the response only returns the attachment that matches +// both the direct connect gateway and the VIF. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeDirectConnectGatewayAttachments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAttachments +func (c *DirectConnect) DescribeDirectConnectGatewayAttachments(input *DescribeDirectConnectGatewayAttachmentsInput) (*DescribeDirectConnectGatewayAttachmentsOutput, error) { + req, out := c.DescribeDirectConnectGatewayAttachmentsRequest(input) + return out, req.Send() +} + +// DescribeDirectConnectGatewayAttachmentsWithContext is the same as DescribeDirectConnectGatewayAttachments with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDirectConnectGatewayAttachments for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeDirectConnectGatewayAttachmentsWithContext(ctx aws.Context, input *DescribeDirectConnectGatewayAttachmentsInput, opts ...request.Option) (*DescribeDirectConnectGatewayAttachmentsOutput, error) { + req, out := c.DescribeDirectConnectGatewayAttachmentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDirectConnectGateways = "DescribeDirectConnectGateways" + +// DescribeDirectConnectGatewaysRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDirectConnectGateways operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDirectConnectGateways for more information on using the DescribeDirectConnectGateways +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDirectConnectGatewaysRequest method. +// req, resp := client.DescribeDirectConnectGatewaysRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGateways +func (c *DirectConnect) DescribeDirectConnectGatewaysRequest(input *DescribeDirectConnectGatewaysInput) (req *request.Request, output *DescribeDirectConnectGatewaysOutput) { + op := &request.Operation{ + Name: opDescribeDirectConnectGateways, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDirectConnectGatewaysInput{} + } + + output = &DescribeDirectConnectGatewaysOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDirectConnectGateways API operation for AWS Direct Connect. +// +// Returns a list of direct connect gateways in your account. Deleted direct +// connect gateways are not returned. You can provide a direct connect gateway +// ID in the request to return information about the specific direct connect +// gateway only. Otherwise, if a direct connect gateway ID is not provided, +// information about all of your direct connect gateways is returned. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeDirectConnectGateways for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGateways +func (c *DirectConnect) DescribeDirectConnectGateways(input *DescribeDirectConnectGatewaysInput) (*DescribeDirectConnectGatewaysOutput, error) { + req, out := c.DescribeDirectConnectGatewaysRequest(input) + return out, req.Send() +} + +// DescribeDirectConnectGatewaysWithContext is the same as DescribeDirectConnectGateways with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDirectConnectGateways for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeDirectConnectGatewaysWithContext(ctx aws.Context, input *DescribeDirectConnectGatewaysInput, opts ...request.Option) (*DescribeDirectConnectGatewaysOutput, error) { + req, out := c.DescribeDirectConnectGatewaysRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeHostedConnections = "DescribeHostedConnections" + +// DescribeHostedConnectionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeHostedConnections operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeHostedConnections for more information on using the DescribeHostedConnections +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeHostedConnectionsRequest method. +// req, resp := client.DescribeHostedConnectionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeHostedConnections +func (c *DirectConnect) DescribeHostedConnectionsRequest(input *DescribeHostedConnectionsInput) (req *request.Request, output *Connections) { + op := &request.Operation{ + Name: opDescribeHostedConnections, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeHostedConnectionsInput{} + } + + output = &Connections{} + req = c.newRequest(op, input, output) + return +} + +// DescribeHostedConnections API operation for AWS Direct Connect. +// +// Returns a list of hosted connections that have been provisioned on the given +// interconnect or link aggregation group (LAG). +// +// This is intended for use by AWS Direct Connect partners only. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeHostedConnections for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeHostedConnections +func (c *DirectConnect) DescribeHostedConnections(input *DescribeHostedConnectionsInput) (*Connections, error) { + req, out := c.DescribeHostedConnectionsRequest(input) + return out, req.Send() +} + +// DescribeHostedConnectionsWithContext is the same as DescribeHostedConnections with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeHostedConnections for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeHostedConnectionsWithContext(ctx aws.Context, input *DescribeHostedConnectionsInput, opts ...request.Option) (*Connections, error) { + req, out := c.DescribeHostedConnectionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeInterconnectLoa = "DescribeInterconnectLoa" + +// DescribeInterconnectLoaRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInterconnectLoa operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeInterconnectLoa for more information on using the DescribeInterconnectLoa +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeInterconnectLoaRequest method. +// req, resp := client.DescribeInterconnectLoaRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoa +func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconnectLoaInput) (req *request.Request, output *DescribeInterconnectLoaOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, DescribeInterconnectLoa, has been deprecated") + } + op := &request.Operation{ + Name: opDescribeInterconnectLoa, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeInterconnectLoaInput{} + } + + output = &DescribeInterconnectLoaOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInterconnectLoa API operation for AWS Direct Connect. +// +// Deprecated in favor of DescribeLoa. +// +// Returns the LOA-CFA for an Interconnect. +// +// The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is +// a document that is used when establishing your cross connect to AWS at the +// colocation facility. For more information, see Requesting Cross Connects +// at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) +// in the AWS Direct Connect user guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeInterconnectLoa for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoa +func (c *DirectConnect) DescribeInterconnectLoa(input *DescribeInterconnectLoaInput) (*DescribeInterconnectLoaOutput, error) { + req, out := c.DescribeInterconnectLoaRequest(input) + return out, req.Send() +} + +// DescribeInterconnectLoaWithContext is the same as DescribeInterconnectLoa with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInterconnectLoa for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeInterconnectLoaWithContext(ctx aws.Context, input *DescribeInterconnectLoaInput, opts ...request.Option) (*DescribeInterconnectLoaOutput, error) { + req, out := c.DescribeInterconnectLoaRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeInterconnects = "DescribeInterconnects" + +// DescribeInterconnectsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInterconnects operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeInterconnects for more information on using the DescribeInterconnects +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeInterconnectsRequest method. +// req, resp := client.DescribeInterconnectsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnects +func (c *DirectConnect) DescribeInterconnectsRequest(input *DescribeInterconnectsInput) (req *request.Request, output *DescribeInterconnectsOutput) { + op := &request.Operation{ + Name: opDescribeInterconnects, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeInterconnectsInput{} + } + + output = &DescribeInterconnectsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInterconnects API operation for AWS Direct Connect. +// +// Returns a list of interconnects owned by the AWS account. +// +// If an interconnect ID is provided, it will only return this particular interconnect. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeInterconnects for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnects +func (c *DirectConnect) DescribeInterconnects(input *DescribeInterconnectsInput) (*DescribeInterconnectsOutput, error) { + req, out := c.DescribeInterconnectsRequest(input) + return out, req.Send() +} + +// DescribeInterconnectsWithContext is the same as DescribeInterconnects with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInterconnects for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeInterconnectsWithContext(ctx aws.Context, input *DescribeInterconnectsInput, opts ...request.Option) (*DescribeInterconnectsOutput, error) { + req, out := c.DescribeInterconnectsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeLags = "DescribeLags" + +// DescribeLagsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLags operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeLags for more information on using the DescribeLags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeLagsRequest method. +// req, resp := client.DescribeLagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLags +func (c *DirectConnect) DescribeLagsRequest(input *DescribeLagsInput) (req *request.Request, output *DescribeLagsOutput) { + op := &request.Operation{ + Name: opDescribeLags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeLagsInput{} + } + + output = &DescribeLagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeLags API operation for AWS Direct Connect. +// +// Describes the link aggregation groups (LAGs) in your account. +// +// If a LAG ID is provided, only information about the specified LAG is returned. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeLags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLags +func (c *DirectConnect) DescribeLags(input *DescribeLagsInput) (*DescribeLagsOutput, error) { + req, out := c.DescribeLagsRequest(input) + return out, req.Send() +} + +// DescribeLagsWithContext is the same as DescribeLags with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeLags for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeLagsWithContext(ctx aws.Context, input *DescribeLagsInput, opts ...request.Option) (*DescribeLagsOutput, error) { + req, out := c.DescribeLagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeLoa = "DescribeLoa" + +// DescribeLoaRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLoa operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeLoa for more information on using the DescribeLoa +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeLoaRequest method. +// req, resp := client.DescribeLoaRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLoa +func (c *DirectConnect) DescribeLoaRequest(input *DescribeLoaInput) (req *request.Request, output *Loa) { + op := &request.Operation{ + Name: opDescribeLoa, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeLoaInput{} + } + + output = &Loa{} + req = c.newRequest(op, input, output) + return +} + +// DescribeLoa API operation for AWS Direct Connect. +// +// Returns the LOA-CFA for a connection, interconnect, or link aggregation group +// (LAG). +// +// The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is +// a document that is used when establishing your cross connect to AWS at the +// colocation facility. For more information, see Requesting Cross Connects +// at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) +// in the AWS Direct Connect user guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeLoa for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLoa +func (c *DirectConnect) DescribeLoa(input *DescribeLoaInput) (*Loa, error) { + req, out := c.DescribeLoaRequest(input) + return out, req.Send() +} + +// DescribeLoaWithContext is the same as DescribeLoa with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeLoa for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeLoaWithContext(ctx aws.Context, input *DescribeLoaInput, opts ...request.Option) (*Loa, error) { + req, out := c.DescribeLoaRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeLocations = "DescribeLocations" + +// DescribeLocationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLocations operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeLocations for more information on using the DescribeLocations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeLocationsRequest method. +// req, resp := client.DescribeLocationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLocations +func (c *DirectConnect) DescribeLocationsRequest(input *DescribeLocationsInput) (req *request.Request, output *DescribeLocationsOutput) { + op := &request.Operation{ + Name: opDescribeLocations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeLocationsInput{} + } + + output = &DescribeLocationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeLocations API operation for AWS Direct Connect. +// +// Returns the list of AWS Direct Connect locations in the current AWS region. +// These are the locations that may be selected when calling CreateConnection +// or CreateInterconnect. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeLocations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLocations +func (c *DirectConnect) DescribeLocations(input *DescribeLocationsInput) (*DescribeLocationsOutput, error) { + req, out := c.DescribeLocationsRequest(input) + return out, req.Send() +} + +// DescribeLocationsWithContext is the same as DescribeLocations with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeLocations for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeLocationsWithContext(ctx aws.Context, input *DescribeLocationsInput, opts ...request.Option) (*DescribeLocationsOutput, error) { + req, out := c.DescribeLocationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTags = "DescribeTags" + +// DescribeTagsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTags operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTags for more information on using the DescribeTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTagsRequest method. +// req, resp := client.DescribeTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeTags +func (c *DirectConnect) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { + op := &request.Operation{ + Name: opDescribeTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTagsInput{} + } + + output = &DescribeTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTags API operation for AWS Direct Connect. +// +// Describes the tags associated with the specified Direct Connect resources. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeTags +func (c *DirectConnect) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { + req, out := c.DescribeTagsRequest(input) + return out, req.Send() +} + +// DescribeTagsWithContext is the same as DescribeTags with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTags for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { + req, out := c.DescribeTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeVirtualGateways = "DescribeVirtualGateways" + +// DescribeVirtualGatewaysRequest generates a "aws/request.Request" representing the +// client's request for the DescribeVirtualGateways operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeVirtualGateways for more information on using the DescribeVirtualGateways +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeVirtualGatewaysRequest method. +// req, resp := client.DescribeVirtualGatewaysRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualGateways +func (c *DirectConnect) DescribeVirtualGatewaysRequest(input *DescribeVirtualGatewaysInput) (req *request.Request, output *DescribeVirtualGatewaysOutput) { + op := &request.Operation{ + Name: opDescribeVirtualGateways, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVirtualGatewaysInput{} + } + + output = &DescribeVirtualGatewaysOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeVirtualGateways API operation for AWS Direct Connect. +// +// Returns a list of virtual private gateways owned by the AWS account. +// +// You can create one or more AWS Direct Connect private virtual interfaces +// linking to a virtual private gateway. A virtual private gateway can be managed +// via Amazon Virtual Private Cloud (VPC) console or the EC2 CreateVpnGateway +// (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html) +// action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeVirtualGateways for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualGateways +func (c *DirectConnect) DescribeVirtualGateways(input *DescribeVirtualGatewaysInput) (*DescribeVirtualGatewaysOutput, error) { + req, out := c.DescribeVirtualGatewaysRequest(input) + return out, req.Send() +} + +// DescribeVirtualGatewaysWithContext is the same as DescribeVirtualGateways with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeVirtualGateways for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeVirtualGatewaysWithContext(ctx aws.Context, input *DescribeVirtualGatewaysInput, opts ...request.Option) (*DescribeVirtualGatewaysOutput, error) { + req, out := c.DescribeVirtualGatewaysRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeVirtualInterfaces = "DescribeVirtualInterfaces" + +// DescribeVirtualInterfacesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeVirtualInterfaces operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeVirtualInterfaces for more information on using the DescribeVirtualInterfaces +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeVirtualInterfacesRequest method. +// req, resp := client.DescribeVirtualInterfacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualInterfaces +func (c *DirectConnect) DescribeVirtualInterfacesRequest(input *DescribeVirtualInterfacesInput) (req *request.Request, output *DescribeVirtualInterfacesOutput) { + op := &request.Operation{ + Name: opDescribeVirtualInterfaces, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVirtualInterfacesInput{} + } + + output = &DescribeVirtualInterfacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeVirtualInterfaces API operation for AWS Direct Connect. +// +// Displays all virtual interfaces for an AWS account. Virtual interfaces deleted +// fewer than 15 minutes before you make the request are also returned. If you +// specify a connection ID, only the virtual interfaces associated with the +// connection are returned. If you specify a virtual interface ID, then only +// a single virtual interface is returned. +// +// A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect +// location and the customer. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DescribeVirtualInterfaces for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualInterfaces +func (c *DirectConnect) DescribeVirtualInterfaces(input *DescribeVirtualInterfacesInput) (*DescribeVirtualInterfacesOutput, error) { + req, out := c.DescribeVirtualInterfacesRequest(input) + return out, req.Send() +} + +// DescribeVirtualInterfacesWithContext is the same as DescribeVirtualInterfaces with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeVirtualInterfaces for details on how to use this API operation. +// +// 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 *DirectConnect) DescribeVirtualInterfacesWithContext(ctx aws.Context, input *DescribeVirtualInterfacesInput, opts ...request.Option) (*DescribeVirtualInterfacesOutput, error) { + req, out := c.DescribeVirtualInterfacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateConnectionFromLag = "DisassociateConnectionFromLag" + +// DisassociateConnectionFromLagRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateConnectionFromLag operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateConnectionFromLag for more information on using the DisassociateConnectionFromLag +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateConnectionFromLagRequest method. +// req, resp := client.DisassociateConnectionFromLagRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DisassociateConnectionFromLag +func (c *DirectConnect) DisassociateConnectionFromLagRequest(input *DisassociateConnectionFromLagInput) (req *request.Request, output *Connection) { + op := &request.Operation{ + Name: opDisassociateConnectionFromLag, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateConnectionFromLagInput{} + } + + output = &Connection{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateConnectionFromLag API operation for AWS Direct Connect. +// +// Disassociates a connection from a link aggregation group (LAG). The connection +// is interrupted and re-established as a standalone connection (the connection +// is not deleted; to delete the connection, use the DeleteConnection request). +// If the LAG has associated virtual interfaces or hosted connections, they +// remain associated with the LAG. A disassociated connection owned by an AWS +// Direct Connect partner is automatically converted to an interconnect. +// +// If disassociating the connection will cause the LAG to fall below its setting +// for minimum number of operational connections, the request fails, except +// when it's the last member of the LAG. If all connections are disassociated, +// the LAG continues to exist as an empty LAG with no physical connections. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation DisassociateConnectionFromLag for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DisassociateConnectionFromLag +func (c *DirectConnect) DisassociateConnectionFromLag(input *DisassociateConnectionFromLagInput) (*Connection, error) { + req, out := c.DisassociateConnectionFromLagRequest(input) + return out, req.Send() +} + +// DisassociateConnectionFromLagWithContext is the same as DisassociateConnectionFromLag with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateConnectionFromLag for details on how to use this API operation. +// +// 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 *DirectConnect) DisassociateConnectionFromLagWithContext(ctx aws.Context, input *DisassociateConnectionFromLagInput, opts ...request.Option) (*Connection, error) { + req, out := c.DisassociateConnectionFromLagRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/TagResource +func (c *DirectConnect) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// TagResource API operation for AWS Direct Connect. +// +// Adds the specified tags to the specified Direct Connect resource. Each Direct +// Connect resource can have a maximum of 50 tags. +// +// Each tag consists of a key and an optional value. If a tag with the same +// key is already associated with the Direct Connect resource, this action updates +// its value. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDuplicateTagKeysException "DuplicateTagKeysException" +// A tag key was specified more than once. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// You have reached the limit on the number of tags that can be assigned to +// a Direct Connect resource. +// +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/TagResource +func (c *DirectConnect) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// 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 *DirectConnect) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UntagResource +func (c *DirectConnect) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UntagResource API operation for AWS Direct Connect. +// +// Removes one or more tags from the specified Direct Connect resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UntagResource +func (c *DirectConnect) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// 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 *DirectConnect) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateLag = "UpdateLag" + +// UpdateLagRequest generates a "aws/request.Request" representing the +// client's request for the UpdateLag operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateLag for more information on using the UpdateLag +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateLagRequest method. +// req, resp := client.UpdateLagRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateLag +func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Request, output *Lag) { + op := &request.Operation{ + Name: opUpdateLag, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateLagInput{} + } + + output = &Lag{} + req = c.newRequest(op, input, output) + return +} + +// UpdateLag API operation for AWS Direct Connect. +// +// Updates the attributes of a link aggregation group (LAG). +// +// You can update the following attributes: +// +// * The name of the LAG. +// +// * The value for the minimum number of connections that must be operational +// for the LAG itself to be operational. +// +// When you create a LAG, the default value for the minimum number of operational +// connections is zero (0). If you update this value, and the number of operational +// connections falls below the specified value, the LAG will automatically go +// down to avoid overutilization of the remaining connections. Adjusting this +// value should be done with care as it could force the LAG down if the value +// is set higher than the current number of operational connections. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation UpdateLag for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// A server-side error occurred during the API call. The error message will +// contain additional details about the cause. +// +// * ErrCodeClientException "ClientException" +// The API was called with invalid parameters. The error message will contain +// additional details about the cause. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateLag +func (c *DirectConnect) UpdateLag(input *UpdateLagInput) (*Lag, error) { + req, out := c.UpdateLagRequest(input) + return out, req.Send() +} + +// UpdateLagWithContext is the same as UpdateLag with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateLag for details on how to use this API operation. +// +// 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 *DirectConnect) UpdateLagWithContext(ctx aws.Context, input *UpdateLagInput, opts ...request.Option) (*Lag, error) { + req, out := c.UpdateLagRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Container for the parameters to the AllocateConnectionOnInterconnect operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnectRequest +type AllocateConnectionOnInterconnectInput struct { + _ struct{} `type:"structure"` + + // Bandwidth of the connection. + // + // Example: "500Mbps" + // + // Default: None + // + // Values: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps + // + // Bandwidth is a required field + Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` + + // Name of the provisioned connection. + // + // Example: "500M Connection to AWS" + // + // Default: None + // + // ConnectionName is a required field + ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` + + // ID of the interconnect on which the connection will be provisioned. + // + // Example: dxcon-456abc78 + // + // Default: None + // + // InterconnectId is a required field + InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` + + // Numeric account Id of the customer for whom the connection will be provisioned. + // + // Example: 123443215678 + // + // Default: None + // + // OwnerAccount is a required field + OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` + + // The dedicated VLAN provisioned to the connection. + // + // Example: 101 + // + // Default: None + // + // Vlan is a required field + Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` +} + +// String returns the string representation +func (s AllocateConnectionOnInterconnectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocateConnectionOnInterconnectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllocateConnectionOnInterconnectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllocateConnectionOnInterconnectInput"} + if s.Bandwidth == nil { + invalidParams.Add(request.NewErrParamRequired("Bandwidth")) + } + if s.ConnectionName == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionName")) + } + if s.InterconnectId == nil { + invalidParams.Add(request.NewErrParamRequired("InterconnectId")) + } + if s.OwnerAccount == nil { + invalidParams.Add(request.NewErrParamRequired("OwnerAccount")) + } + if s.Vlan == nil { + invalidParams.Add(request.NewErrParamRequired("Vlan")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *AllocateConnectionOnInterconnectInput) SetBandwidth(v string) *AllocateConnectionOnInterconnectInput { + s.Bandwidth = &v + return s +} + +// SetConnectionName sets the ConnectionName field's value. +func (s *AllocateConnectionOnInterconnectInput) SetConnectionName(v string) *AllocateConnectionOnInterconnectInput { + s.ConnectionName = &v + return s +} + +// SetInterconnectId sets the InterconnectId field's value. +func (s *AllocateConnectionOnInterconnectInput) SetInterconnectId(v string) *AllocateConnectionOnInterconnectInput { + s.InterconnectId = &v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *AllocateConnectionOnInterconnectInput) SetOwnerAccount(v string) *AllocateConnectionOnInterconnectInput { + s.OwnerAccount = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *AllocateConnectionOnInterconnectInput) SetVlan(v int64) *AllocateConnectionOnInterconnectInput { + s.Vlan = &v + return s +} + +// Container for the parameters to theHostedConnection operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateHostedConnectionRequest +type AllocateHostedConnectionInput struct { + _ struct{} `type:"structure"` + + // The bandwidth of the connection. + // + // Example: 500Mbps + // + // Default: None + // + // Values: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps + // + // Bandwidth is a required field + Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` + + // The ID of the interconnect or LAG on which the connection will be provisioned. + // + // Example: dxcon-456abc78 or dxlag-abc123 + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // The name of the provisioned connection. + // + // Example: "500M Connection to AWS" + // + // Default: None + // + // ConnectionName is a required field + ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` + + // The numeric account ID of the customer for whom the connection will be provisioned. + // + // Example: 123443215678 + // + // Default: None + // + // OwnerAccount is a required field + OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` + + // The dedicated VLAN provisioned to the hosted connection. + // + // Example: 101 + // + // Default: None + // + // Vlan is a required field + Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` +} + +// String returns the string representation +func (s AllocateHostedConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocateHostedConnectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllocateHostedConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllocateHostedConnectionInput"} + if s.Bandwidth == nil { + invalidParams.Add(request.NewErrParamRequired("Bandwidth")) + } + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.ConnectionName == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionName")) + } + if s.OwnerAccount == nil { + invalidParams.Add(request.NewErrParamRequired("OwnerAccount")) + } + if s.Vlan == nil { + invalidParams.Add(request.NewErrParamRequired("Vlan")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *AllocateHostedConnectionInput) SetBandwidth(v string) *AllocateHostedConnectionInput { + s.Bandwidth = &v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *AllocateHostedConnectionInput) SetConnectionId(v string) *AllocateHostedConnectionInput { + s.ConnectionId = &v + return s +} + +// SetConnectionName sets the ConnectionName field's value. +func (s *AllocateHostedConnectionInput) SetConnectionName(v string) *AllocateHostedConnectionInput { + s.ConnectionName = &v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *AllocateHostedConnectionInput) SetOwnerAccount(v string) *AllocateHostedConnectionInput { + s.OwnerAccount = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *AllocateHostedConnectionInput) SetVlan(v int64) *AllocateHostedConnectionInput { + s.Vlan = &v + return s +} + +// Container for the parameters to the AllocatePrivateVirtualInterface operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePrivateVirtualInterfaceRequest +type AllocatePrivateVirtualInterfaceInput struct { + _ struct{} `type:"structure"` + + // The connection ID on which the private virtual interface is provisioned. + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // Detailed information for the private virtual interface to be provisioned. + // + // Default: None + // + // NewPrivateVirtualInterfaceAllocation is a required field + NewPrivateVirtualInterfaceAllocation *NewPrivateVirtualInterfaceAllocation `locationName:"newPrivateVirtualInterfaceAllocation" type:"structure" required:"true"` + + // The AWS account that will own the new private virtual interface. + // + // Default: None + // + // OwnerAccount is a required field + OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` +} + +// String returns the string representation +func (s AllocatePrivateVirtualInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocatePrivateVirtualInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllocatePrivateVirtualInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllocatePrivateVirtualInterfaceInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.NewPrivateVirtualInterfaceAllocation == nil { + invalidParams.Add(request.NewErrParamRequired("NewPrivateVirtualInterfaceAllocation")) + } + if s.OwnerAccount == nil { + invalidParams.Add(request.NewErrParamRequired("OwnerAccount")) + } + if s.NewPrivateVirtualInterfaceAllocation != nil { + if err := s.NewPrivateVirtualInterfaceAllocation.Validate(); err != nil { + invalidParams.AddNested("NewPrivateVirtualInterfaceAllocation", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *AllocatePrivateVirtualInterfaceInput) SetConnectionId(v string) *AllocatePrivateVirtualInterfaceInput { + s.ConnectionId = &v + return s +} + +// SetNewPrivateVirtualInterfaceAllocation sets the NewPrivateVirtualInterfaceAllocation field's value. +func (s *AllocatePrivateVirtualInterfaceInput) SetNewPrivateVirtualInterfaceAllocation(v *NewPrivateVirtualInterfaceAllocation) *AllocatePrivateVirtualInterfaceInput { + s.NewPrivateVirtualInterfaceAllocation = v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *AllocatePrivateVirtualInterfaceInput) SetOwnerAccount(v string) *AllocatePrivateVirtualInterfaceInput { + s.OwnerAccount = &v + return s +} + +// Container for the parameters to the AllocatePublicVirtualInterface operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePublicVirtualInterfaceRequest +type AllocatePublicVirtualInterfaceInput struct { + _ struct{} `type:"structure"` + + // The connection ID on which the public virtual interface is provisioned. + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // Detailed information for the public virtual interface to be provisioned. + // + // Default: None + // + // NewPublicVirtualInterfaceAllocation is a required field + NewPublicVirtualInterfaceAllocation *NewPublicVirtualInterfaceAllocation `locationName:"newPublicVirtualInterfaceAllocation" type:"structure" required:"true"` + + // The AWS account that will own the new public virtual interface. + // + // Default: None + // + // OwnerAccount is a required field + OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` +} + +// String returns the string representation +func (s AllocatePublicVirtualInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocatePublicVirtualInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllocatePublicVirtualInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllocatePublicVirtualInterfaceInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.NewPublicVirtualInterfaceAllocation == nil { + invalidParams.Add(request.NewErrParamRequired("NewPublicVirtualInterfaceAllocation")) + } + if s.OwnerAccount == nil { + invalidParams.Add(request.NewErrParamRequired("OwnerAccount")) + } + if s.NewPublicVirtualInterfaceAllocation != nil { + if err := s.NewPublicVirtualInterfaceAllocation.Validate(); err != nil { + invalidParams.AddNested("NewPublicVirtualInterfaceAllocation", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *AllocatePublicVirtualInterfaceInput) SetConnectionId(v string) *AllocatePublicVirtualInterfaceInput { + s.ConnectionId = &v + return s +} + +// SetNewPublicVirtualInterfaceAllocation sets the NewPublicVirtualInterfaceAllocation field's value. +func (s *AllocatePublicVirtualInterfaceInput) SetNewPublicVirtualInterfaceAllocation(v *NewPublicVirtualInterfaceAllocation) *AllocatePublicVirtualInterfaceInput { + s.NewPublicVirtualInterfaceAllocation = v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *AllocatePublicVirtualInterfaceInput) SetOwnerAccount(v string) *AllocatePublicVirtualInterfaceInput { + s.OwnerAccount = &v + return s +} + +// Container for the parameters to the AssociateConnectionWithLag operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateConnectionWithLagRequest +type AssociateConnectionWithLagInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection. + // + // Example: dxcon-abc123 + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // The ID of the LAG with which to associate the connection. + // + // Example: dxlag-abc123 + // + // Default: None + // + // LagId is a required field + LagId *string `locationName:"lagId" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateConnectionWithLagInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateConnectionWithLagInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateConnectionWithLagInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateConnectionWithLagInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.LagId == nil { + invalidParams.Add(request.NewErrParamRequired("LagId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *AssociateConnectionWithLagInput) SetConnectionId(v string) *AssociateConnectionWithLagInput { + s.ConnectionId = &v + return s +} + +// SetLagId sets the LagId field's value. +func (s *AssociateConnectionWithLagInput) SetLagId(v string) *AssociateConnectionWithLagInput { + s.LagId = &v + return s +} + +// Container for the parameters to the AssociateHostedConnection operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateHostedConnectionRequest +type AssociateHostedConnectionInput struct { + _ struct{} `type:"structure"` + + // The ID of the hosted connection. + // + // Example: dxcon-abc123 + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // The ID of the interconnect or the LAG. + // + // Example: dxcon-abc123 or dxlag-abc123 + // + // Default: None + // + // ParentConnectionId is a required field + ParentConnectionId *string `locationName:"parentConnectionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateHostedConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateHostedConnectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateHostedConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateHostedConnectionInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.ParentConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ParentConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *AssociateHostedConnectionInput) SetConnectionId(v string) *AssociateHostedConnectionInput { + s.ConnectionId = &v + return s +} + +// SetParentConnectionId sets the ParentConnectionId field's value. +func (s *AssociateHostedConnectionInput) SetParentConnectionId(v string) *AssociateHostedConnectionInput { + s.ParentConnectionId = &v + return s +} + +// Container for the parameters to the AssociateVirtualInterface operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateVirtualInterfaceRequest +type AssociateVirtualInterfaceInput struct { + _ struct{} `type:"structure"` + + // The ID of the LAG or connection with which to associate the virtual interface. + // + // Example: dxlag-abc123 or dxcon-abc123 + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // The ID of the virtual interface. + // + // Example: dxvif-123dfg56 + // + // Default: None + // + // VirtualInterfaceId is a required field + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateVirtualInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateVirtualInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateVirtualInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateVirtualInterfaceInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.VirtualInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *AssociateVirtualInterfaceInput) SetConnectionId(v string) *AssociateVirtualInterfaceInput { + s.ConnectionId = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *AssociateVirtualInterfaceInput) SetVirtualInterfaceId(v string) *AssociateVirtualInterfaceInput { + s.VirtualInterfaceId = &v + return s +} + +// A structure containing information about a BGP peer. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/BGPPeer +type BGPPeer struct { + _ struct{} `type:"structure"` + + // Indicates the address family for the BGP peer. + // + // * ipv4: IPv4 address family + // + // * ipv6: IPv6 address family + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // IP address assigned to the Amazon interface. + // + // Example: 192.168.1.1/30 or 2001:db8::1/125 + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + // + // Example: 65000 + Asn *int64 `locationName:"asn" type:"integer"` + + // The authentication key for BGP configuration. + // + // Example: asdf34example + AuthKey *string `locationName:"authKey" type:"string"` + + // The state of the BGP peer. + // + // * Verifying: The BGP peering addresses or ASN require validation before + // the BGP peer can be created. This state only applies to BGP peers on a + // public virtual interface. + // + // * Pending: The BGP peer has been created, and is in this state until it + // is ready to be established. + // + // * Available: The BGP peer can be established. + // + // * Deleting: The BGP peer is in the process of being deleted. + // + // * Deleted: The BGP peer has been deleted and cannot be established. + BgpPeerState *string `locationName:"bgpPeerState" type:"string" enum:"BGPPeerState"` + + // The Up/Down state of the BGP peer. + // + // * Up: The BGP peer is established. + // + // * Down: The BGP peer is down. + BgpStatus *string `locationName:"bgpStatus" type:"string" enum:"BGPStatus"` + + // IP address assigned to the customer interface. + // + // Example: 192.168.1.2/30 or 2001:db8::2/125 + CustomerAddress *string `locationName:"customerAddress" type:"string"` +} + +// String returns the string representation +func (s BGPPeer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BGPPeer) GoString() string { + return s.String() +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *BGPPeer) SetAddressFamily(v string) *BGPPeer { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *BGPPeer) SetAmazonAddress(v string) *BGPPeer { + s.AmazonAddress = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *BGPPeer) SetAsn(v int64) *BGPPeer { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *BGPPeer) SetAuthKey(v string) *BGPPeer { + s.AuthKey = &v + return s +} + +// SetBgpPeerState sets the BgpPeerState field's value. +func (s *BGPPeer) SetBgpPeerState(v string) *BGPPeer { + s.BgpPeerState = &v + return s +} + +// SetBgpStatus sets the BgpStatus field's value. +func (s *BGPPeer) SetBgpStatus(v string) *BGPPeer { + s.BgpStatus = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *BGPPeer) SetCustomerAddress(v string) *BGPPeer { + s.CustomerAddress = &v + return s +} + +// Container for the parameters to the ConfirmConnection operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmConnectionRequest +type ConfirmConnectionInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s ConfirmConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfirmConnectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfirmConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfirmConnectionInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *ConfirmConnectionInput) SetConnectionId(v string) *ConfirmConnectionInput { + s.ConnectionId = &v + return s +} + +// The response received when ConfirmConnection is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmConnectionResponse +type ConfirmConnectionOutput struct { + _ struct{} `type:"structure"` + + // State of the connection. + // + // * Ordering: The initial state of a hosted connection provisioned on an + // interconnect. The connection stays in the ordering state until the owner + // of the hosted connection confirms or declines the connection order. + // + // * Requested: The initial state of a standard connection. The connection + // stays in the requested state until the Letter of Authorization (LOA) is + // sent to the customer. + // + // * Pending: The connection has been approved, and is being initialized. + // + // * Available: The network link is up, and the connection is ready for use. + // + // * Down: The network link is down. + // + // * Deleting: The connection is in the process of being deleted. + // + // * Deleted: The connection has been deleted. + // + // * Rejected: A hosted connection in the 'Ordering' state will enter the + // 'Rejected' state if it is deleted by the end customer. + ConnectionState *string `locationName:"connectionState" type:"string" enum:"ConnectionState"` +} + +// String returns the string representation +func (s ConfirmConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfirmConnectionOutput) GoString() string { + return s.String() +} + +// SetConnectionState sets the ConnectionState field's value. +func (s *ConfirmConnectionOutput) SetConnectionState(v string) *ConfirmConnectionOutput { + s.ConnectionState = &v + return s +} + +// Container for the parameters to the ConfirmPrivateVirtualInterface operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPrivateVirtualInterfaceRequest +type ConfirmPrivateVirtualInterfaceInput struct { + _ struct{} `type:"structure"` + + // ID of the direct connect gateway that will be attached to the virtual interface. + // + // A direct connect gateway can be managed via the AWS Direct Connect console + // or the CreateDirectConnectGateway action. + // + // Default: None + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // ID of the virtual private gateway that will be attached to the virtual interface. + // + // A virtual private gateway can be managed via the Amazon Virtual Private Cloud + // (VPC) console or the EC2 CreateVpnGateway (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html) + // action. + // + // Default: None + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` + + // The ID of the virtual interface. + // + // Example: dxvif-123dfg56 + // + // Default: None + // + // VirtualInterfaceId is a required field + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` +} + +// String returns the string representation +func (s ConfirmPrivateVirtualInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfirmPrivateVirtualInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfirmPrivateVirtualInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfirmPrivateVirtualInterfaceInput"} + if s.VirtualInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *ConfirmPrivateVirtualInterfaceInput) SetDirectConnectGatewayId(v string) *ConfirmPrivateVirtualInterfaceInput { + s.DirectConnectGatewayId = &v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *ConfirmPrivateVirtualInterfaceInput) SetVirtualGatewayId(v string) *ConfirmPrivateVirtualInterfaceInput { + s.VirtualGatewayId = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *ConfirmPrivateVirtualInterfaceInput) SetVirtualInterfaceId(v string) *ConfirmPrivateVirtualInterfaceInput { + s.VirtualInterfaceId = &v + return s +} + +// The response received when ConfirmPrivateVirtualInterface is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPrivateVirtualInterfaceResponse +type ConfirmPrivateVirtualInterfaceOutput struct { + _ struct{} `type:"structure"` + + // State of the virtual interface. + // + // * Confirming: The creation of the virtual interface is pending confirmation + // from the virtual interface owner. If the owner of the virtual interface + // is different from the owner of the connection on which it is provisioned, + // then the virtual interface will remain in this state until it is confirmed + // by the virtual interface owner. + // + // * Verifying: This state only applies to public virtual interfaces. Each + // public virtual interface needs validation before the virtual interface + // can be created. + // + // * Pending: A virtual interface is in this state from the time that it + // is created until the virtual interface is ready to forward traffic. + // + // * Available: A virtual interface that is able to forward traffic. + // + // * Down: A virtual interface that is BGP down. + // + // * Deleting: A virtual interface is in this state immediately after calling + // DeleteVirtualInterface until it can no longer forward traffic. + // + // * Deleted: A virtual interface that cannot forward traffic. + // + // * Rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the 'Confirming' state is deleted + // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // state. + VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` +} + +// String returns the string representation +func (s ConfirmPrivateVirtualInterfaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfirmPrivateVirtualInterfaceOutput) GoString() string { + return s.String() +} + +// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. +func (s *ConfirmPrivateVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *ConfirmPrivateVirtualInterfaceOutput { + s.VirtualInterfaceState = &v + return s +} + +// Container for the parameters to the ConfirmPublicVirtualInterface operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPublicVirtualInterfaceRequest +type ConfirmPublicVirtualInterfaceInput struct { + _ struct{} `type:"structure"` + + // The ID of the virtual interface. + // + // Example: dxvif-123dfg56 + // + // Default: None + // + // VirtualInterfaceId is a required field + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` +} + +// String returns the string representation +func (s ConfirmPublicVirtualInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfirmPublicVirtualInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfirmPublicVirtualInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfirmPublicVirtualInterfaceInput"} + if s.VirtualInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *ConfirmPublicVirtualInterfaceInput) SetVirtualInterfaceId(v string) *ConfirmPublicVirtualInterfaceInput { + s.VirtualInterfaceId = &v + return s +} + +// The response received when ConfirmPublicVirtualInterface is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPublicVirtualInterfaceResponse +type ConfirmPublicVirtualInterfaceOutput struct { + _ struct{} `type:"structure"` + + // State of the virtual interface. + // + // * Confirming: The creation of the virtual interface is pending confirmation + // from the virtual interface owner. If the owner of the virtual interface + // is different from the owner of the connection on which it is provisioned, + // then the virtual interface will remain in this state until it is confirmed + // by the virtual interface owner. + // + // * Verifying: This state only applies to public virtual interfaces. Each + // public virtual interface needs validation before the virtual interface + // can be created. + // + // * Pending: A virtual interface is in this state from the time that it + // is created until the virtual interface is ready to forward traffic. + // + // * Available: A virtual interface that is able to forward traffic. + // + // * Down: A virtual interface that is BGP down. + // + // * Deleting: A virtual interface is in this state immediately after calling + // DeleteVirtualInterface until it can no longer forward traffic. + // + // * Deleted: A virtual interface that cannot forward traffic. + // + // * Rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the 'Confirming' state is deleted + // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // state. + VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` +} + +// String returns the string representation +func (s ConfirmPublicVirtualInterfaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfirmPublicVirtualInterfaceOutput) GoString() string { + return s.String() +} + +// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. +func (s *ConfirmPublicVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *ConfirmPublicVirtualInterfaceOutput { + s.VirtualInterfaceState = &v + return s +} + +// A connection represents the physical network connection between the AWS Direct +// Connect location and the customer. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Connection +type Connection struct { + _ struct{} `type:"structure"` + + // The Direct Connection endpoint which the physical connection terminates on. + AwsDevice *string `locationName:"awsDevice" type:"string"` + + // Bandwidth of the connection. + // + // Example: 1Gbps (for regular connections), or 500Mbps (for hosted connections) + // + // Default: None + Bandwidth *string `locationName:"bandwidth" type:"string"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + ConnectionId *string `locationName:"connectionId" type:"string"` + + // The name of the connection. + // + // Example: "My Connection to AWS" + // + // Default: None + ConnectionName *string `locationName:"connectionName" type:"string"` + + // State of the connection. + // + // * Ordering: The initial state of a hosted connection provisioned on an + // interconnect. The connection stays in the ordering state until the owner + // of the hosted connection confirms or declines the connection order. + // + // * Requested: The initial state of a standard connection. The connection + // stays in the requested state until the Letter of Authorization (LOA) is + // sent to the customer. + // + // * Pending: The connection has been approved, and is being initialized. + // + // * Available: The network link is up, and the connection is ready for use. + // + // * Down: The network link is down. + // + // * Deleting: The connection is in the process of being deleted. + // + // * Deleted: The connection has been deleted. + // + // * Rejected: A hosted connection in the 'Ordering' state will enter the + // 'Rejected' state if it is deleted by the end customer. + ConnectionState *string `locationName:"connectionState" type:"string" enum:"ConnectionState"` + + // The ID of the LAG. + // + // Example: dxlag-fg5678gh + LagId *string `locationName:"lagId" type:"string"` + + // The time of the most recent call to DescribeLoa for this connection. + LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp" timestampFormat:"unix"` + + // Where the connection is located. + // + // Example: EqSV5 + // + // Default: None + Location *string `locationName:"location" type:"string"` + + // The AWS account that will own the new connection. + OwnerAccount *string `locationName:"ownerAccount" type:"string"` + + // The name of the AWS Direct Connect service provider associated with the connection. + PartnerName *string `locationName:"partnerName" type:"string"` + + // The AWS region where the connection is located. + // + // Example: us-east-1 + // + // Default: None + Region *string `locationName:"region" type:"string"` + + // The VLAN ID. + // + // Example: 101 + Vlan *int64 `locationName:"vlan" type:"integer"` +} + +// String returns the string representation +func (s Connection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Connection) GoString() string { + return s.String() +} + +// SetAwsDevice sets the AwsDevice field's value. +func (s *Connection) SetAwsDevice(v string) *Connection { + s.AwsDevice = &v + return s +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *Connection) SetBandwidth(v string) *Connection { + s.Bandwidth = &v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *Connection) SetConnectionId(v string) *Connection { + s.ConnectionId = &v + return s +} + +// SetConnectionName sets the ConnectionName field's value. +func (s *Connection) SetConnectionName(v string) *Connection { + s.ConnectionName = &v + return s +} + +// SetConnectionState sets the ConnectionState field's value. +func (s *Connection) SetConnectionState(v string) *Connection { + s.ConnectionState = &v + return s +} + +// SetLagId sets the LagId field's value. +func (s *Connection) SetLagId(v string) *Connection { + s.LagId = &v + return s +} + +// SetLoaIssueTime sets the LoaIssueTime field's value. +func (s *Connection) SetLoaIssueTime(v time.Time) *Connection { + s.LoaIssueTime = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *Connection) SetLocation(v string) *Connection { + s.Location = &v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *Connection) SetOwnerAccount(v string) *Connection { + s.OwnerAccount = &v + return s +} + +// SetPartnerName sets the PartnerName field's value. +func (s *Connection) SetPartnerName(v string) *Connection { + s.PartnerName = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *Connection) SetRegion(v string) *Connection { + s.Region = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *Connection) SetVlan(v int64) *Connection { + s.Vlan = &v + return s +} + +// A structure containing a list of connections. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Connections +type Connections struct { + _ struct{} `type:"structure"` + + // A list of connections. + Connections []*Connection `locationName:"connections" type:"list"` +} + +// String returns the string representation +func (s Connections) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Connections) GoString() string { + return s.String() +} + +// SetConnections sets the Connections field's value. +func (s *Connections) SetConnections(v []*Connection) *Connections { + s.Connections = v + return s +} + +// Container for the parameters to the CreateBGPPeer operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateBGPPeerRequest +type CreateBGPPeerInput struct { + _ struct{} `type:"structure"` + + // Detailed information for the BGP peer to be created. + // + // Default: None + NewBGPPeer *NewBGPPeer `locationName:"newBGPPeer" type:"structure"` + + // The ID of the virtual interface on which the BGP peer will be provisioned. + // + // Example: dxvif-456abc78 + // + // Default: None + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` +} + +// String returns the string representation +func (s CreateBGPPeerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBGPPeerInput) GoString() string { + return s.String() +} + +// SetNewBGPPeer sets the NewBGPPeer field's value. +func (s *CreateBGPPeerInput) SetNewBGPPeer(v *NewBGPPeer) *CreateBGPPeerInput { + s.NewBGPPeer = v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *CreateBGPPeerInput) SetVirtualInterfaceId(v string) *CreateBGPPeerInput { + s.VirtualInterfaceId = &v + return s +} + +// The response received when CreateBGPPeer is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateBGPPeerResponse +type CreateBGPPeerOutput struct { + _ struct{} `type:"structure"` + + // A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect + // location and the customer. + VirtualInterface *VirtualInterface `locationName:"virtualInterface" type:"structure"` +} + +// String returns the string representation +func (s CreateBGPPeerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBGPPeerOutput) GoString() string { + return s.String() +} + +// SetVirtualInterface sets the VirtualInterface field's value. +func (s *CreateBGPPeerOutput) SetVirtualInterface(v *VirtualInterface) *CreateBGPPeerOutput { + s.VirtualInterface = v + return s +} + +// Container for the parameters to the CreateConnection operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateConnectionRequest +type CreateConnectionInput struct { + _ struct{} `type:"structure"` + + // Bandwidth of the connection. + // + // Example: 1Gbps + // + // Default: None + // + // Bandwidth is a required field + Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` + + // The name of the connection. + // + // Example: "My Connection to AWS" + // + // Default: None + // + // ConnectionName is a required field + ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` + + // The ID of the LAG. + // + // Example: dxlag-fg5678gh + LagId *string `locationName:"lagId" type:"string"` + + // Where the connection is located. + // + // Example: EqSV5 + // + // Default: None + // + // Location is a required field + Location *string `locationName:"location" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConnectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateConnectionInput"} + if s.Bandwidth == nil { + invalidParams.Add(request.NewErrParamRequired("Bandwidth")) + } + if s.ConnectionName == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionName")) + } + if s.Location == nil { + invalidParams.Add(request.NewErrParamRequired("Location")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *CreateConnectionInput) SetBandwidth(v string) *CreateConnectionInput { + s.Bandwidth = &v + return s +} + +// SetConnectionName sets the ConnectionName field's value. +func (s *CreateConnectionInput) SetConnectionName(v string) *CreateConnectionInput { + s.ConnectionName = &v + return s +} + +// SetLagId sets the LagId field's value. +func (s *CreateConnectionInput) SetLagId(v string) *CreateConnectionInput { + s.LagId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateConnectionInput) SetLocation(v string) *CreateConnectionInput { + s.Location = &v + return s +} + +// Container for the parameters to the CreateDirectConnectGatewayAssociation +// operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayAssociationRequest +type CreateDirectConnectGatewayAssociationInput struct { + _ struct{} `type:"structure"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // + // Default: None + // + // DirectConnectGatewayId is a required field + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` + + // The ID of the virtual private gateway. + // + // Example: "vgw-abc123ef" + // + // Default: None + // + // VirtualGatewayId is a required field + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateDirectConnectGatewayAssociationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDirectConnectGatewayAssociationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDirectConnectGatewayAssociationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDirectConnectGatewayAssociationInput"} + if s.DirectConnectGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectConnectGatewayId")) + } + if s.VirtualGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *CreateDirectConnectGatewayAssociationInput) SetDirectConnectGatewayId(v string) *CreateDirectConnectGatewayAssociationInput { + s.DirectConnectGatewayId = &v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *CreateDirectConnectGatewayAssociationInput) SetVirtualGatewayId(v string) *CreateDirectConnectGatewayAssociationInput { + s.VirtualGatewayId = &v + return s +} + +// Container for the response from the CreateDirectConnectGatewayAssociation +// API call +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayAssociationResult +type CreateDirectConnectGatewayAssociationOutput struct { + _ struct{} `type:"structure"` + + // The direct connect gateway association to be created. + DirectConnectGatewayAssociation *GatewayAssociation `locationName:"directConnectGatewayAssociation" type:"structure"` +} + +// String returns the string representation +func (s CreateDirectConnectGatewayAssociationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDirectConnectGatewayAssociationOutput) GoString() string { + return s.String() +} + +// SetDirectConnectGatewayAssociation sets the DirectConnectGatewayAssociation field's value. +func (s *CreateDirectConnectGatewayAssociationOutput) SetDirectConnectGatewayAssociation(v *GatewayAssociation) *CreateDirectConnectGatewayAssociationOutput { + s.DirectConnectGatewayAssociation = v + return s +} + +// Container for the parameters to the CreateDirectConnectGateway operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayRequest +type CreateDirectConnectGatewayInput struct { + _ struct{} `type:"structure"` + + // The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be + // configured on the Amazon side of the connection. The ASN must be in the private + // range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294 + // + // Example: 65200 + // + // Default: 64512 + AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` + + // The name of the direct connect gateway. + // + // Example: "My direct connect gateway" + // + // Default: None + // + // DirectConnectGatewayName is a required field + DirectConnectGatewayName *string `locationName:"directConnectGatewayName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateDirectConnectGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDirectConnectGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDirectConnectGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDirectConnectGatewayInput"} + if s.DirectConnectGatewayName == nil { + invalidParams.Add(request.NewErrParamRequired("DirectConnectGatewayName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *CreateDirectConnectGatewayInput) SetAmazonSideAsn(v int64) *CreateDirectConnectGatewayInput { + s.AmazonSideAsn = &v + return s +} + +// SetDirectConnectGatewayName sets the DirectConnectGatewayName field's value. +func (s *CreateDirectConnectGatewayInput) SetDirectConnectGatewayName(v string) *CreateDirectConnectGatewayInput { + s.DirectConnectGatewayName = &v + return s +} + +// Container for the response from the CreateDirectConnectGateway API call +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayResult +type CreateDirectConnectGatewayOutput struct { + _ struct{} `type:"structure"` + + // The direct connect gateway to be created. + DirectConnectGateway *Gateway `locationName:"directConnectGateway" type:"structure"` +} + +// String returns the string representation +func (s CreateDirectConnectGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDirectConnectGatewayOutput) GoString() string { + return s.String() +} + +// SetDirectConnectGateway sets the DirectConnectGateway field's value. +func (s *CreateDirectConnectGatewayOutput) SetDirectConnectGateway(v *Gateway) *CreateDirectConnectGatewayOutput { + s.DirectConnectGateway = v + return s +} + +// Container for the parameters to the CreateInterconnect operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateInterconnectRequest +type CreateInterconnectInput struct { + _ struct{} `type:"structure"` + + // The port bandwidth + // + // Example: 1Gbps + // + // Default: None + // + // Available values: 1Gbps,10Gbps + // + // Bandwidth is a required field + Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` + + // The name of the interconnect. + // + // Example: "1G Interconnect to AWS" + // + // Default: None + // + // InterconnectName is a required field + InterconnectName *string `locationName:"interconnectName" type:"string" required:"true"` + + // The ID of the LAG. + // + // Example: dxlag-fg5678gh + LagId *string `locationName:"lagId" type:"string"` + + // Where the interconnect is located + // + // Example: EqSV5 + // + // Default: None + // + // Location is a required field + Location *string `locationName:"location" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateInterconnectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInterconnectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInterconnectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInterconnectInput"} + if s.Bandwidth == nil { + invalidParams.Add(request.NewErrParamRequired("Bandwidth")) + } + if s.InterconnectName == nil { + invalidParams.Add(request.NewErrParamRequired("InterconnectName")) + } + if s.Location == nil { + invalidParams.Add(request.NewErrParamRequired("Location")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *CreateInterconnectInput) SetBandwidth(v string) *CreateInterconnectInput { + s.Bandwidth = &v + return s +} + +// SetInterconnectName sets the InterconnectName field's value. +func (s *CreateInterconnectInput) SetInterconnectName(v string) *CreateInterconnectInput { + s.InterconnectName = &v + return s +} + +// SetLagId sets the LagId field's value. +func (s *CreateInterconnectInput) SetLagId(v string) *CreateInterconnectInput { + s.LagId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateInterconnectInput) SetLocation(v string) *CreateInterconnectInput { + s.Location = &v + return s +} + +// Container for the parameters to the CreateLag operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateLagRequest +type CreateLagInput struct { + _ struct{} `type:"structure"` + + // The ID of an existing connection to migrate to the LAG. + // + // Default: None + ConnectionId *string `locationName:"connectionId" type:"string"` + + // The bandwidth of the individual physical connections bundled by the LAG. + // + // Default: None + // + // Available values: 1Gbps, 10Gbps + // + // ConnectionsBandwidth is a required field + ConnectionsBandwidth *string `locationName:"connectionsBandwidth" type:"string" required:"true"` + + // The name of the LAG. + // + // Example: "3x10G LAG to AWS" + // + // Default: None + // + // LagName is a required field + LagName *string `locationName:"lagName" type:"string" required:"true"` + + // The AWS Direct Connect location in which the LAG should be allocated. + // + // Example: EqSV5 + // + // Default: None + // + // Location is a required field + Location *string `locationName:"location" type:"string" required:"true"` + + // The number of physical connections initially provisioned and bundled by the + // LAG. + // + // Default: None + // + // NumberOfConnections is a required field + NumberOfConnections *int64 `locationName:"numberOfConnections" type:"integer" required:"true"` +} + +// String returns the string representation +func (s CreateLagInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLagInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLagInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLagInput"} + if s.ConnectionsBandwidth == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionsBandwidth")) + } + if s.LagName == nil { + invalidParams.Add(request.NewErrParamRequired("LagName")) + } + if s.Location == nil { + invalidParams.Add(request.NewErrParamRequired("Location")) + } + if s.NumberOfConnections == nil { + invalidParams.Add(request.NewErrParamRequired("NumberOfConnections")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *CreateLagInput) SetConnectionId(v string) *CreateLagInput { + s.ConnectionId = &v + return s +} + +// SetConnectionsBandwidth sets the ConnectionsBandwidth field's value. +func (s *CreateLagInput) SetConnectionsBandwidth(v string) *CreateLagInput { + s.ConnectionsBandwidth = &v + return s +} + +// SetLagName sets the LagName field's value. +func (s *CreateLagInput) SetLagName(v string) *CreateLagInput { + s.LagName = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateLagInput) SetLocation(v string) *CreateLagInput { + s.Location = &v + return s +} + +// SetNumberOfConnections sets the NumberOfConnections field's value. +func (s *CreateLagInput) SetNumberOfConnections(v int64) *CreateLagInput { + s.NumberOfConnections = &v + return s +} + +// Container for the parameters to the CreatePrivateVirtualInterface operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePrivateVirtualInterfaceRequest +type CreatePrivateVirtualInterfaceInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // Detailed information for the private virtual interface to be created. + // + // Default: None + // + // NewPrivateVirtualInterface is a required field + NewPrivateVirtualInterface *NewPrivateVirtualInterface `locationName:"newPrivateVirtualInterface" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreatePrivateVirtualInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePrivateVirtualInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePrivateVirtualInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePrivateVirtualInterfaceInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.NewPrivateVirtualInterface == nil { + invalidParams.Add(request.NewErrParamRequired("NewPrivateVirtualInterface")) + } + if s.NewPrivateVirtualInterface != nil { + if err := s.NewPrivateVirtualInterface.Validate(); err != nil { + invalidParams.AddNested("NewPrivateVirtualInterface", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *CreatePrivateVirtualInterfaceInput) SetConnectionId(v string) *CreatePrivateVirtualInterfaceInput { + s.ConnectionId = &v + return s +} + +// SetNewPrivateVirtualInterface sets the NewPrivateVirtualInterface field's value. +func (s *CreatePrivateVirtualInterfaceInput) SetNewPrivateVirtualInterface(v *NewPrivateVirtualInterface) *CreatePrivateVirtualInterfaceInput { + s.NewPrivateVirtualInterface = v + return s +} + +// Container for the parameters to the CreatePublicVirtualInterface operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePublicVirtualInterfaceRequest +type CreatePublicVirtualInterfaceInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // Detailed information for the public virtual interface to be created. + // + // Default: None + // + // NewPublicVirtualInterface is a required field + NewPublicVirtualInterface *NewPublicVirtualInterface `locationName:"newPublicVirtualInterface" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreatePublicVirtualInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePublicVirtualInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePublicVirtualInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePublicVirtualInterfaceInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.NewPublicVirtualInterface == nil { + invalidParams.Add(request.NewErrParamRequired("NewPublicVirtualInterface")) + } + if s.NewPublicVirtualInterface != nil { + if err := s.NewPublicVirtualInterface.Validate(); err != nil { + invalidParams.AddNested("NewPublicVirtualInterface", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *CreatePublicVirtualInterfaceInput) SetConnectionId(v string) *CreatePublicVirtualInterfaceInput { + s.ConnectionId = &v + return s +} + +// SetNewPublicVirtualInterface sets the NewPublicVirtualInterface field's value. +func (s *CreatePublicVirtualInterfaceInput) SetNewPublicVirtualInterface(v *NewPublicVirtualInterface) *CreatePublicVirtualInterfaceInput { + s.NewPublicVirtualInterface = v + return s +} + +// Container for the parameters to the DeleteBGPPeer operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteBGPPeerRequest +type DeleteBGPPeerInput struct { + _ struct{} `type:"structure"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + // + // Example: 65000 + Asn *int64 `locationName:"asn" type:"integer"` + + // IP address assigned to the customer interface. + // + // Example: 192.168.1.2/30 or 2001:db8::2/125 + CustomerAddress *string `locationName:"customerAddress" type:"string"` + + // The ID of the virtual interface from which the BGP peer will be deleted. + // + // Example: dxvif-456abc78 + // + // Default: None + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` +} + +// String returns the string representation +func (s DeleteBGPPeerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBGPPeerInput) GoString() string { + return s.String() +} + +// SetAsn sets the Asn field's value. +func (s *DeleteBGPPeerInput) SetAsn(v int64) *DeleteBGPPeerInput { + s.Asn = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *DeleteBGPPeerInput) SetCustomerAddress(v string) *DeleteBGPPeerInput { + s.CustomerAddress = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *DeleteBGPPeerInput) SetVirtualInterfaceId(v string) *DeleteBGPPeerInput { + s.VirtualInterfaceId = &v + return s +} + +// The response received when DeleteBGPPeer is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteBGPPeerResponse +type DeleteBGPPeerOutput struct { + _ struct{} `type:"structure"` + + // A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect + // location and the customer. + VirtualInterface *VirtualInterface `locationName:"virtualInterface" type:"structure"` +} + +// String returns the string representation +func (s DeleteBGPPeerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBGPPeerOutput) GoString() string { + return s.String() +} + +// SetVirtualInterface sets the VirtualInterface field's value. +func (s *DeleteBGPPeerOutput) SetVirtualInterface(v *VirtualInterface) *DeleteBGPPeerOutput { + s.VirtualInterface = v + return s +} + +// Container for the parameters to the DeleteConnection operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteConnectionRequest +type DeleteConnectionInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConnectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteConnectionInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *DeleteConnectionInput) SetConnectionId(v string) *DeleteConnectionInput { + s.ConnectionId = &v + return s +} + +// Container for the parameters to the DeleteDirectConnectGatewayAssociation +// operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayAssociationRequest +type DeleteDirectConnectGatewayAssociationInput struct { + _ struct{} `type:"structure"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // + // Default: None + // + // DirectConnectGatewayId is a required field + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` + + // The ID of the virtual private gateway. + // + // Example: "vgw-abc123ef" + // + // Default: None + // + // VirtualGatewayId is a required field + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDirectConnectGatewayAssociationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDirectConnectGatewayAssociationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDirectConnectGatewayAssociationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDirectConnectGatewayAssociationInput"} + if s.DirectConnectGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectConnectGatewayId")) + } + if s.VirtualGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *DeleteDirectConnectGatewayAssociationInput) SetDirectConnectGatewayId(v string) *DeleteDirectConnectGatewayAssociationInput { + s.DirectConnectGatewayId = &v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *DeleteDirectConnectGatewayAssociationInput) SetVirtualGatewayId(v string) *DeleteDirectConnectGatewayAssociationInput { + s.VirtualGatewayId = &v + return s +} + +// Container for the response from the DeleteDirectConnectGatewayAssociation +// API call +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayAssociationResult +type DeleteDirectConnectGatewayAssociationOutput struct { + _ struct{} `type:"structure"` + + // The direct connect gateway association to be deleted. + DirectConnectGatewayAssociation *GatewayAssociation `locationName:"directConnectGatewayAssociation" type:"structure"` +} + +// String returns the string representation +func (s DeleteDirectConnectGatewayAssociationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDirectConnectGatewayAssociationOutput) GoString() string { + return s.String() +} + +// SetDirectConnectGatewayAssociation sets the DirectConnectGatewayAssociation field's value. +func (s *DeleteDirectConnectGatewayAssociationOutput) SetDirectConnectGatewayAssociation(v *GatewayAssociation) *DeleteDirectConnectGatewayAssociationOutput { + s.DirectConnectGatewayAssociation = v + return s +} + +// Container for the parameters to the DeleteDirectConnectGateway operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayRequest +type DeleteDirectConnectGatewayInput struct { + _ struct{} `type:"structure"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // + // Default: None + // + // DirectConnectGatewayId is a required field + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDirectConnectGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDirectConnectGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDirectConnectGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDirectConnectGatewayInput"} + if s.DirectConnectGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectConnectGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *DeleteDirectConnectGatewayInput) SetDirectConnectGatewayId(v string) *DeleteDirectConnectGatewayInput { + s.DirectConnectGatewayId = &v + return s +} + +// Container for the response from the DeleteDirectConnectGateway API call +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayResult +type DeleteDirectConnectGatewayOutput struct { + _ struct{} `type:"structure"` + + // The direct connect gateway to be deleted. + DirectConnectGateway *Gateway `locationName:"directConnectGateway" type:"structure"` +} + +// String returns the string representation +func (s DeleteDirectConnectGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDirectConnectGatewayOutput) GoString() string { + return s.String() +} + +// SetDirectConnectGateway sets the DirectConnectGateway field's value. +func (s *DeleteDirectConnectGatewayOutput) SetDirectConnectGateway(v *Gateway) *DeleteDirectConnectGatewayOutput { + s.DirectConnectGateway = v + return s +} + +// Container for the parameters to the DeleteInterconnect operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteInterconnectRequest +type DeleteInterconnectInput struct { + _ struct{} `type:"structure"` + + // The ID of the interconnect. + // + // Example: dxcon-abc123 + // + // InterconnectId is a required field + InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInterconnectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInterconnectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInterconnectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInterconnectInput"} + if s.InterconnectId == nil { + invalidParams.Add(request.NewErrParamRequired("InterconnectId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInterconnectId sets the InterconnectId field's value. +func (s *DeleteInterconnectInput) SetInterconnectId(v string) *DeleteInterconnectInput { + s.InterconnectId = &v + return s +} + +// The response received when DeleteInterconnect is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteInterconnectResponse +type DeleteInterconnectOutput struct { + _ struct{} `type:"structure"` + + // State of the interconnect. + // + // * Requested: The initial state of an interconnect. The interconnect stays + // in the requested state until the Letter of Authorization (LOA) is sent + // to the customer. + // + // * Pending: The interconnect has been approved, and is being initialized. + // + // * Available: The network link is up, and the interconnect is ready for + // use. + // + // * Down: The network link is down. + // + // * Deleting: The interconnect is in the process of being deleted. + // + // * Deleted: The interconnect has been deleted. + InterconnectState *string `locationName:"interconnectState" type:"string" enum:"InterconnectState"` +} + +// String returns the string representation +func (s DeleteInterconnectOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInterconnectOutput) GoString() string { + return s.String() +} + +// SetInterconnectState sets the InterconnectState field's value. +func (s *DeleteInterconnectOutput) SetInterconnectState(v string) *DeleteInterconnectOutput { + s.InterconnectState = &v + return s +} + +// Container for the parameters to the DeleteLag operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteLagRequest +type DeleteLagInput struct { + _ struct{} `type:"structure"` + + // The ID of the LAG to delete. + // + // Example: dxlag-abc123 + // + // Default: None + // + // LagId is a required field + LagId *string `locationName:"lagId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLagInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLagInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLagInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLagInput"} + if s.LagId == nil { + invalidParams.Add(request.NewErrParamRequired("LagId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLagId sets the LagId field's value. +func (s *DeleteLagInput) SetLagId(v string) *DeleteLagInput { + s.LagId = &v + return s +} + +// Container for the parameters to the DeleteVirtualInterface operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteVirtualInterfaceRequest +type DeleteVirtualInterfaceInput struct { + _ struct{} `type:"structure"` + + // The ID of the virtual interface. + // + // Example: dxvif-123dfg56 + // + // Default: None + // + // VirtualInterfaceId is a required field + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVirtualInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVirtualInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVirtualInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualInterfaceInput"} + if s.VirtualInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *DeleteVirtualInterfaceInput) SetVirtualInterfaceId(v string) *DeleteVirtualInterfaceInput { + s.VirtualInterfaceId = &v + return s +} + +// The response received when DeleteVirtualInterface is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteVirtualInterfaceResponse +type DeleteVirtualInterfaceOutput struct { + _ struct{} `type:"structure"` + + // State of the virtual interface. + // + // * Confirming: The creation of the virtual interface is pending confirmation + // from the virtual interface owner. If the owner of the virtual interface + // is different from the owner of the connection on which it is provisioned, + // then the virtual interface will remain in this state until it is confirmed + // by the virtual interface owner. + // + // * Verifying: This state only applies to public virtual interfaces. Each + // public virtual interface needs validation before the virtual interface + // can be created. + // + // * Pending: A virtual interface is in this state from the time that it + // is created until the virtual interface is ready to forward traffic. + // + // * Available: A virtual interface that is able to forward traffic. + // + // * Down: A virtual interface that is BGP down. + // + // * Deleting: A virtual interface is in this state immediately after calling + // DeleteVirtualInterface until it can no longer forward traffic. + // + // * Deleted: A virtual interface that cannot forward traffic. + // + // * Rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the 'Confirming' state is deleted + // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // state. + VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` +} + +// String returns the string representation +func (s DeleteVirtualInterfaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVirtualInterfaceOutput) GoString() string { + return s.String() +} + +// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. +func (s *DeleteVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *DeleteVirtualInterfaceOutput { + s.VirtualInterfaceState = &v + return s +} + +// Container for the parameters to the DescribeConnectionLoa operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoaRequest +type DescribeConnectionLoaInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // A standard media type indicating the content type of the LOA-CFA document. + // Currently, the only supported value is "application/pdf". + // + // Default: application/pdf + LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` + + // The name of the APN partner or service provider who establishes connectivity + // on your behalf. If you supply this parameter, the LOA-CFA lists the provider + // name alongside your company name as the requester of the cross connect. + // + // Default: None + ProviderName *string `locationName:"providerName" type:"string"` +} + +// String returns the string representation +func (s DescribeConnectionLoaInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConnectionLoaInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeConnectionLoaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeConnectionLoaInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *DescribeConnectionLoaInput) SetConnectionId(v string) *DescribeConnectionLoaInput { + s.ConnectionId = &v + return s +} + +// SetLoaContentType sets the LoaContentType field's value. +func (s *DescribeConnectionLoaInput) SetLoaContentType(v string) *DescribeConnectionLoaInput { + s.LoaContentType = &v + return s +} + +// SetProviderName sets the ProviderName field's value. +func (s *DescribeConnectionLoaInput) SetProviderName(v string) *DescribeConnectionLoaInput { + s.ProviderName = &v + return s +} + +// The response received when DescribeConnectionLoa is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoaResponse +type DescribeConnectionLoaOutput struct { + _ struct{} `type:"structure"` + + // A structure containing the Letter of Authorization - Connecting Facility + // Assignment (LOA-CFA) for a connection. + Loa *Loa `locationName:"loa" type:"structure"` +} + +// String returns the string representation +func (s DescribeConnectionLoaOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConnectionLoaOutput) GoString() string { + return s.String() +} + +// SetLoa sets the Loa field's value. +func (s *DescribeConnectionLoaOutput) SetLoa(v *Loa) *DescribeConnectionLoaOutput { + s.Loa = v + return s +} + +// Container for the parameters to the DescribeConnections operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsRequest +type DescribeConnectionsInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + ConnectionId *string `locationName:"connectionId" type:"string"` +} + +// String returns the string representation +func (s DescribeConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConnectionsInput) GoString() string { + return s.String() +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *DescribeConnectionsInput) SetConnectionId(v string) *DescribeConnectionsInput { + s.ConnectionId = &v + return s +} + +// Container for the parameters to the DescribeConnectionsOnInterconnect operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnectRequest +type DescribeConnectionsOnInterconnectInput struct { + _ struct{} `type:"structure"` + + // ID of the interconnect on which a list of connection is provisioned. + // + // Example: dxcon-abc123 + // + // Default: None + // + // InterconnectId is a required field + InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeConnectionsOnInterconnectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConnectionsOnInterconnectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeConnectionsOnInterconnectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeConnectionsOnInterconnectInput"} + if s.InterconnectId == nil { + invalidParams.Add(request.NewErrParamRequired("InterconnectId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInterconnectId sets the InterconnectId field's value. +func (s *DescribeConnectionsOnInterconnectInput) SetInterconnectId(v string) *DescribeConnectionsOnInterconnectInput { + s.InterconnectId = &v + return s +} + +// Container for the parameters to the DescribeDirectConnectGatewayAssociations +// operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAssociationsRequest +type DescribeDirectConnectGatewayAssociationsInput struct { + _ struct{} `type:"structure"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // + // Default: None + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // The maximum number of direct connect gateway associations to return per page. + // + // Example: 15 + // + // Default: None + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token provided in the previous describe result to retrieve the next page + // of the result. + // + // Default: None + NextToken *string `locationName:"nextToken" type:"string"` + + // The ID of the virtual private gateway. + // + // Example: "vgw-abc123ef" + // + // Default: None + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` +} + +// String returns the string representation +func (s DescribeDirectConnectGatewayAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDirectConnectGatewayAssociationsInput) GoString() string { + return s.String() +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *DescribeDirectConnectGatewayAssociationsInput) SetDirectConnectGatewayId(v string) *DescribeDirectConnectGatewayAssociationsInput { + s.DirectConnectGatewayId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeDirectConnectGatewayAssociationsInput) SetMaxResults(v int64) *DescribeDirectConnectGatewayAssociationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDirectConnectGatewayAssociationsInput) SetNextToken(v string) *DescribeDirectConnectGatewayAssociationsInput { + s.NextToken = &v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *DescribeDirectConnectGatewayAssociationsInput) SetVirtualGatewayId(v string) *DescribeDirectConnectGatewayAssociationsInput { + s.VirtualGatewayId = &v + return s +} + +// Container for the response from the DescribeDirectConnectGatewayAssociations +// API call +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAssociationsResult +type DescribeDirectConnectGatewayAssociationsOutput struct { + _ struct{} `type:"structure"` + + // Information about the direct connect gateway associations. + DirectConnectGatewayAssociations []*GatewayAssociation `locationName:"directConnectGatewayAssociations" type:"list"` + + // Token to retrieve the next page of the result. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeDirectConnectGatewayAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDirectConnectGatewayAssociationsOutput) GoString() string { + return s.String() +} + +// SetDirectConnectGatewayAssociations sets the DirectConnectGatewayAssociations field's value. +func (s *DescribeDirectConnectGatewayAssociationsOutput) SetDirectConnectGatewayAssociations(v []*GatewayAssociation) *DescribeDirectConnectGatewayAssociationsOutput { + s.DirectConnectGatewayAssociations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDirectConnectGatewayAssociationsOutput) SetNextToken(v string) *DescribeDirectConnectGatewayAssociationsOutput { + s.NextToken = &v + return s +} + +// Container for the parameters to the DescribeDirectConnectGatewayAttachments +// operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAttachmentsRequest +type DescribeDirectConnectGatewayAttachmentsInput struct { + _ struct{} `type:"structure"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // + // Default: None + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // The maximum number of direct connect gateway attachments to return per page. + // + // Example: 15 + // + // Default: None + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token provided in the previous describe result to retrieve the next page + // of the result. + // + // Default: None + NextToken *string `locationName:"nextToken" type:"string"` + + // The ID of the virtual interface. + // + // Example: "dxvif-abc123ef" + // + // Default: None + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` +} + +// String returns the string representation +func (s DescribeDirectConnectGatewayAttachmentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDirectConnectGatewayAttachmentsInput) GoString() string { + return s.String() +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *DescribeDirectConnectGatewayAttachmentsInput) SetDirectConnectGatewayId(v string) *DescribeDirectConnectGatewayAttachmentsInput { + s.DirectConnectGatewayId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeDirectConnectGatewayAttachmentsInput) SetMaxResults(v int64) *DescribeDirectConnectGatewayAttachmentsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDirectConnectGatewayAttachmentsInput) SetNextToken(v string) *DescribeDirectConnectGatewayAttachmentsInput { + s.NextToken = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *DescribeDirectConnectGatewayAttachmentsInput) SetVirtualInterfaceId(v string) *DescribeDirectConnectGatewayAttachmentsInput { + s.VirtualInterfaceId = &v + return s +} + +// Container for the response from the DescribeDirectConnectGatewayAttachments +// API call +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAttachmentsResult +type DescribeDirectConnectGatewayAttachmentsOutput struct { + _ struct{} `type:"structure"` + + // Information about the direct connect gateway attachments. + DirectConnectGatewayAttachments []*GatewayAttachment `locationName:"directConnectGatewayAttachments" type:"list"` + + // Token to retrieve the next page of the result. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeDirectConnectGatewayAttachmentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDirectConnectGatewayAttachmentsOutput) GoString() string { + return s.String() +} + +// SetDirectConnectGatewayAttachments sets the DirectConnectGatewayAttachments field's value. +func (s *DescribeDirectConnectGatewayAttachmentsOutput) SetDirectConnectGatewayAttachments(v []*GatewayAttachment) *DescribeDirectConnectGatewayAttachmentsOutput { + s.DirectConnectGatewayAttachments = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDirectConnectGatewayAttachmentsOutput) SetNextToken(v string) *DescribeDirectConnectGatewayAttachmentsOutput { + s.NextToken = &v + return s +} + +// Container for the parameters to the DescribeDirectConnectGateways operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewaysRequest +type DescribeDirectConnectGatewaysInput struct { + _ struct{} `type:"structure"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // + // Default: None + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // The maximum number of direct connect gateways to return per page. + // + // Example: 15 + // + // Default: None + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token provided in the previous describe result to retrieve the next page + // of the result. + // + // Default: None + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeDirectConnectGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDirectConnectGatewaysInput) GoString() string { + return s.String() +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *DescribeDirectConnectGatewaysInput) SetDirectConnectGatewayId(v string) *DescribeDirectConnectGatewaysInput { + s.DirectConnectGatewayId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeDirectConnectGatewaysInput) SetMaxResults(v int64) *DescribeDirectConnectGatewaysInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDirectConnectGatewaysInput) SetNextToken(v string) *DescribeDirectConnectGatewaysInput { + s.NextToken = &v + return s +} + +// Container for the response from the DescribeDirectConnectGateways API call +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewaysResult +type DescribeDirectConnectGatewaysOutput struct { + _ struct{} `type:"structure"` + + // Information about the direct connect gateways. + DirectConnectGateways []*Gateway `locationName:"directConnectGateways" type:"list"` + + // Token to retrieve the next page of the result. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeDirectConnectGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDirectConnectGatewaysOutput) GoString() string { + return s.String() +} + +// SetDirectConnectGateways sets the DirectConnectGateways field's value. +func (s *DescribeDirectConnectGatewaysOutput) SetDirectConnectGateways(v []*Gateway) *DescribeDirectConnectGatewaysOutput { + s.DirectConnectGateways = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDirectConnectGatewaysOutput) SetNextToken(v string) *DescribeDirectConnectGatewaysOutput { + s.NextToken = &v + return s +} + +// Container for the parameters to the DescribeHostedConnections operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeHostedConnectionsRequest +type DescribeHostedConnectionsInput struct { + _ struct{} `type:"structure"` + + // The ID of the interconnect or LAG on which the hosted connections are provisioned. + // + // Example: dxcon-abc123 or dxlag-abc123 + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeHostedConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeHostedConnectionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeHostedConnectionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeHostedConnectionsInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *DescribeHostedConnectionsInput) SetConnectionId(v string) *DescribeHostedConnectionsInput { + s.ConnectionId = &v + return s +} + +// Container for the parameters to the DescribeInterconnectLoa operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoaRequest +type DescribeInterconnectLoaInput struct { + _ struct{} `type:"structure"` + + // The ID of the interconnect. + // + // Example: dxcon-abc123 + // + // InterconnectId is a required field + InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` + + // A standard media type indicating the content type of the LOA-CFA document. + // Currently, the only supported value is "application/pdf". + // + // Default: application/pdf + LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` + + // The name of the service provider who establishes connectivity on your behalf. + // If you supply this parameter, the LOA-CFA lists the provider name alongside + // your company name as the requester of the cross connect. + // + // Default: None + ProviderName *string `locationName:"providerName" type:"string"` +} + +// String returns the string representation +func (s DescribeInterconnectLoaInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInterconnectLoaInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInterconnectLoaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInterconnectLoaInput"} + if s.InterconnectId == nil { + invalidParams.Add(request.NewErrParamRequired("InterconnectId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInterconnectId sets the InterconnectId field's value. +func (s *DescribeInterconnectLoaInput) SetInterconnectId(v string) *DescribeInterconnectLoaInput { + s.InterconnectId = &v + return s +} + +// SetLoaContentType sets the LoaContentType field's value. +func (s *DescribeInterconnectLoaInput) SetLoaContentType(v string) *DescribeInterconnectLoaInput { + s.LoaContentType = &v + return s +} + +// SetProviderName sets the ProviderName field's value. +func (s *DescribeInterconnectLoaInput) SetProviderName(v string) *DescribeInterconnectLoaInput { + s.ProviderName = &v + return s +} + +// The response received when DescribeInterconnectLoa is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoaResponse +type DescribeInterconnectLoaOutput struct { + _ struct{} `type:"structure"` + + // A structure containing the Letter of Authorization - Connecting Facility + // Assignment (LOA-CFA) for a connection. + Loa *Loa `locationName:"loa" type:"structure"` +} + +// String returns the string representation +func (s DescribeInterconnectLoaOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInterconnectLoaOutput) GoString() string { + return s.String() +} + +// SetLoa sets the Loa field's value. +func (s *DescribeInterconnectLoaOutput) SetLoa(v *Loa) *DescribeInterconnectLoaOutput { + s.Loa = v + return s +} + +// Container for the parameters to the DescribeInterconnects operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectsRequest +type DescribeInterconnectsInput struct { + _ struct{} `type:"structure"` + + // The ID of the interconnect. + // + // Example: dxcon-abc123 + InterconnectId *string `locationName:"interconnectId" type:"string"` +} + +// String returns the string representation +func (s DescribeInterconnectsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInterconnectsInput) GoString() string { + return s.String() +} + +// SetInterconnectId sets the InterconnectId field's value. +func (s *DescribeInterconnectsInput) SetInterconnectId(v string) *DescribeInterconnectsInput { + s.InterconnectId = &v + return s +} + +// A structure containing a list of interconnects. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Interconnects +type DescribeInterconnectsOutput struct { + _ struct{} `type:"structure"` + + // A list of interconnects. + Interconnects []*Interconnect `locationName:"interconnects" type:"list"` +} + +// String returns the string representation +func (s DescribeInterconnectsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInterconnectsOutput) GoString() string { + return s.String() +} + +// SetInterconnects sets the Interconnects field's value. +func (s *DescribeInterconnectsOutput) SetInterconnects(v []*Interconnect) *DescribeInterconnectsOutput { + s.Interconnects = v + return s +} + +// Container for the parameters to the DescribeLags operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLagsRequest +type DescribeLagsInput struct { + _ struct{} `type:"structure"` + + // The ID of the LAG. + // + // Example: dxlag-abc123 + // + // Default: None + LagId *string `locationName:"lagId" type:"string"` +} + +// String returns the string representation +func (s DescribeLagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLagsInput) GoString() string { + return s.String() +} + +// SetLagId sets the LagId field's value. +func (s *DescribeLagsInput) SetLagId(v string) *DescribeLagsInput { + s.LagId = &v + return s +} + +// A structure containing a list of LAGs. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Lags +type DescribeLagsOutput struct { + _ struct{} `type:"structure"` + + // A list of LAGs. + Lags []*Lag `locationName:"lags" type:"list"` +} + +// String returns the string representation +func (s DescribeLagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLagsOutput) GoString() string { + return s.String() +} + +// SetLags sets the Lags field's value. +func (s *DescribeLagsOutput) SetLags(v []*Lag) *DescribeLagsOutput { + s.Lags = v + return s +} + +// Container for the parameters to the DescribeLoa operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLoaRequest +type DescribeLoaInput struct { + _ struct{} `type:"structure"` + + // The ID of a connection, LAG, or interconnect for which to get the LOA-CFA + // information. + // + // Example: dxcon-abc123 or dxlag-abc123 + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // A standard media type indicating the content type of the LOA-CFA document. + // Currently, the only supported value is "application/pdf". + // + // Default: application/pdf + LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` + + // The name of the service provider who establishes connectivity on your behalf. + // If you supply this parameter, the LOA-CFA lists the provider name alongside + // your company name as the requester of the cross connect. + // + // Default: None + ProviderName *string `locationName:"providerName" type:"string"` +} + +// String returns the string representation +func (s DescribeLoaInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoaInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLoaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLoaInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *DescribeLoaInput) SetConnectionId(v string) *DescribeLoaInput { + s.ConnectionId = &v + return s +} + +// SetLoaContentType sets the LoaContentType field's value. +func (s *DescribeLoaInput) SetLoaContentType(v string) *DescribeLoaInput { + s.LoaContentType = &v + return s +} + +// SetProviderName sets the ProviderName field's value. +func (s *DescribeLoaInput) SetProviderName(v string) *DescribeLoaInput { + s.ProviderName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLocationsInput +type DescribeLocationsInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeLocationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLocationsInput) GoString() string { + return s.String() +} + +// A location is a network facility where AWS Direct Connect routers are available +// to be connected. Generally, these are colocation hubs where many network +// providers have equipment, and where cross connects can be delivered. Locations +// include a name and facility code, and must be provided when creating a connection. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Locations +type DescribeLocationsOutput struct { + _ struct{} `type:"structure"` + + // A list of colocation hubs where network providers have equipment. Most regions + // have multiple locations available. + Locations []*Location `locationName:"locations" type:"list"` +} + +// String returns the string representation +func (s DescribeLocationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLocationsOutput) GoString() string { + return s.String() +} + +// SetLocations sets the Locations field's value. +func (s *DescribeLocationsOutput) SetLocations(v []*Location) *DescribeLocationsOutput { + s.Locations = v + return s +} + +// Container for the parameters to the DescribeTags operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeTagsRequest +type DescribeTagsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Names (ARNs) of the Direct Connect resources. + // + // ResourceArns is a required field + ResourceArns []*string `locationName:"resourceArns" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} + if s.ResourceArns == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArns")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArns sets the ResourceArns field's value. +func (s *DescribeTagsInput) SetResourceArns(v []*string) *DescribeTagsInput { + s.ResourceArns = v + return s +} + +// The response received when DescribeTags is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeTagsResponse +type DescribeTagsOutput struct { + _ struct{} `type:"structure"` + + // Information about the tags. + ResourceTags []*ResourceTag `locationName:"resourceTags" type:"list"` +} + +// String returns the string representation +func (s DescribeTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsOutput) GoString() string { + return s.String() +} + +// SetResourceTags sets the ResourceTags field's value. +func (s *DescribeTagsOutput) SetResourceTags(v []*ResourceTag) *DescribeTagsOutput { + s.ResourceTags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualGatewaysInput +type DescribeVirtualGatewaysInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeVirtualGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVirtualGatewaysInput) GoString() string { + return s.String() +} + +// A structure containing a list of virtual private gateways. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/VirtualGateways +type DescribeVirtualGatewaysOutput struct { + _ struct{} `type:"structure"` + + // A list of virtual private gateways. + VirtualGateways []*VirtualGateway `locationName:"virtualGateways" type:"list"` +} + +// String returns the string representation +func (s DescribeVirtualGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVirtualGatewaysOutput) GoString() string { + return s.String() +} + +// SetVirtualGateways sets the VirtualGateways field's value. +func (s *DescribeVirtualGatewaysOutput) SetVirtualGateways(v []*VirtualGateway) *DescribeVirtualGatewaysOutput { + s.VirtualGateways = v + return s +} + +// Container for the parameters to the DescribeVirtualInterfaces operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualInterfacesRequest +type DescribeVirtualInterfacesInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + ConnectionId *string `locationName:"connectionId" type:"string"` + + // The ID of the virtual interface. + // + // Example: dxvif-123dfg56 + // + // Default: None + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` +} + +// String returns the string representation +func (s DescribeVirtualInterfacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVirtualInterfacesInput) GoString() string { + return s.String() +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *DescribeVirtualInterfacesInput) SetConnectionId(v string) *DescribeVirtualInterfacesInput { + s.ConnectionId = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *DescribeVirtualInterfacesInput) SetVirtualInterfaceId(v string) *DescribeVirtualInterfacesInput { + s.VirtualInterfaceId = &v + return s +} + +// A structure containing a list of virtual interfaces. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/VirtualInterfaces +type DescribeVirtualInterfacesOutput struct { + _ struct{} `type:"structure"` + + // A list of virtual interfaces. + VirtualInterfaces []*VirtualInterface `locationName:"virtualInterfaces" type:"list"` +} + +// String returns the string representation +func (s DescribeVirtualInterfacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVirtualInterfacesOutput) GoString() string { + return s.String() +} + +// SetVirtualInterfaces sets the VirtualInterfaces field's value. +func (s *DescribeVirtualInterfacesOutput) SetVirtualInterfaces(v []*VirtualInterface) *DescribeVirtualInterfacesOutput { + s.VirtualInterfaces = v + return s +} + +// Container for the parameters to the DisassociateConnectionFromLag operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DisassociateConnectionFromLagRequest +type DisassociateConnectionFromLagInput struct { + _ struct{} `type:"structure"` + + // The ID of the connection to disassociate from the LAG. + // + // Example: dxcon-abc123 + // + // Default: None + // + // ConnectionId is a required field + ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` + + // The ID of the LAG. + // + // Example: dxlag-abc123 + // + // Default: None + // + // LagId is a required field + LagId *string `locationName:"lagId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateConnectionFromLagInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateConnectionFromLagInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateConnectionFromLagInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateConnectionFromLagInput"} + if s.ConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionId")) + } + if s.LagId == nil { + invalidParams.Add(request.NewErrParamRequired("LagId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *DisassociateConnectionFromLagInput) SetConnectionId(v string) *DisassociateConnectionFromLagInput { + s.ConnectionId = &v + return s +} + +// SetLagId sets the LagId field's value. +func (s *DisassociateConnectionFromLagInput) SetLagId(v string) *DisassociateConnectionFromLagInput { + s.LagId = &v + return s +} + +// A direct connect gateway is an intermediate object that enables you to connect +// virtual interfaces and virtual private gateways. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DirectConnectGateway +type Gateway struct { + _ struct{} `type:"structure"` + + // The autonomous system number (ASN) for the Amazon side of the connection. + AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // The name of the direct connect gateway. + // + // Example: "My direct connect gateway" + // + // Default: None + DirectConnectGatewayName *string `locationName:"directConnectGatewayName" type:"string"` + + // State of the direct connect gateway. + // + // * Pending: The initial state after calling CreateDirectConnectGateway. + // + // * Available: The direct connect gateway is ready for use. + // + // * Deleting: The initial state after calling DeleteDirectConnectGateway. + // + // * Deleted: The direct connect gateway is deleted and cannot pass traffic. + DirectConnectGatewayState *string `locationName:"directConnectGatewayState" type:"string" enum:"GatewayState"` + + // The AWS account ID of the owner of the direct connect gateway. + OwnerAccount *string `locationName:"ownerAccount" type:"string"` + + // Error message when the state of an object fails to advance. + StateChangeError *string `locationName:"stateChangeError" type:"string"` +} + +// String returns the string representation +func (s Gateway) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Gateway) GoString() string { + return s.String() +} + +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *Gateway) SetAmazonSideAsn(v int64) *Gateway { + s.AmazonSideAsn = &v + return s +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *Gateway) SetDirectConnectGatewayId(v string) *Gateway { + s.DirectConnectGatewayId = &v + return s +} + +// SetDirectConnectGatewayName sets the DirectConnectGatewayName field's value. +func (s *Gateway) SetDirectConnectGatewayName(v string) *Gateway { + s.DirectConnectGatewayName = &v + return s +} + +// SetDirectConnectGatewayState sets the DirectConnectGatewayState field's value. +func (s *Gateway) SetDirectConnectGatewayState(v string) *Gateway { + s.DirectConnectGatewayState = &v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *Gateway) SetOwnerAccount(v string) *Gateway { + s.OwnerAccount = &v + return s +} + +// SetStateChangeError sets the StateChangeError field's value. +func (s *Gateway) SetStateChangeError(v string) *Gateway { + s.StateChangeError = &v + return s +} + +// The association between a direct connect gateway and virtual private gateway. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DirectConnectGatewayAssociation +type GatewayAssociation struct { + _ struct{} `type:"structure"` + + // State of the direct connect gateway association. + // + // * Associating: The initial state after calling CreateDirectConnectGatewayAssociation. + // + // * Associated: The direct connect gateway and virtual private gateway are + // successfully associated and ready to pass traffic. + // + // * Disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. + // + // * Disassociated: The virtual private gateway is successfully disassociated + // from the direct connect gateway. Traffic flow between the direct connect + // gateway and virtual private gateway stops. + AssociationState *string `locationName:"associationState" type:"string" enum:"GatewayAssociationState"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // Error message when the state of an object fails to advance. + StateChangeError *string `locationName:"stateChangeError" type:"string"` + + // The ID of the virtual private gateway to a VPC. This only applies to private + // virtual interfaces. + // + // Example: vgw-123er56 + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` + + // The AWS account ID of the owner of the virtual private gateway. + VirtualGatewayOwnerAccount *string `locationName:"virtualGatewayOwnerAccount" type:"string"` + + // The region in which the virtual private gateway is located. + // + // Example: us-east-1 + VirtualGatewayRegion *string `locationName:"virtualGatewayRegion" type:"string"` +} + +// String returns the string representation +func (s GatewayAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GatewayAssociation) GoString() string { + return s.String() +} + +// SetAssociationState sets the AssociationState field's value. +func (s *GatewayAssociation) SetAssociationState(v string) *GatewayAssociation { + s.AssociationState = &v + return s +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *GatewayAssociation) SetDirectConnectGatewayId(v string) *GatewayAssociation { + s.DirectConnectGatewayId = &v + return s +} + +// SetStateChangeError sets the StateChangeError field's value. +func (s *GatewayAssociation) SetStateChangeError(v string) *GatewayAssociation { + s.StateChangeError = &v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *GatewayAssociation) SetVirtualGatewayId(v string) *GatewayAssociation { + s.VirtualGatewayId = &v + return s +} + +// SetVirtualGatewayOwnerAccount sets the VirtualGatewayOwnerAccount field's value. +func (s *GatewayAssociation) SetVirtualGatewayOwnerAccount(v string) *GatewayAssociation { + s.VirtualGatewayOwnerAccount = &v + return s +} + +// SetVirtualGatewayRegion sets the VirtualGatewayRegion field's value. +func (s *GatewayAssociation) SetVirtualGatewayRegion(v string) *GatewayAssociation { + s.VirtualGatewayRegion = &v + return s +} + +// The association between a direct connect gateway and virtual interface. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DirectConnectGatewayAttachment +type GatewayAttachment struct { + _ struct{} `type:"structure"` + + // State of the direct connect gateway attachment. + // + // * Attaching: The initial state after a virtual interface is created using + // the direct connect gateway. + // + // * Attached: The direct connect gateway and virtual interface are successfully + // attached and ready to pass traffic. + // + // * Detaching: The initial state after calling DeleteVirtualInterface on + // a virtual interface that is attached to a direct connect gateway. + // + // * Detached: The virtual interface is successfully detached from the direct + // connect gateway. Traffic flow between the direct connect gateway and virtual + // interface stops. + AttachmentState *string `locationName:"attachmentState" type:"string" enum:"GatewayAttachmentState"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // Error message when the state of an object fails to advance. + StateChangeError *string `locationName:"stateChangeError" type:"string"` + + // The ID of the virtual interface. + // + // Example: dxvif-123dfg56 + // + // Default: None + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` + + // The AWS account ID of the owner of the virtual interface. + VirtualInterfaceOwnerAccount *string `locationName:"virtualInterfaceOwnerAccount" type:"string"` + + // The region in which the virtual interface is located. + // + // Example: us-east-1 + VirtualInterfaceRegion *string `locationName:"virtualInterfaceRegion" type:"string"` +} + +// String returns the string representation +func (s GatewayAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GatewayAttachment) GoString() string { + return s.String() +} + +// SetAttachmentState sets the AttachmentState field's value. +func (s *GatewayAttachment) SetAttachmentState(v string) *GatewayAttachment { + s.AttachmentState = &v + return s +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *GatewayAttachment) SetDirectConnectGatewayId(v string) *GatewayAttachment { + s.DirectConnectGatewayId = &v + return s +} + +// SetStateChangeError sets the StateChangeError field's value. +func (s *GatewayAttachment) SetStateChangeError(v string) *GatewayAttachment { + s.StateChangeError = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *GatewayAttachment) SetVirtualInterfaceId(v string) *GatewayAttachment { + s.VirtualInterfaceId = &v + return s +} + +// SetVirtualInterfaceOwnerAccount sets the VirtualInterfaceOwnerAccount field's value. +func (s *GatewayAttachment) SetVirtualInterfaceOwnerAccount(v string) *GatewayAttachment { + s.VirtualInterfaceOwnerAccount = &v + return s +} + +// SetVirtualInterfaceRegion sets the VirtualInterfaceRegion field's value. +func (s *GatewayAttachment) SetVirtualInterfaceRegion(v string) *GatewayAttachment { + s.VirtualInterfaceRegion = &v + return s +} + +// An interconnect is a connection that can host other connections. +// +// Like a standard AWS Direct Connect connection, an interconnect represents +// the physical connection between an AWS Direct Connect partner's network and +// a specific Direct Connect location. An AWS Direct Connect partner who owns +// an interconnect can provision hosted connections on the interconnect for +// their end customers, thereby providing the end customers with connectivity +// to AWS services. +// +// The resources of the interconnect, including bandwidth and VLAN numbers, +// are shared by all of the hosted connections on the interconnect, and the +// owner of the interconnect determines how these resources are assigned. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Interconnect +type Interconnect struct { + _ struct{} `type:"structure"` + + // The Direct Connection endpoint which the physical connection terminates on. + AwsDevice *string `locationName:"awsDevice" type:"string"` + + // Bandwidth of the connection. + // + // Example: 1Gbps + // + // Default: None + Bandwidth *string `locationName:"bandwidth" type:"string"` + + // The ID of the interconnect. + // + // Example: dxcon-abc123 + InterconnectId *string `locationName:"interconnectId" type:"string"` + + // The name of the interconnect. + // + // Example: "1G Interconnect to AWS" + InterconnectName *string `locationName:"interconnectName" type:"string"` + + // State of the interconnect. + // + // * Requested: The initial state of an interconnect. The interconnect stays + // in the requested state until the Letter of Authorization (LOA) is sent + // to the customer. + // + // * Pending: The interconnect has been approved, and is being initialized. + // + // * Available: The network link is up, and the interconnect is ready for + // use. + // + // * Down: The network link is down. + // + // * Deleting: The interconnect is in the process of being deleted. + // + // * Deleted: The interconnect has been deleted. + InterconnectState *string `locationName:"interconnectState" type:"string" enum:"InterconnectState"` + + // The ID of the LAG. + // + // Example: dxlag-fg5678gh + LagId *string `locationName:"lagId" type:"string"` + + // The time of the most recent call to DescribeInterconnectLoa for this Interconnect. + LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp" timestampFormat:"unix"` + + // Where the connection is located. + // + // Example: EqSV5 + // + // Default: None + Location *string `locationName:"location" type:"string"` + + // The AWS region where the connection is located. + // + // Example: us-east-1 + // + // Default: None + Region *string `locationName:"region" type:"string"` +} + +// String returns the string representation +func (s Interconnect) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Interconnect) GoString() string { + return s.String() +} + +// SetAwsDevice sets the AwsDevice field's value. +func (s *Interconnect) SetAwsDevice(v string) *Interconnect { + s.AwsDevice = &v + return s +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *Interconnect) SetBandwidth(v string) *Interconnect { + s.Bandwidth = &v + return s +} + +// SetInterconnectId sets the InterconnectId field's value. +func (s *Interconnect) SetInterconnectId(v string) *Interconnect { + s.InterconnectId = &v + return s +} + +// SetInterconnectName sets the InterconnectName field's value. +func (s *Interconnect) SetInterconnectName(v string) *Interconnect { + s.InterconnectName = &v + return s +} + +// SetInterconnectState sets the InterconnectState field's value. +func (s *Interconnect) SetInterconnectState(v string) *Interconnect { + s.InterconnectState = &v + return s +} + +// SetLagId sets the LagId field's value. +func (s *Interconnect) SetLagId(v string) *Interconnect { + s.LagId = &v + return s +} + +// SetLoaIssueTime sets the LoaIssueTime field's value. +func (s *Interconnect) SetLoaIssueTime(v time.Time) *Interconnect { + s.LoaIssueTime = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *Interconnect) SetLocation(v string) *Interconnect { + s.Location = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *Interconnect) SetRegion(v string) *Interconnect { + s.Region = &v + return s +} + +// Describes a link aggregation group (LAG). A LAG is a connection that uses +// the Link Aggregation Control Protocol (LACP) to logically aggregate a bundle +// of physical connections. Like an interconnect, it can host other connections. +// All connections in a LAG must terminate on the same physical AWS Direct Connect +// endpoint, and must be the same bandwidth. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Lag +type Lag struct { + _ struct{} `type:"structure"` + + // Indicates whether the LAG can host other connections. + // + // This is intended for use by AWS Direct Connect partners only. + AllowsHostedConnections *bool `locationName:"allowsHostedConnections" type:"boolean"` + + // The AWS Direct Connection endpoint that hosts the LAG. + AwsDevice *string `locationName:"awsDevice" type:"string"` + + // A list of connections bundled by this LAG. + Connections []*Connection `locationName:"connections" type:"list"` + + // The individual bandwidth of the physical connections bundled by the LAG. + // + // Available values: 1Gbps, 10Gbps + ConnectionsBandwidth *string `locationName:"connectionsBandwidth" type:"string"` + + // The ID of the LAG. + // + // Example: dxlag-fg5678gh + LagId *string `locationName:"lagId" type:"string"` + + // The name of the LAG. + LagName *string `locationName:"lagName" type:"string"` + + // The state of the LAG. + // + // * Requested: The initial state of a LAG. The LAG stays in the requested + // state until the Letter of Authorization (LOA) is available. + // + // * Pending: The LAG has been approved, and is being initialized. + // + // * Available: The network link is established, and the LAG is ready for + // use. + // + // * Down: The network link is down. + // + // * Deleting: The LAG is in the process of being deleted. + // + // * Deleted: The LAG has been deleted. + LagState *string `locationName:"lagState" type:"string" enum:"LagState"` + + // Where the connection is located. + // + // Example: EqSV5 + // + // Default: None + Location *string `locationName:"location" type:"string"` + + // The minimum number of physical connections that must be operational for the + // LAG itself to be operational. If the number of operational connections drops + // below this setting, the LAG state changes to down. This value can help to + // ensure that a LAG is not overutilized if a significant number of its bundled + // connections go down. + MinimumLinks *int64 `locationName:"minimumLinks" type:"integer"` + + // The number of physical connections bundled by the LAG, up to a maximum of + // 10. + NumberOfConnections *int64 `locationName:"numberOfConnections" type:"integer"` + + // The owner of the LAG. + OwnerAccount *string `locationName:"ownerAccount" type:"string"` + + // The AWS region where the connection is located. + // + // Example: us-east-1 + // + // Default: None + Region *string `locationName:"region" type:"string"` +} + +// String returns the string representation +func (s Lag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Lag) GoString() string { + return s.String() +} + +// SetAllowsHostedConnections sets the AllowsHostedConnections field's value. +func (s *Lag) SetAllowsHostedConnections(v bool) *Lag { + s.AllowsHostedConnections = &v + return s +} + +// SetAwsDevice sets the AwsDevice field's value. +func (s *Lag) SetAwsDevice(v string) *Lag { + s.AwsDevice = &v + return s +} + +// SetConnections sets the Connections field's value. +func (s *Lag) SetConnections(v []*Connection) *Lag { + s.Connections = v + return s +} + +// SetConnectionsBandwidth sets the ConnectionsBandwidth field's value. +func (s *Lag) SetConnectionsBandwidth(v string) *Lag { + s.ConnectionsBandwidth = &v + return s +} + +// SetLagId sets the LagId field's value. +func (s *Lag) SetLagId(v string) *Lag { + s.LagId = &v + return s +} + +// SetLagName sets the LagName field's value. +func (s *Lag) SetLagName(v string) *Lag { + s.LagName = &v + return s +} + +// SetLagState sets the LagState field's value. +func (s *Lag) SetLagState(v string) *Lag { + s.LagState = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *Lag) SetLocation(v string) *Lag { + s.Location = &v + return s +} + +// SetMinimumLinks sets the MinimumLinks field's value. +func (s *Lag) SetMinimumLinks(v int64) *Lag { + s.MinimumLinks = &v + return s +} + +// SetNumberOfConnections sets the NumberOfConnections field's value. +func (s *Lag) SetNumberOfConnections(v int64) *Lag { + s.NumberOfConnections = &v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *Lag) SetOwnerAccount(v string) *Lag { + s.OwnerAccount = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *Lag) SetRegion(v string) *Lag { + s.Region = &v + return s +} + +// A structure containing the Letter of Authorization - Connecting Facility +// Assignment (LOA-CFA) for a connection. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Loa +type Loa struct { + _ struct{} `type:"structure"` + + // The binary contents of the LOA-CFA document. + // + // LoaContent is automatically base64 encoded/decoded by the SDK. + LoaContent []byte `locationName:"loaContent" type:"blob"` + + // A standard media type indicating the content type of the LOA-CFA document. + // Currently, the only supported value is "application/pdf". + // + // Default: application/pdf + LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` +} + +// String returns the string representation +func (s Loa) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Loa) GoString() string { + return s.String() +} + +// SetLoaContent sets the LoaContent field's value. +func (s *Loa) SetLoaContent(v []byte) *Loa { + s.LoaContent = v + return s +} + +// SetLoaContentType sets the LoaContentType field's value. +func (s *Loa) SetLoaContentType(v string) *Loa { + s.LoaContentType = &v + return s +} + +// An AWS Direct Connect location where connections and interconnects can be +// requested. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Location +type Location struct { + _ struct{} `type:"structure"` + + // The code used to indicate the AWS Direct Connect location. + LocationCode *string `locationName:"locationCode" type:"string"` + + // The name of the AWS Direct Connect location. The name includes the colocation + // partner name and the physical site of the lit building. + LocationName *string `locationName:"locationName" type:"string"` +} + +// String returns the string representation +func (s Location) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Location) GoString() string { + return s.String() +} + +// SetLocationCode sets the LocationCode field's value. +func (s *Location) SetLocationCode(v string) *Location { + s.LocationCode = &v + return s +} + +// SetLocationName sets the LocationName field's value. +func (s *Location) SetLocationName(v string) *Location { + s.LocationName = &v + return s +} + +// A structure containing information about a new BGP peer. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/NewBGPPeer +type NewBGPPeer struct { + _ struct{} `type:"structure"` + + // Indicates the address family for the BGP peer. + // + // * ipv4: IPv4 address family + // + // * ipv6: IPv6 address family + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // IP address assigned to the Amazon interface. + // + // Example: 192.168.1.1/30 or 2001:db8::1/125 + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + // + // Example: 65000 + Asn *int64 `locationName:"asn" type:"integer"` + + // The authentication key for BGP configuration. + // + // Example: asdf34example + AuthKey *string `locationName:"authKey" type:"string"` + + // IP address assigned to the customer interface. + // + // Example: 192.168.1.2/30 or 2001:db8::2/125 + CustomerAddress *string `locationName:"customerAddress" type:"string"` +} + +// String returns the string representation +func (s NewBGPPeer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NewBGPPeer) GoString() string { + return s.String() +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *NewBGPPeer) SetAddressFamily(v string) *NewBGPPeer { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *NewBGPPeer) SetAmazonAddress(v string) *NewBGPPeer { + s.AmazonAddress = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *NewBGPPeer) SetAsn(v int64) *NewBGPPeer { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *NewBGPPeer) SetAuthKey(v string) *NewBGPPeer { + s.AuthKey = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *NewBGPPeer) SetCustomerAddress(v string) *NewBGPPeer { + s.CustomerAddress = &v + return s +} + +// A structure containing information about a new private virtual interface. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/NewPrivateVirtualInterface +type NewPrivateVirtualInterface struct { + _ struct{} `type:"structure"` + + // Indicates the address family for the BGP peer. + // + // * ipv4: IPv4 address family + // + // * ipv6: IPv6 address family + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // IP address assigned to the Amazon interface. + // + // Example: 192.168.1.1/30 or 2001:db8::1/125 + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + // + // Example: 65000 + // + // Asn is a required field + Asn *int64 `locationName:"asn" type:"integer" required:"true"` + + // The authentication key for BGP configuration. + // + // Example: asdf34example + AuthKey *string `locationName:"authKey" type:"string"` + + // IP address assigned to the customer interface. + // + // Example: 192.168.1.2/30 or 2001:db8::2/125 + CustomerAddress *string `locationName:"customerAddress" type:"string"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // The ID of the virtual private gateway to a VPC. This only applies to private + // virtual interfaces. + // + // Example: vgw-123er56 + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` + + // The name of the virtual interface assigned by the customer. + // + // Example: "My VPC" + // + // VirtualInterfaceName is a required field + VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` + + // The VLAN ID. + // + // Example: 101 + // + // Vlan is a required field + Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` +} + +// String returns the string representation +func (s NewPrivateVirtualInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NewPrivateVirtualInterface) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NewPrivateVirtualInterface) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NewPrivateVirtualInterface"} + if s.Asn == nil { + invalidParams.Add(request.NewErrParamRequired("Asn")) + } + if s.VirtualInterfaceName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceName")) + } + if s.Vlan == nil { + invalidParams.Add(request.NewErrParamRequired("Vlan")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *NewPrivateVirtualInterface) SetAddressFamily(v string) *NewPrivateVirtualInterface { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *NewPrivateVirtualInterface) SetAmazonAddress(v string) *NewPrivateVirtualInterface { + s.AmazonAddress = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *NewPrivateVirtualInterface) SetAsn(v int64) *NewPrivateVirtualInterface { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *NewPrivateVirtualInterface) SetAuthKey(v string) *NewPrivateVirtualInterface { + s.AuthKey = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *NewPrivateVirtualInterface) SetCustomerAddress(v string) *NewPrivateVirtualInterface { + s.CustomerAddress = &v + return s +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *NewPrivateVirtualInterface) SetDirectConnectGatewayId(v string) *NewPrivateVirtualInterface { + s.DirectConnectGatewayId = &v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *NewPrivateVirtualInterface) SetVirtualGatewayId(v string) *NewPrivateVirtualInterface { + s.VirtualGatewayId = &v + return s +} + +// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. +func (s *NewPrivateVirtualInterface) SetVirtualInterfaceName(v string) *NewPrivateVirtualInterface { + s.VirtualInterfaceName = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *NewPrivateVirtualInterface) SetVlan(v int64) *NewPrivateVirtualInterface { + s.Vlan = &v + return s +} + +// A structure containing information about a private virtual interface that +// will be provisioned on a connection. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/NewPrivateVirtualInterfaceAllocation +type NewPrivateVirtualInterfaceAllocation struct { + _ struct{} `type:"structure"` + + // Indicates the address family for the BGP peer. + // + // * ipv4: IPv4 address family + // + // * ipv6: IPv6 address family + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // IP address assigned to the Amazon interface. + // + // Example: 192.168.1.1/30 or 2001:db8::1/125 + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + // + // Example: 65000 + // + // Asn is a required field + Asn *int64 `locationName:"asn" type:"integer" required:"true"` + + // The authentication key for BGP configuration. + // + // Example: asdf34example + AuthKey *string `locationName:"authKey" type:"string"` + + // IP address assigned to the customer interface. + // + // Example: 192.168.1.2/30 or 2001:db8::2/125 + CustomerAddress *string `locationName:"customerAddress" type:"string"` + + // The name of the virtual interface assigned by the customer. + // + // Example: "My VPC" + // + // VirtualInterfaceName is a required field + VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` + + // The VLAN ID. + // + // Example: 101 + // + // Vlan is a required field + Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` +} + +// String returns the string representation +func (s NewPrivateVirtualInterfaceAllocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NewPrivateVirtualInterfaceAllocation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NewPrivateVirtualInterfaceAllocation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NewPrivateVirtualInterfaceAllocation"} + if s.Asn == nil { + invalidParams.Add(request.NewErrParamRequired("Asn")) + } + if s.VirtualInterfaceName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceName")) + } + if s.Vlan == nil { + invalidParams.Add(request.NewErrParamRequired("Vlan")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetAddressFamily(v string) *NewPrivateVirtualInterfaceAllocation { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetAmazonAddress(v string) *NewPrivateVirtualInterfaceAllocation { + s.AmazonAddress = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetAsn(v int64) *NewPrivateVirtualInterfaceAllocation { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetAuthKey(v string) *NewPrivateVirtualInterfaceAllocation { + s.AuthKey = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetCustomerAddress(v string) *NewPrivateVirtualInterfaceAllocation { + s.CustomerAddress = &v + return s +} + +// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetVirtualInterfaceName(v string) *NewPrivateVirtualInterfaceAllocation { + s.VirtualInterfaceName = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetVlan(v int64) *NewPrivateVirtualInterfaceAllocation { + s.Vlan = &v + return s +} + +// A structure containing information about a new public virtual interface. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/NewPublicVirtualInterface +type NewPublicVirtualInterface struct { + _ struct{} `type:"structure"` + + // Indicates the address family for the BGP peer. + // + // * ipv4: IPv4 address family + // + // * ipv6: IPv6 address family + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // IP address assigned to the Amazon interface. + // + // Example: 192.168.1.1/30 or 2001:db8::1/125 + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + // + // Example: 65000 + // + // Asn is a required field + Asn *int64 `locationName:"asn" type:"integer" required:"true"` + + // The authentication key for BGP configuration. + // + // Example: asdf34example + AuthKey *string `locationName:"authKey" type:"string"` + + // IP address assigned to the customer interface. + // + // Example: 192.168.1.2/30 or 2001:db8::2/125 + CustomerAddress *string `locationName:"customerAddress" type:"string"` + + // A list of routes to be advertised to the AWS network in this region (public + // virtual interface). + RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` + + // The name of the virtual interface assigned by the customer. + // + // Example: "My VPC" + // + // VirtualInterfaceName is a required field + VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` + + // The VLAN ID. + // + // Example: 101 + // + // Vlan is a required field + Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` +} + +// String returns the string representation +func (s NewPublicVirtualInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NewPublicVirtualInterface) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NewPublicVirtualInterface) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NewPublicVirtualInterface"} + if s.Asn == nil { + invalidParams.Add(request.NewErrParamRequired("Asn")) + } + if s.VirtualInterfaceName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceName")) + } + if s.Vlan == nil { + invalidParams.Add(request.NewErrParamRequired("Vlan")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *NewPublicVirtualInterface) SetAddressFamily(v string) *NewPublicVirtualInterface { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *NewPublicVirtualInterface) SetAmazonAddress(v string) *NewPublicVirtualInterface { + s.AmazonAddress = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *NewPublicVirtualInterface) SetAsn(v int64) *NewPublicVirtualInterface { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *NewPublicVirtualInterface) SetAuthKey(v string) *NewPublicVirtualInterface { + s.AuthKey = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *NewPublicVirtualInterface) SetCustomerAddress(v string) *NewPublicVirtualInterface { + s.CustomerAddress = &v + return s +} + +// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. +func (s *NewPublicVirtualInterface) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *NewPublicVirtualInterface { + s.RouteFilterPrefixes = v + return s +} + +// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. +func (s *NewPublicVirtualInterface) SetVirtualInterfaceName(v string) *NewPublicVirtualInterface { + s.VirtualInterfaceName = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *NewPublicVirtualInterface) SetVlan(v int64) *NewPublicVirtualInterface { + s.Vlan = &v + return s +} + +// A structure containing information about a public virtual interface that +// will be provisioned on a connection. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/NewPublicVirtualInterfaceAllocation +type NewPublicVirtualInterfaceAllocation struct { + _ struct{} `type:"structure"` + + // Indicates the address family for the BGP peer. + // + // * ipv4: IPv4 address family + // + // * ipv6: IPv6 address family + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // IP address assigned to the Amazon interface. + // + // Example: 192.168.1.1/30 or 2001:db8::1/125 + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + // + // Example: 65000 + // + // Asn is a required field + Asn *int64 `locationName:"asn" type:"integer" required:"true"` + + // The authentication key for BGP configuration. + // + // Example: asdf34example + AuthKey *string `locationName:"authKey" type:"string"` + + // IP address assigned to the customer interface. + // + // Example: 192.168.1.2/30 or 2001:db8::2/125 + CustomerAddress *string `locationName:"customerAddress" type:"string"` + + // A list of routes to be advertised to the AWS network in this region (public + // virtual interface). + RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` + + // The name of the virtual interface assigned by the customer. + // + // Example: "My VPC" + // + // VirtualInterfaceName is a required field + VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` + + // The VLAN ID. + // + // Example: 101 + // + // Vlan is a required field + Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` +} + +// String returns the string representation +func (s NewPublicVirtualInterfaceAllocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NewPublicVirtualInterfaceAllocation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NewPublicVirtualInterfaceAllocation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NewPublicVirtualInterfaceAllocation"} + if s.Asn == nil { + invalidParams.Add(request.NewErrParamRequired("Asn")) + } + if s.VirtualInterfaceName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceName")) + } + if s.Vlan == nil { + invalidParams.Add(request.NewErrParamRequired("Vlan")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *NewPublicVirtualInterfaceAllocation) SetAddressFamily(v string) *NewPublicVirtualInterfaceAllocation { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *NewPublicVirtualInterfaceAllocation) SetAmazonAddress(v string) *NewPublicVirtualInterfaceAllocation { + s.AmazonAddress = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *NewPublicVirtualInterfaceAllocation) SetAsn(v int64) *NewPublicVirtualInterfaceAllocation { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *NewPublicVirtualInterfaceAllocation) SetAuthKey(v string) *NewPublicVirtualInterfaceAllocation { + s.AuthKey = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *NewPublicVirtualInterfaceAllocation) SetCustomerAddress(v string) *NewPublicVirtualInterfaceAllocation { + s.CustomerAddress = &v + return s +} + +// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. +func (s *NewPublicVirtualInterfaceAllocation) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *NewPublicVirtualInterfaceAllocation { + s.RouteFilterPrefixes = v + return s +} + +// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. +func (s *NewPublicVirtualInterfaceAllocation) SetVirtualInterfaceName(v string) *NewPublicVirtualInterfaceAllocation { + s.VirtualInterfaceName = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *NewPublicVirtualInterfaceAllocation) SetVlan(v int64) *NewPublicVirtualInterfaceAllocation { + s.Vlan = &v + return s +} + +// The tags associated with a Direct Connect resource. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ResourceTag +type ResourceTag struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Direct Connect resource. + ResourceArn *string `locationName:"resourceArn" type:"string"` + + // The tags. + Tags []*Tag `locationName:"tags" min:"1" type:"list"` +} + +// String returns the string representation +func (s ResourceTag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceTag) GoString() string { + return s.String() +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ResourceTag) SetResourceArn(v string) *ResourceTag { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ResourceTag) SetTags(v []*Tag) *ResourceTag { + s.Tags = v + return s +} + +// A route filter prefix that the customer can advertise through Border Gateway +// Protocol (BGP) over a public virtual interface. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/RouteFilterPrefix +type RouteFilterPrefix struct { + _ struct{} `type:"structure"` + + // CIDR notation for the advertised route. Multiple routes are separated by + // commas. + // + // IPv6 CIDRs must be at least a /64 or shorter + // + // Example: 10.10.10.0/24,10.10.11.0/24,2001:db8::/64 + Cidr *string `locationName:"cidr" type:"string"` +} + +// String returns the string representation +func (s RouteFilterPrefix) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteFilterPrefix) GoString() string { + return s.String() +} + +// SetCidr sets the Cidr field's value. +func (s *RouteFilterPrefix) SetCidr(v string) *RouteFilterPrefix { + s.Cidr = &v + return s +} + +// Information about a tag. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/Tag +type Tag struct { + _ struct{} `type:"structure"` + + // The key of the tag. + // + // Key is a required field + Key *string `locationName:"key" min:"1" type:"string" required:"true"` + + // The value of the tag. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// Container for the parameters to the TagResource operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/TagResourceRequest +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Direct Connect resource. + // + // Example: arn:aws:directconnect:us-east-1:123456789012:dxcon/dxcon-fg5678gh + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The list of tags to add. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +// The response received when TagResource is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/TagResourceResponse +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// Container for the parameters to the UntagResource operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UntagResourceRequest +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Direct Connect resource. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The list of tag keys to remove. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +// The response received when UntagResource is called. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UntagResourceResponse +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +// Container for the parameters to the UpdateLag operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateLagRequest +type UpdateLagInput struct { + _ struct{} `type:"structure"` + + // The ID of the LAG to update. + // + // Example: dxlag-abc123 + // + // Default: None + // + // LagId is a required field + LagId *string `locationName:"lagId" type:"string" required:"true"` + + // The name for the LAG. + // + // Example: "3x10G LAG to AWS" + // + // Default: None + LagName *string `locationName:"lagName" type:"string"` + + // The minimum number of physical connections that must be operational for the + // LAG itself to be operational. + // + // Default: None + MinimumLinks *int64 `locationName:"minimumLinks" type:"integer"` +} + +// String returns the string representation +func (s UpdateLagInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLagInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateLagInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateLagInput"} + if s.LagId == nil { + invalidParams.Add(request.NewErrParamRequired("LagId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLagId sets the LagId field's value. +func (s *UpdateLagInput) SetLagId(v string) *UpdateLagInput { + s.LagId = &v + return s +} + +// SetLagName sets the LagName field's value. +func (s *UpdateLagInput) SetLagName(v string) *UpdateLagInput { + s.LagName = &v + return s +} + +// SetMinimumLinks sets the MinimumLinks field's value. +func (s *UpdateLagInput) SetMinimumLinks(v int64) *UpdateLagInput { + s.MinimumLinks = &v + return s +} + +// You can create one or more AWS Direct Connect private virtual interfaces +// linking to your virtual private gateway. +// +// Virtual private gateways can be managed using the Amazon Virtual Private +// Cloud (Amazon VPC) console or the Amazon EC2 CreateVpnGateway action (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/VirtualGateway +type VirtualGateway struct { + _ struct{} `type:"structure"` + + // The ID of the virtual private gateway to a VPC. This only applies to private + // virtual interfaces. + // + // Example: vgw-123er56 + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` + + // State of the virtual private gateway. + // + // * Pending: This is the initial state after calling CreateVpnGateway. + // + // * Available: Ready for use by a private virtual interface. + // + // * Deleting: This is the initial state after calling DeleteVpnGateway. + // + // * Deleted: In this state, a private virtual interface is unable to send + // traffic over this gateway. + VirtualGatewayState *string `locationName:"virtualGatewayState" type:"string"` +} + +// String returns the string representation +func (s VirtualGateway) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualGateway) GoString() string { + return s.String() +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *VirtualGateway) SetVirtualGatewayId(v string) *VirtualGateway { + s.VirtualGatewayId = &v + return s +} + +// SetVirtualGatewayState sets the VirtualGatewayState field's value. +func (s *VirtualGateway) SetVirtualGatewayState(v string) *VirtualGateway { + s.VirtualGatewayState = &v + return s +} + +// A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect +// location and the customer. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/VirtualInterface +type VirtualInterface struct { + _ struct{} `type:"structure"` + + // Indicates the address family for the BGP peer. + // + // * ipv4: IPv4 address family + // + // * ipv6: IPv6 address family + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // IP address assigned to the Amazon interface. + // + // Example: 192.168.1.1/30 or 2001:db8::1/125 + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system number (ASN) for the Amazon side of the connection. + AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + // + // Example: 65000 + Asn *int64 `locationName:"asn" type:"integer"` + + // The authentication key for BGP configuration. + // + // Example: asdf34example + AuthKey *string `locationName:"authKey" type:"string"` + + // A list of the BGP peers configured on this virtual interface. + BgpPeers []*BGPPeer `locationName:"bgpPeers" type:"list"` + + // The ID of the connection. This field is also used as the ID type for operations + // that use multiple connection types (LAG, interconnect, and/or connection). + // + // Example: dxcon-fg5678gh + // + // Default: None + ConnectionId *string `locationName:"connectionId" type:"string"` + + // IP address assigned to the customer interface. + // + // Example: 192.168.1.2/30 or 2001:db8::2/125 + CustomerAddress *string `locationName:"customerAddress" type:"string"` + + // Information for generating the customer router configuration. + CustomerRouterConfig *string `locationName:"customerRouterConfig" type:"string"` + + // The ID of the direct connect gateway. + // + // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // Where the connection is located. + // + // Example: EqSV5 + // + // Default: None + Location *string `locationName:"location" type:"string"` + + // The AWS account that will own the new virtual interface. + OwnerAccount *string `locationName:"ownerAccount" type:"string"` + + // A list of routes to be advertised to the AWS network in this region (public + // virtual interface). + RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` + + // The ID of the virtual private gateway to a VPC. This only applies to private + // virtual interfaces. + // + // Example: vgw-123er56 + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` + + // The ID of the virtual interface. + // + // Example: dxvif-123dfg56 + // + // Default: None + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` + + // The name of the virtual interface assigned by the customer. + // + // Example: "My VPC" + VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string"` + + // State of the virtual interface. + // + // * Confirming: The creation of the virtual interface is pending confirmation + // from the virtual interface owner. If the owner of the virtual interface + // is different from the owner of the connection on which it is provisioned, + // then the virtual interface will remain in this state until it is confirmed + // by the virtual interface owner. + // + // * Verifying: This state only applies to public virtual interfaces. Each + // public virtual interface needs validation before the virtual interface + // can be created. + // + // * Pending: A virtual interface is in this state from the time that it + // is created until the virtual interface is ready to forward traffic. + // + // * Available: A virtual interface that is able to forward traffic. + // + // * Down: A virtual interface that is BGP down. + // + // * Deleting: A virtual interface is in this state immediately after calling + // DeleteVirtualInterface until it can no longer forward traffic. + // + // * Deleted: A virtual interface that cannot forward traffic. + // + // * Rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the 'Confirming' state is deleted + // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // state. + VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` + + // The type of virtual interface. + // + // Example: private (Amazon VPC) or public (Amazon S3, Amazon DynamoDB, and + // so on.) + VirtualInterfaceType *string `locationName:"virtualInterfaceType" type:"string"` + + // The VLAN ID. + // + // Example: 101 + Vlan *int64 `locationName:"vlan" type:"integer"` +} + +// String returns the string representation +func (s VirtualInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VirtualInterface) GoString() string { + return s.String() +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *VirtualInterface) SetAddressFamily(v string) *VirtualInterface { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *VirtualInterface) SetAmazonAddress(v string) *VirtualInterface { + s.AmazonAddress = &v + return s +} + +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *VirtualInterface) SetAmazonSideAsn(v int64) *VirtualInterface { + s.AmazonSideAsn = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *VirtualInterface) SetAsn(v int64) *VirtualInterface { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *VirtualInterface) SetAuthKey(v string) *VirtualInterface { + s.AuthKey = &v + return s +} + +// SetBgpPeers sets the BgpPeers field's value. +func (s *VirtualInterface) SetBgpPeers(v []*BGPPeer) *VirtualInterface { + s.BgpPeers = v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *VirtualInterface) SetConnectionId(v string) *VirtualInterface { + s.ConnectionId = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *VirtualInterface) SetCustomerAddress(v string) *VirtualInterface { + s.CustomerAddress = &v + return s +} + +// SetCustomerRouterConfig sets the CustomerRouterConfig field's value. +func (s *VirtualInterface) SetCustomerRouterConfig(v string) *VirtualInterface { + s.CustomerRouterConfig = &v + return s +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *VirtualInterface) SetDirectConnectGatewayId(v string) *VirtualInterface { + s.DirectConnectGatewayId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *VirtualInterface) SetLocation(v string) *VirtualInterface { + s.Location = &v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *VirtualInterface) SetOwnerAccount(v string) *VirtualInterface { + s.OwnerAccount = &v + return s +} + +// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. +func (s *VirtualInterface) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *VirtualInterface { + s.RouteFilterPrefixes = v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *VirtualInterface) SetVirtualGatewayId(v string) *VirtualInterface { + s.VirtualGatewayId = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *VirtualInterface) SetVirtualInterfaceId(v string) *VirtualInterface { + s.VirtualInterfaceId = &v + return s +} + +// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. +func (s *VirtualInterface) SetVirtualInterfaceName(v string) *VirtualInterface { + s.VirtualInterfaceName = &v + return s +} + +// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. +func (s *VirtualInterface) SetVirtualInterfaceState(v string) *VirtualInterface { + s.VirtualInterfaceState = &v + return s +} + +// SetVirtualInterfaceType sets the VirtualInterfaceType field's value. +func (s *VirtualInterface) SetVirtualInterfaceType(v string) *VirtualInterface { + s.VirtualInterfaceType = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *VirtualInterface) SetVlan(v int64) *VirtualInterface { + s.Vlan = &v + return s +} + +// Indicates the address family for the BGP peer. +// +// * ipv4: IPv4 address family +// +// * ipv6: IPv6 address family +const ( + // AddressFamilyIpv4 is a AddressFamily enum value + AddressFamilyIpv4 = "ipv4" + + // AddressFamilyIpv6 is a AddressFamily enum value + AddressFamilyIpv6 = "ipv6" +) + +// The state of the BGP peer. +// +// * Verifying: The BGP peering addresses or ASN require validation before +// the BGP peer can be created. This state only applies to BGP peers on a +// public virtual interface. +// +// * Pending: The BGP peer has been created, and is in this state until it +// is ready to be established. +// +// * Available: The BGP peer can be established. +// +// * Deleting: The BGP peer is in the process of being deleted. +// +// * Deleted: The BGP peer has been deleted and cannot be established. +const ( + // BGPPeerStateVerifying is a BGPPeerState enum value + BGPPeerStateVerifying = "verifying" + + // BGPPeerStatePending is a BGPPeerState enum value + BGPPeerStatePending = "pending" + + // BGPPeerStateAvailable is a BGPPeerState enum value + BGPPeerStateAvailable = "available" + + // BGPPeerStateDeleting is a BGPPeerState enum value + BGPPeerStateDeleting = "deleting" + + // BGPPeerStateDeleted is a BGPPeerState enum value + BGPPeerStateDeleted = "deleted" +) + +// The Up/Down state of the BGP peer. +// +// * Up: The BGP peer is established. +// +// * Down: The BGP peer is down. +const ( + // BGPStatusUp is a BGPStatus enum value + BGPStatusUp = "up" + + // BGPStatusDown is a BGPStatus enum value + BGPStatusDown = "down" +) + +// State of the connection. +// +// * Ordering: The initial state of a hosted connection provisioned on an +// interconnect. The connection stays in the ordering state until the owner +// of the hosted connection confirms or declines the connection order. +// +// * Requested: The initial state of a standard connection. The connection +// stays in the requested state until the Letter of Authorization (LOA) is +// sent to the customer. +// +// * Pending: The connection has been approved, and is being initialized. +// +// * Available: The network link is up, and the connection is ready for use. +// +// * Down: The network link is down. +// +// * Deleting: The connection is in the process of being deleted. +// +// * Deleted: The connection has been deleted. +// +// * Rejected: A hosted connection in the 'Ordering' state will enter the +// 'Rejected' state if it is deleted by the end customer. +const ( + // ConnectionStateOrdering is a ConnectionState enum value + ConnectionStateOrdering = "ordering" + + // ConnectionStateRequested is a ConnectionState enum value + ConnectionStateRequested = "requested" + + // ConnectionStatePending is a ConnectionState enum value + ConnectionStatePending = "pending" + + // ConnectionStateAvailable is a ConnectionState enum value + ConnectionStateAvailable = "available" + + // ConnectionStateDown is a ConnectionState enum value + ConnectionStateDown = "down" + + // ConnectionStateDeleting is a ConnectionState enum value + ConnectionStateDeleting = "deleting" + + // ConnectionStateDeleted is a ConnectionState enum value + ConnectionStateDeleted = "deleted" + + // ConnectionStateRejected is a ConnectionState enum value + ConnectionStateRejected = "rejected" +) + +// State of the direct connect gateway association. +// +// * Associating: The initial state after calling CreateDirectConnectGatewayAssociation. +// +// * Associated: The direct connect gateway and virtual private gateway are +// successfully associated and ready to pass traffic. +// +// * Disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. +// +// * Disassociated: The virtual private gateway is successfully disassociated +// from the direct connect gateway. Traffic flow between the direct connect +// gateway and virtual private gateway stops. +const ( + // GatewayAssociationStateAssociating is a GatewayAssociationState enum value + GatewayAssociationStateAssociating = "associating" + + // GatewayAssociationStateAssociated is a GatewayAssociationState enum value + GatewayAssociationStateAssociated = "associated" + + // GatewayAssociationStateDisassociating is a GatewayAssociationState enum value + GatewayAssociationStateDisassociating = "disassociating" + + // GatewayAssociationStateDisassociated is a GatewayAssociationState enum value + GatewayAssociationStateDisassociated = "disassociated" +) + +// State of the direct connect gateway attachment. +// +// * Attaching: The initial state after a virtual interface is created using +// the direct connect gateway. +// +// * Attached: The direct connect gateway and virtual interface are successfully +// attached and ready to pass traffic. +// +// * Detaching: The initial state after calling DeleteVirtualInterface on +// a virtual interface that is attached to a direct connect gateway. +// +// * Detached: The virtual interface is successfully detached from the direct +// connect gateway. Traffic flow between the direct connect gateway and virtual +// interface stops. +const ( + // GatewayAttachmentStateAttaching is a GatewayAttachmentState enum value + GatewayAttachmentStateAttaching = "attaching" + + // GatewayAttachmentStateAttached is a GatewayAttachmentState enum value + GatewayAttachmentStateAttached = "attached" + + // GatewayAttachmentStateDetaching is a GatewayAttachmentState enum value + GatewayAttachmentStateDetaching = "detaching" + + // GatewayAttachmentStateDetached is a GatewayAttachmentState enum value + GatewayAttachmentStateDetached = "detached" +) + +// State of the direct connect gateway. +// +// * Pending: The initial state after calling CreateDirectConnectGateway. +// +// * Available: The direct connect gateway is ready for use. +// +// * Deleting: The initial state after calling DeleteDirectConnectGateway. +// +// * Deleted: The direct connect gateway is deleted and cannot pass traffic. +const ( + // GatewayStatePending is a GatewayState enum value + GatewayStatePending = "pending" + + // GatewayStateAvailable is a GatewayState enum value + GatewayStateAvailable = "available" + + // GatewayStateDeleting is a GatewayState enum value + GatewayStateDeleting = "deleting" + + // GatewayStateDeleted is a GatewayState enum value + GatewayStateDeleted = "deleted" +) + +// State of the interconnect. +// +// * Requested: The initial state of an interconnect. The interconnect stays +// in the requested state until the Letter of Authorization (LOA) is sent +// to the customer. +// +// * Pending: The interconnect has been approved, and is being initialized. +// +// * Available: The network link is up, and the interconnect is ready for +// use. +// +// * Down: The network link is down. +// +// * Deleting: The interconnect is in the process of being deleted. +// +// * Deleted: The interconnect has been deleted. +const ( + // InterconnectStateRequested is a InterconnectState enum value + InterconnectStateRequested = "requested" + + // InterconnectStatePending is a InterconnectState enum value + InterconnectStatePending = "pending" + + // InterconnectStateAvailable is a InterconnectState enum value + InterconnectStateAvailable = "available" + + // InterconnectStateDown is a InterconnectState enum value + InterconnectStateDown = "down" + + // InterconnectStateDeleting is a InterconnectState enum value + InterconnectStateDeleting = "deleting" + + // InterconnectStateDeleted is a InterconnectState enum value + InterconnectStateDeleted = "deleted" +) + +// The state of the LAG. +// +// * Requested: The initial state of a LAG. The LAG stays in the requested +// state until the Letter of Authorization (LOA) is available. +// +// * Pending: The LAG has been approved, and is being initialized. +// +// * Available: The network link is established, and the LAG is ready for +// use. +// +// * Down: The network link is down. +// +// * Deleting: The LAG is in the process of being deleted. +// +// * Deleted: The LAG has been deleted. +const ( + // LagStateRequested is a LagState enum value + LagStateRequested = "requested" + + // LagStatePending is a LagState enum value + LagStatePending = "pending" + + // LagStateAvailable is a LagState enum value + LagStateAvailable = "available" + + // LagStateDown is a LagState enum value + LagStateDown = "down" + + // LagStateDeleting is a LagState enum value + LagStateDeleting = "deleting" + + // LagStateDeleted is a LagState enum value + LagStateDeleted = "deleted" +) + +// A standard media type indicating the content type of the LOA-CFA document. +// Currently, the only supported value is "application/pdf". +// +// Default: application/pdf +const ( + // LoaContentTypeApplicationPdf is a LoaContentType enum value + LoaContentTypeApplicationPdf = "application/pdf" +) + +// State of the virtual interface. +// +// * Confirming: The creation of the virtual interface is pending confirmation +// from the virtual interface owner. If the owner of the virtual interface +// is different from the owner of the connection on which it is provisioned, +// then the virtual interface will remain in this state until it is confirmed +// by the virtual interface owner. +// +// * Verifying: This state only applies to public virtual interfaces. Each +// public virtual interface needs validation before the virtual interface +// can be created. +// +// * Pending: A virtual interface is in this state from the time that it +// is created until the virtual interface is ready to forward traffic. +// +// * Available: A virtual interface that is able to forward traffic. +// +// * Down: A virtual interface that is BGP down. +// +// * Deleting: A virtual interface is in this state immediately after calling +// DeleteVirtualInterface until it can no longer forward traffic. +// +// * Deleted: A virtual interface that cannot forward traffic. +// +// * Rejected: The virtual interface owner has declined creation of the virtual +// interface. If a virtual interface in the 'Confirming' state is deleted +// by the virtual interface owner, the virtual interface will enter the 'Rejected' +// state. +const ( + // VirtualInterfaceStateConfirming is a VirtualInterfaceState enum value + VirtualInterfaceStateConfirming = "confirming" + + // VirtualInterfaceStateVerifying is a VirtualInterfaceState enum value + VirtualInterfaceStateVerifying = "verifying" + + // VirtualInterfaceStatePending is a VirtualInterfaceState enum value + VirtualInterfaceStatePending = "pending" + + // VirtualInterfaceStateAvailable is a VirtualInterfaceState enum value + VirtualInterfaceStateAvailable = "available" + + // VirtualInterfaceStateDown is a VirtualInterfaceState enum value + VirtualInterfaceStateDown = "down" + + // VirtualInterfaceStateDeleting is a VirtualInterfaceState enum value + VirtualInterfaceStateDeleting = "deleting" + + // VirtualInterfaceStateDeleted is a VirtualInterfaceState enum value + VirtualInterfaceStateDeleted = "deleted" + + // VirtualInterfaceStateRejected is a VirtualInterfaceState enum value + VirtualInterfaceStateRejected = "rejected" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go new file mode 100644 index 000000000..277fbe626 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go @@ -0,0 +1,39 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package directconnect provides the client and types for making API +// requests to AWS Direct Connect. +// +// AWS Direct Connect links your internal network to an AWS Direct Connect location +// over a standard 1 gigabit or 10 gigabit Ethernet fiber-optic cable. One end +// of the cable is connected to your router, the other to an AWS Direct Connect +// router. With this connection in place, you can create virtual interfaces +// directly to the AWS cloud (for example, to Amazon Elastic Compute Cloud (Amazon +// EC2) and Amazon Simple Storage Service (Amazon S3)) and to Amazon Virtual +// Private Cloud (Amazon VPC), bypassing Internet service providers in your +// network path. An AWS Direct Connect location provides access to AWS in the +// region it is associated with, as well as access to other US regions. For +// example, you can provision a single connection to any AWS Direct Connect +// location in the US and use it to access public AWS services in all US Regions +// and AWS GovCloud (US). +// +// See https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25 for more information on this service. +// +// See directconnect package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/directconnect/ +// +// Using the Client +// +// To contact AWS Direct Connect with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Direct Connect client DirectConnect for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/directconnect/#New +package directconnect diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go new file mode 100644 index 000000000..cbf9bf2f5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go @@ -0,0 +1,33 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package directconnect + +const ( + + // ErrCodeClientException for service response error code + // "ClientException". + // + // The API was called with invalid parameters. The error message will contain + // additional details about the cause. + ErrCodeClientException = "ClientException" + + // ErrCodeDuplicateTagKeysException for service response error code + // "DuplicateTagKeysException". + // + // A tag key was specified more than once. + ErrCodeDuplicateTagKeysException = "DuplicateTagKeysException" + + // ErrCodeServerException for service response error code + // "ServerException". + // + // A server-side error occurred during the API call. The error message will + // contain additional details about the cause. + ErrCodeServerException = "ServerException" + + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + // + // You have reached the limit on the number of tags that can be assigned to + // a Direct Connect resource. + ErrCodeTooManyTagsException = "TooManyTagsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go new file mode 100644 index 000000000..1798ae11a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go @@ -0,0 +1,95 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package directconnect + +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" +) + +// DirectConnect provides the API operation methods for making requests to +// AWS Direct Connect. See this package's package overview docs +// for details on the service. +// +// DirectConnect methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type DirectConnect 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 = "directconnect" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the DirectConnect 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 DirectConnect client from just a session. +// svc := directconnect.New(mySession) +// +// // Create a DirectConnect client with additional configuration +// svc := directconnect.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *DirectConnect { + 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) *DirectConnect { + svc := &DirectConnect{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2012-10-25", + JSONVersion: "1.1", + TargetPrefix: "OvertureService", + }, + 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 DirectConnect operation and runs any +// custom request initialization. +func (c *DirectConnect) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go index 93a12b9c1..2013ed02d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go @@ -24,7 +24,7 @@ // // Using the Client // -// To AWS Directory Service with the SDK use the New function to create +// To contact AWS Directory Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc.go index f3aacbe12..f244a7330 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc.go @@ -29,7 +29,7 @@ // // Using the Client // -// To Amazon DynamoDB with the SDK use the New function to create +// To contact Amazon DynamoDB with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc_custom.go index 53639be53..5ebc58072 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc_custom.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc_custom.go @@ -1,84 +1,27 @@ -// AttributeValue Marshaling and Unmarshaling Helpers -// -// Utility helpers to marshal and unmarshal AttributeValue to and -// from Go types can be found in the dynamodbattribute sub package. This package -// provides has specialized functions for the common ways of working with -// AttributeValues. Such as map[string]*AttributeValue, []*AttributeValue, and -// directly with *AttributeValue. This is helpful for marshaling Go types for API -// operations such as PutItem, and unmarshaling Query and Scan APIs' responses. -// -// See the dynamodbattribute package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/dynamodbattribute/ -// -// AttributeValue Marshaling -// -// To marshal a Go type to an AttributeValue you can use the Marshal -// functions in the dynamodbattribute package. There are specialized versions -// of these functions for collections of AttributeValue, such as maps and lists. -// -// The following example uses MarshalMap to convert the Record Go type to a -// dynamodb.AttributeValue type and use the value to make a PutItem API request. -// -// type Record struct { -// ID string -// URLs []string -// } -// -// //... -// -// r := Record{ -// ID: "ABC123", -// URLs: []string{ -// "https://example.com/first/link", -// "https://example.com/second/url", -// }, -// } -// av, err := dynamodbattribute.MarshalMap(r) -// if err != nil { -// panic(fmt.Sprintf("failed to DynamoDB marshal Record, %v", err)) -// } -// -// _, err = svc.PutItem(&dynamodb.PutItemInput{ -// TableName: aws.String(myTableName), -// Item: av, -// }) -// if err != nil { -// panic(fmt.Sprintf("failed to put Record to DynamoDB, %v", err)) -// } -// -// AttributeValue Unmarshaling -// -// To unmarshal a dynamodb.AttributeValue to a Go type you can use the Unmarshal -// functions in the dynamodbattribute package. There are specialized versions -// of these functions for collections of AttributeValue, such as maps and lists. -// -// The following example will unmarshal the DynamoDB's Scan API operation. The -// Items returned by the operation will be unmarshaled into the slice of Records -// Go type. -// -// type Record struct { -// ID string -// URLs []string -// } -// -// //... -// -// var records []Record -// -// // Use the ScanPages method to perform the scan with pagination. Use -// // just Scan method to make the API call without pagination. -// err := svc.ScanPages(&dynamodb.ScanInput{ -// TableName: aws.String(myTableName), -// }, func(page *dynamodb.ScanOutput, last bool) bool { -// recs := []Record{} -// -// err := dynamodbattribute.UnmarshalListOfMaps(page.Items, &recs) -// if err != nil { -// panic(fmt.Sprintf("failed to unmarshal Dynamodb Scan Items, %v", err)) -// } -// -// records = append(records, recs...) -// -// return true // keep paging -// }) +/* +AttributeValue Marshaling and Unmarshaling Helpers + +Utility helpers to marshal and unmarshal AttributeValue to and +from Go types can be found in the dynamodbattribute sub package. This package +provides has specialized functions for the common ways of working with +AttributeValues. Such as map[string]*AttributeValue, []*AttributeValue, and +directly with *AttributeValue. This is helpful for marshaling Go types for API +operations such as PutItem, and unmarshaling Query and Scan APIs' responses. + +See the dynamodbattribute package documentation for more information. +https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/dynamodbattribute/ + +Expression Builders + +The expression package provides utility types and functions to build DynamoDB +expression for type safe construction of API ExpressionAttributeNames, and +ExpressionAttribute Values. + +The package represents the various DynamoDB Expressions as structs named +accordingly. For example, ConditionBuilder represents a DynamoDB Condition +Expression, an UpdateBuilder represents a DynamoDB Update Expression, and so on. + +See the expression package documentation for more information. +https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/expression/ +*/ package dynamodb diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index ee1453749..bd67ff7c1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -1377,8 +1377,7 @@ func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *reques // Attaches a virtual private gateway to a VPC. You can attach one virtual private // gateway to one VPC at a time. // -// For more information, see Adding a Hardware Virtual Private Gateway to Your -// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// For more information, see AWS Managed VPN Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2275,8 +2274,7 @@ func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput) // // Determines whether a product code is associated with an instance. This action // can only be used by the owner of the product code. It is useful when a product -// code owner needs to verify whether another user's instance is eligible for -// support. +// code owner must verify whether another user's instance is eligible for support. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2306,6 +2304,80 @@ func (c *EC2) ConfirmProductInstanceWithContext(ctx aws.Context, input *ConfirmP return out, req.Send() } +const opCopyFpgaImage = "CopyFpgaImage" + +// CopyFpgaImageRequest generates a "aws/request.Request" representing the +// client's request for the CopyFpgaImage operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CopyFpgaImage for more information on using the CopyFpgaImage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CopyFpgaImageRequest method. +// req, resp := client.CopyFpgaImageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImage +func (c *EC2) CopyFpgaImageRequest(input *CopyFpgaImageInput) (req *request.Request, output *CopyFpgaImageOutput) { + op := &request.Operation{ + Name: opCopyFpgaImage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopyFpgaImageInput{} + } + + output = &CopyFpgaImageOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopyFpgaImage API operation for Amazon Elastic Compute Cloud. +// +// Copies the specified Amazon FPGA Image (AFI) to the current region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CopyFpgaImage for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImage +func (c *EC2) CopyFpgaImage(input *CopyFpgaImageInput) (*CopyFpgaImageOutput, error) { + req, out := c.CopyFpgaImageRequest(input) + return out, req.Send() +} + +// CopyFpgaImageWithContext is the same as CopyFpgaImage with the addition of +// the ability to pass a context and additional request options. +// +// See CopyFpgaImage for details on how to use this API operation. +// +// 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 *EC2) CopyFpgaImageWithContext(ctx aws.Context, input *CopyFpgaImageInput, opts ...request.Option) (*CopyFpgaImageOutput, error) { + req, out := c.CopyFpgaImageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCopyImage = "CopyImage" // CopyImageRequest generates a "aws/request.Request" representing the @@ -2539,9 +2611,9 @@ func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (r // the exception of 7224, which is reserved in the us-east-1 region, and 9059, // which is reserved in the eu-west-1 region. // -// For more information about VPN customer gateways, see Adding a Hardware Virtual -// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. +// For more information about VPN customer gateways, see AWS Managed VPN Connections +// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the +// Amazon Virtual Private Cloud User Guide. // // You cannot create more than one customer gateway with the same VPN type, // IP address, and BGP ASN parameter values. If you run an identical request @@ -2577,6 +2649,84 @@ func (c *EC2) CreateCustomerGatewayWithContext(ctx aws.Context, input *CreateCus return out, req.Send() } +const opCreateDefaultSubnet = "CreateDefaultSubnet" + +// CreateDefaultSubnetRequest generates a "aws/request.Request" representing the +// client's request for the CreateDefaultSubnet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDefaultSubnet for more information on using the CreateDefaultSubnet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDefaultSubnetRequest method. +// req, resp := client.CreateDefaultSubnetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnet +func (c *EC2) CreateDefaultSubnetRequest(input *CreateDefaultSubnetInput) (req *request.Request, output *CreateDefaultSubnetOutput) { + op := &request.Operation{ + Name: opCreateDefaultSubnet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDefaultSubnetInput{} + } + + output = &CreateDefaultSubnetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDefaultSubnet API operation for Amazon Elastic Compute Cloud. +// +// Creates a default subnet with a size /20 IPv4 CIDR block in the specified +// Availability Zone in your default VPC. You can have only one default subnet +// per Availability Zone. For more information, see Creating a Default Subnet +// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html#create-default-subnet) +// in the Amazon Virtual Private Cloud User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateDefaultSubnet for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnet +func (c *EC2) CreateDefaultSubnet(input *CreateDefaultSubnetInput) (*CreateDefaultSubnetOutput, error) { + req, out := c.CreateDefaultSubnetRequest(input) + return out, req.Send() +} + +// CreateDefaultSubnetWithContext is the same as CreateDefaultSubnet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDefaultSubnet for details on how to use this API operation. +// +// 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 *EC2) CreateDefaultSubnetWithContext(ctx aws.Context, input *CreateDefaultSubnetInput, opts ...request.Option) (*CreateDefaultSubnetOutput, error) { + req, out := c.CreateDefaultSubnetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateDefaultVpc = "CreateDefaultVpc" // CreateDefaultVpcRequest generates a "aws/request.Request" representing the @@ -3793,8 +3943,8 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req // CreatePlacementGroup API operation for Amazon Elastic Compute Cloud. // -// Creates a placement group that you launch cluster instances into. You must -// give the group a name that's unique within the scope of your account. +// Creates a placement group that you launch cluster instances into. Give the +// group a name that's unique within the scope of your account. // // For more information about placement groups and cluster instances, see Cluster // Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html) @@ -4788,11 +4938,18 @@ func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *requ // // Creates a VPC endpoint for a specified AWS service. An endpoint enables you // to create a private connection between your VPC and another AWS service in -// your account. You can specify an endpoint policy to attach to the endpoint -// that will control access to the service from your VPC. You can also specify -// the VPC route tables that use the endpoint. +// your account. You can create a gateway endpoint or an interface endpoint. // -// Use DescribeVpcEndpointServices to get a list of supported AWS services. +// A gateway endpoint serves as a target for a route in your route table for +// traffic destined for the AWS service. You can specify the VPC route tables +// that use the endpoint, and you can optionally specify an endpoint policy +// to attach to the endpoint that will control access to the service from your +// VPC. +// +// An interface endpoint is a network interface in your subnet with a private +// IP address that serves as an entry point for traffic destined to the AWS +// service. You can specify the subnets in which to create an endpoint, and +// the security groups to associate with the network interface. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4967,8 +5124,7 @@ func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req * // This is an idempotent operation. If you perform the operation more than once, // Amazon EC2 doesn't return an error. // -// For more information about VPN connections, see Adding a Hardware Virtual -// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// For more information, see AWS Managed VPN Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5050,9 +5206,9 @@ func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInp // traffic to be routed from the virtual private gateway to the VPN customer // gateway. // -// For more information about VPN connections, see Adding a Hardware Virtual -// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. +// For more information about VPN connections, see AWS Managed VPN Connections +// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the +// Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5130,8 +5286,8 @@ func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *reques // on the VPC side of your VPN connection. You can create a virtual private // gateway before creating the VPC itself. // -// For more information about virtual private gateways, see Adding a Hardware -// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// For more information about virtual private gateways, see AWS Managed VPN +// Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5466,6 +5622,80 @@ func (c *EC2) DeleteFlowLogsWithContext(ctx aws.Context, input *DeleteFlowLogsIn return out, req.Send() } +const opDeleteFpgaImage = "DeleteFpgaImage" + +// DeleteFpgaImageRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFpgaImage operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFpgaImage for more information on using the DeleteFpgaImage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFpgaImageRequest method. +// req, resp := client.DeleteFpgaImageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImage +func (c *EC2) DeleteFpgaImageRequest(input *DeleteFpgaImageInput) (req *request.Request, output *DeleteFpgaImageOutput) { + op := &request.Operation{ + Name: opDeleteFpgaImage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFpgaImageInput{} + } + + output = &DeleteFpgaImageOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFpgaImage API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Amazon FPGA Image (AFI). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteFpgaImage for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImage +func (c *EC2) DeleteFpgaImage(input *DeleteFpgaImageInput) (*DeleteFpgaImageOutput, error) { + req, out := c.DeleteFpgaImageRequest(input) + return out, req.Send() +} + +// DeleteFpgaImageWithContext is the same as DeleteFpgaImage with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFpgaImage for details on how to use this API operation. +// +// 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 *EC2) DeleteFpgaImageWithContext(ctx aws.Context, input *DeleteFpgaImageInput, opts ...request.Option) (*DeleteFpgaImageOutput, error) { + req, out := c.DeleteFpgaImageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteInternetGateway = "DeleteInternetGateway" // DeleteInternetGatewayRequest generates a "aws/request.Request" representing the @@ -6845,8 +7075,10 @@ func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *re // DeleteVpcEndpoints API operation for Amazon Elastic Compute Cloud. // -// Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes -// the endpoint routes in the route tables that were associated with the endpoint. +// Deletes one or more specified VPC endpoints. Deleting a gateway endpoint +// also deletes the endpoint routes in the route tables that were associated +// with the endpoint. Deleting an interface endpoint deletes the endpoint network +// interfaces. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7811,9 +8043,9 @@ func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInp // // Describes one or more of your VPN customer gateways. // -// For more information about VPN customer gateways, see Adding a Hardware Virtual -// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. +// For more information about VPN customer gateways, see AWS Managed VPN Connections +// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the +// Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8039,7 +8271,7 @@ func (c *EC2) DescribeElasticGpusRequest(input *DescribeElasticGpusInput) (req * // DescribeElasticGpus API operation for Amazon Elastic Compute Cloud. // // Describes the Elastic GPUs associated with your instances. For more information -// about Elastic GPUs, see Amazon EC2 Elastic GPUs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-gpus.html). +// about Elastic GPUs, see Amazon EC2 Elastic GPUs (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-gpus.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8219,6 +8451,80 @@ func (c *EC2) DescribeFlowLogsWithContext(ctx aws.Context, input *DescribeFlowLo return out, req.Send() } +const opDescribeFpgaImageAttribute = "DescribeFpgaImageAttribute" + +// DescribeFpgaImageAttributeRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFpgaImageAttribute operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeFpgaImageAttribute for more information on using the DescribeFpgaImageAttribute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeFpgaImageAttributeRequest method. +// req, resp := client.DescribeFpgaImageAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttribute +func (c *EC2) DescribeFpgaImageAttributeRequest(input *DescribeFpgaImageAttributeInput) (req *request.Request, output *DescribeFpgaImageAttributeOutput) { + op := &request.Operation{ + Name: opDescribeFpgaImageAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeFpgaImageAttributeInput{} + } + + output = &DescribeFpgaImageAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFpgaImageAttribute API operation for Amazon Elastic Compute Cloud. +// +// Describes the specified attribute of the specified Amazon FPGA Image (AFI). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeFpgaImageAttribute for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttribute +func (c *EC2) DescribeFpgaImageAttribute(input *DescribeFpgaImageAttributeInput) (*DescribeFpgaImageAttributeOutput, error) { + req, out := c.DescribeFpgaImageAttributeRequest(input) + return out, req.Send() +} + +// DescribeFpgaImageAttributeWithContext is the same as DescribeFpgaImageAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFpgaImageAttribute for details on how to use this API operation. +// +// 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 *EC2) DescribeFpgaImageAttributeWithContext(ctx aws.Context, input *DescribeFpgaImageAttributeInput, opts ...request.Option) (*DescribeFpgaImageAttributeOutput, error) { + req, out := c.DescribeFpgaImageAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeFpgaImages = "DescribeFpgaImages" // DescribeFpgaImagesRequest generates a "aws/request.Request" representing the @@ -13352,9 +13658,9 @@ func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput) // // Describes one or more of your VPN connections. // -// For more information about VPN connections, see Adding a Hardware Virtual -// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. +// For more information about VPN connections, see AWS Managed VPN Connections +// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the +// Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -13430,8 +13736,8 @@ func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req * // // Describes one or more of your virtual private gateways. // -// For more information about virtual private gateways, see Adding an IPsec -// Hardware VPN to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// For more information about virtual private gateways, see AWS Managed VPN +// Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -14855,7 +15161,7 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques // the Amazon EC2 API and command line interface. // // Instance console output is buffered and posted shortly after instance boot, -// reboot, and termination. Amazon EC2 preserves the most recent 64 KB output +// reboot, and termination. Amazon EC2 preserves the most recent 64 KB output, // which is available for at least one hour after the most recent post. // // For Linux instances, the instance console output displays the exact console @@ -15093,20 +15399,24 @@ func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request. // GetPasswordData API operation for Amazon Elastic Compute Cloud. // -// Retrieves the encrypted administrator password for an instance running Windows. +// Retrieves the encrypted administrator password for a running Windows instance. // -// The Windows password is generated at boot if the EC2Config service plugin, -// Ec2SetPassword, is enabled. This usually only happens the first time an AMI -// is launched, and then Ec2SetPassword is automatically disabled. The password -// is not generated for rebundled AMIs unless Ec2SetPassword is enabled before -// bundling. +// The Windows password is generated at boot by the EC2Config service or EC2Launch +// scripts (Windows Server 2016 and later). This usually only happens the first +// time an instance is launched. For more information, see EC2Config (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html) +// and EC2Launch (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html) +// in the Amazon Elastic Compute Cloud User Guide. +// +// For the EC2Config service, the password is not generated for rebundled AMIs +// unless Ec2SetPassword is enabled before bundling. // // The password is encrypted using the key pair that you specified when you // launched the instance. You must provide the corresponding key pair file. // -// Password generation and encryption takes a few moments. We recommend that -// you wait up to 15 minutes after launching an instance before trying to retrieve -// the generated password. +// When you launch an instance, password generation and encryption may take +// a few minutes. If you try to retrieve the password before it's available, +// the output returns an empty string. We recommend that you wait up to 15 minutes +// after launching an instance before trying to retrieve the generated password. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -15180,9 +15490,10 @@ func (c *EC2) GetReservedInstancesExchangeQuoteRequest(input *GetReservedInstanc // GetReservedInstancesExchangeQuote API operation for Amazon Elastic Compute Cloud. // -// Returns details about the values and term of your specified Convertible Reserved -// Instances. When a target configuration is specified, it returns information -// about whether the exchange is valid and can be performed. +// Returns a quote and exchange information for exchanging one or more specified +// Convertible Reserved Instances for a new Convertible Reserved Instance. If +// the exchange cannot be performed, the reason is returned in the response. +// Use AcceptReservedInstancesExchangeQuote to perform the exchange. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -15602,6 +15913,80 @@ func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput, return out, req.Send() } +const opModifyFpgaImageAttribute = "ModifyFpgaImageAttribute" + +// ModifyFpgaImageAttributeRequest generates a "aws/request.Request" representing the +// client's request for the ModifyFpgaImageAttribute operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyFpgaImageAttribute for more information on using the ModifyFpgaImageAttribute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyFpgaImageAttributeRequest method. +// req, resp := client.ModifyFpgaImageAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttribute +func (c *EC2) ModifyFpgaImageAttributeRequest(input *ModifyFpgaImageAttributeInput) (req *request.Request, output *ModifyFpgaImageAttributeOutput) { + op := &request.Operation{ + Name: opModifyFpgaImageAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyFpgaImageAttributeInput{} + } + + output = &ModifyFpgaImageAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyFpgaImageAttribute API operation for Amazon Elastic Compute Cloud. +// +// Modifies the specified attribute of the specified Amazon FPGA Image (AFI). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyFpgaImageAttribute for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttribute +func (c *EC2) ModifyFpgaImageAttribute(input *ModifyFpgaImageAttributeInput) (*ModifyFpgaImageAttributeOutput, error) { + req, out := c.ModifyFpgaImageAttributeRequest(input) + return out, req.Send() +} + +// ModifyFpgaImageAttributeWithContext is the same as ModifyFpgaImageAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyFpgaImageAttribute for details on how to use this API operation. +// +// 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 *EC2) ModifyFpgaImageAttributeWithContext(ctx aws.Context, input *ModifyFpgaImageAttributeInput, opts ...request.Option) (*ModifyFpgaImageAttributeOutput, error) { + req, out := c.ModifyFpgaImageAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyHosts = "ModifyHosts" // ModifyHostsRequest generates a "aws/request.Request" representing the @@ -15909,15 +16294,15 @@ func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req // ModifyImageAttribute API operation for Amazon Elastic Compute Cloud. // // Modifies the specified attribute of the specified AMI. You can specify only -// one attribute at a time. +// one attribute at a time. You can use the Attribute parameter to specify the +// attribute or one of the following parameters: Description, LaunchPermission, +// or ProductCode. // // AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace // product code cannot be made public. // -// The SriovNetSupport enhanced networking attribute cannot be changed using -// this command. Instead, enable SriovNetSupport on an instance and create an -// AMI from the instance. This will result in an image with SriovNetSupport -// enabled. +// To enable the SriovNetSupport enhanced networking attribute of an image, +// enable SriovNetSupport on an instance and create an AMI from the instance. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -16242,9 +16627,9 @@ func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput // ModifyReservedInstances API operation for Amazon Elastic Compute Cloud. // // Modifies the Availability Zone, instance count, instance type, or network -// platform (EC2-Classic or EC2-VPC) of your Standard Reserved Instances. The -// Reserved Instances to be modified must be identical, except for Availability -// Zone, network platform, and instance type. +// platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved +// Instances to be modified must be identical, except for Availability Zone, +// network platform, and instance type. // // For more information, see Modifying Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -16845,9 +17230,10 @@ func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *requ // ModifyVpcEndpoint API operation for Amazon Elastic Compute Cloud. // -// Modifies attributes of a specified VPC endpoint. You can modify the policy -// associated with the endpoint, and you can add and remove route tables associated -// with the endpoint. +// Modifies attributes of a specified VPC endpoint. The attributes that you +// can modify depend on the type of VPC endpoint (interface or gateway). For +// more information, see VPC Endpoints (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html) +// in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -16970,6 +17356,89 @@ func (c *EC2) ModifyVpcPeeringConnectionOptionsWithContext(ctx aws.Context, inpu return out, req.Send() } +const opModifyVpcTenancy = "ModifyVpcTenancy" + +// ModifyVpcTenancyRequest generates a "aws/request.Request" representing the +// client's request for the ModifyVpcTenancy operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyVpcTenancy for more information on using the ModifyVpcTenancy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyVpcTenancyRequest method. +// req, resp := client.ModifyVpcTenancyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancy +func (c *EC2) ModifyVpcTenancyRequest(input *ModifyVpcTenancyInput) (req *request.Request, output *ModifyVpcTenancyOutput) { + op := &request.Operation{ + Name: opModifyVpcTenancy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyVpcTenancyInput{} + } + + output = &ModifyVpcTenancyOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyVpcTenancy API operation for Amazon Elastic Compute Cloud. +// +// Modifies the instance tenancy attribute of the specified VPC. You can change +// the instance tenancy attribute of a VPC to default only. You cannot change +// the instance tenancy attribute to dedicated. +// +// After you modify the tenancy of the VPC, any new instances that you launch +// into the VPC have a tenancy of default, unless you specify otherwise during +// launch. The tenancy of any existing instances in the VPC is not affected. +// +// For more information about Dedicated Instances, see Dedicated Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) +// in the Amazon Elastic Compute Cloud User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyVpcTenancy for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancy +func (c *EC2) ModifyVpcTenancy(input *ModifyVpcTenancyInput) (*ModifyVpcTenancyOutput, error) { + req, out := c.ModifyVpcTenancyRequest(input) + return out, req.Send() +} + +// ModifyVpcTenancyWithContext is the same as ModifyVpcTenancy with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyVpcTenancy for details on how to use this API operation. +// +// 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 *EC2) ModifyVpcTenancyWithContext(ctx aws.Context, input *ModifyVpcTenancyInput, opts ...request.Option) (*ModifyVpcTenancyOutput, error) { + req, out := c.ModifyVpcTenancyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opMonitorInstances = "MonitorInstances" // MonitorInstancesRequest generates a "aws/request.Request" representing the @@ -18465,6 +18934,81 @@ func (c *EC2) RequestSpotInstancesWithContext(ctx aws.Context, input *RequestSpo return out, req.Send() } +const opResetFpgaImageAttribute = "ResetFpgaImageAttribute" + +// ResetFpgaImageAttributeRequest generates a "aws/request.Request" representing the +// client's request for the ResetFpgaImageAttribute operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResetFpgaImageAttribute for more information on using the ResetFpgaImageAttribute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResetFpgaImageAttributeRequest method. +// req, resp := client.ResetFpgaImageAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttribute +func (c *EC2) ResetFpgaImageAttributeRequest(input *ResetFpgaImageAttributeInput) (req *request.Request, output *ResetFpgaImageAttributeOutput) { + op := &request.Operation{ + Name: opResetFpgaImageAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResetFpgaImageAttributeInput{} + } + + output = &ResetFpgaImageAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetFpgaImageAttribute API operation for Amazon Elastic Compute Cloud. +// +// Resets the specified attribute of the specified Amazon FPGA Image (AFI) to +// its default value. You can only reset the load permission attribute. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ResetFpgaImageAttribute for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttribute +func (c *EC2) ResetFpgaImageAttribute(input *ResetFpgaImageAttributeInput) (*ResetFpgaImageAttributeOutput, error) { + req, out := c.ResetFpgaImageAttributeRequest(input) + return out, req.Send() +} + +// ResetFpgaImageAttributeWithContext is the same as ResetFpgaImageAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See ResetFpgaImageAttribute for details on how to use this API operation. +// +// 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 *EC2) ResetFpgaImageAttributeWithContext(ctx aws.Context, input *ResetFpgaImageAttributeInput, opts ...request.Option) (*ResetFpgaImageAttributeOutput, error) { + req, out := c.ResetFpgaImageAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opResetImageAttribute = "ResetImageAttribute" // ResetImageAttributeRequest generates a "aws/request.Request" representing the @@ -19115,8 +19659,8 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques // not subscribed, the request fails. // // To ensure faster instance launches, break up large requests into smaller -// batches. For example, create 5 separate launch requests for 100 instances -// each instead of 1 launch request for 500 instances. +// batches. For example, create five separate launch requests for 100 instances +// each instead of one launch request for 500 instances. // // An instance is ready for you to use when it's in the running state. You can // check the state of your instance using DescribeInstances. You can tag instances @@ -19290,16 +19834,20 @@ func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Re // StartInstances API operation for Amazon Elastic Compute Cloud. // -// Starts an Amazon EBS-backed AMI that you've previously stopped. +// Starts an Amazon EBS-backed instance that you've previously stopped. // // Instances that use Amazon EBS volumes as their root devices can be quickly // stopped and started. When an instance is stopped, the compute resources are -// released and you are not billed for hourly instance usage. However, your -// root partition Amazon EBS volume remains, continues to persist your data, -// and you are charged for Amazon EBS volume usage. You can restart your instance -// at any time. Each time you transition an instance from stopped to started, -// Amazon EC2 charges a full instance hour, even if transitions happen multiple -// times within a single hour. +// released and you are not billed for instance usage. However, your root partition +// Amazon EBS volume remains and continues to persist your data, and you are +// charged for Amazon EBS volume usage. You can restart your instance at any +// time. Every time you start your Windows instance, Amazon EC2 charges you +// for a full instance hour. If you stop and restart your Windows instance, +// a new instance hour begins and Amazon EC2 charges you for another full instance +// hour even if you are still within the same 60-minute period when it was stopped. +// Every time you start your Linux instance, Amazon EC2 charges a one-minute +// minimum for instance usage, and thereafter charges per second for instance +// usage. // // Before stopping an instance, make sure it is in a state from which it can // be restarted. Stopping an instance does not preserve data stored in RAM. @@ -19384,14 +19932,17 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ // // Stops an Amazon EBS-backed instance. // -// We don't charge hourly usage for a stopped instance, or data transfer fees; -// however, your root partition Amazon EBS volume remains, continues to persist -// your data, and you are charged for Amazon EBS volume usage. Each time you -// transition an instance from stopped to started, Amazon EC2 charges a full -// instance hour, even if transitions happen multiple times within a single -// hour. +// We don't charge usage for a stopped instance, or data transfer fees; however, +// your root partition Amazon EBS volume remains and continues to persist your +// data, and you are charged for Amazon EBS volume usage. Every time you start +// your Windows instance, Amazon EC2 charges you for a full instance hour. If +// you stop and restart your Windows instance, a new instance hour begins and +// Amazon EC2 charges you for another full instance hour even if you are still +// within the same 60-minute period when it was stopped. Every time you start +// your Linux instance, Amazon EC2 charges a one-minute minimum for instance +// usage, and thereafter charges per second for instance usage. // -// You can't start or stop Spot instances, and you can't stop instance store-backed +// You can't start or stop Spot Instances, and you can't stop instance store-backed // instances. // // When you stop an instance, we shut it down. You can restart your instance @@ -19936,14 +20487,14 @@ type AcceptReservedInstancesExchangeQuoteInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The IDs of the Convertible Reserved Instances to exchange for other Convertible - // Reserved Instances of the same or higher value. + // The IDs of the Convertible Reserved Instances to exchange for another Convertible + // Reserved Instance of the same or higher value. // // ReservedInstanceIds is a required field ReservedInstanceIds []*string `locationName:"ReservedInstanceId" locationNameList:"ReservedInstanceId" type:"list" required:"true"` - // The configurations of the Convertible Reserved Instance offerings that you - // are purchasing in this exchange. + // The configuration of the target Convertible Reserved Instance to exchange + // for your current Convertible Reserved Instances. TargetConfigurations []*TargetConfigurationRequest `locationName:"TargetConfiguration" locationNameList:"TargetConfigurationRequest" type:"list"` } @@ -21537,7 +22088,7 @@ func (s *AttachNetworkInterfaceOutput) SetAttachmentId(v string) *AttachNetworkI type AttachVolumeInput struct { _ struct{} `type:"structure"` - // The device name to expose to the instance (for example, /dev/sdh or xvdh). + // The device name (for example, /dev/sdh or xvdh). // // Device is a required field Device *string `type:"string" required:"true"` @@ -21759,8 +22310,7 @@ func (s *AttributeValue) SetValue(v string) *AttributeValue { type AuthorizeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` - // The CIDR IPv4 address range. We recommend that you specify the CIDR range - // in a set of IP permissions instead. + // Not supported. Use a set of IP permissions to specify the CIDR. CidrIp *string `locationName:"cidrIp" type:"string"` // Checks whether you have the required permissions for the action, without @@ -21769,8 +22319,7 @@ type AuthorizeSecurityGroupEgressInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The start of port range for the TCP and UDP protocols, or an ICMP type number. - // We recommend that you specify the port range in a set of IP permissions instead. + // Not supported. Use a set of IP permissions to specify the port. FromPort *int64 `locationName:"fromPort" type:"integer"` // The ID of the security group. @@ -21778,26 +22327,23 @@ type AuthorizeSecurityGroupEgressInput struct { // GroupId is a required field GroupId *string `locationName:"groupId" type:"string" required:"true"` - // A set of IP permissions. You can't specify a destination security group and - // a CIDR IP address range. + // One or more sets of IP permissions. You can't specify a destination security + // group and a CIDR IP address range in the same set of permissions. IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` - // The IP protocol name or number. We recommend that you specify the protocol - // in a set of IP permissions instead. + // Not supported. Use a set of IP permissions to specify the protocol name or + // number. IpProtocol *string `locationName:"ipProtocol" type:"string"` - // The name of a destination security group. To authorize outbound access to - // a destination security group, we recommend that you use a set of IP permissions - // instead. + // Not supported. Use a set of IP permissions to specify a destination security + // group. SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` - // The AWS account number for a destination security group. To authorize outbound - // access to a destination security group, we recommend that you use a set of - // IP permissions instead. + // Not supported. Use a set of IP permissions to specify a destination security + // group. SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` - // The end of port range for the TCP and UDP protocols, or an ICMP type number. - // We recommend that you specify the port range in a set of IP permissions instead. + // Not supported. Use a set of IP permissions to specify the port. ToPort *int64 `locationName:"toPort" type:"integer"` } @@ -21922,8 +22468,8 @@ type AuthorizeSecurityGroupIngressInput struct { // either the security group ID or the security group name in the request. GroupName *string `type:"string"` - // A set of IP permissions. Can be used to specify multiple rules in a single - // command. + // One or more sets of IP permissions. Can be used to specify multiple rules + // in a single command. IpPermissions []*IpPermission `locationNameList:"item" type:"list"` // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). @@ -21943,8 +22489,8 @@ type AuthorizeSecurityGroupIngressInput struct { // be in the same VPC. SourceSecurityGroupName *string `type:"string"` - // [EC2-Classic] The AWS account number for the source security group, if the - // source security group is in a different account. You can't specify this parameter + // [EC2-Classic] The AWS account ID for the source security group, if the source + // security group is in a different account. You can't specify this parameter // in combination with the following parameters: the CIDR IP address range, // the IP protocol, the start of the port range, and the end of the port range. // Creates rules that grant full ICMP, UDP, and TCP access. To create a rule @@ -22182,7 +22728,7 @@ func (s *BlobAttributeValue) SetValue(v []byte) *BlobAttributeValue { type BlockDeviceMapping struct { _ struct{} `type:"structure"` - // The device name exposed to the instance (for example, /dev/sdh or xvdh). + // The device name (for example, /dev/sdh or xvdh). DeviceName *string `locationName:"deviceName" type:"string"` // Parameters used to automatically set up EBS volumes when the instance is @@ -23271,6 +23817,100 @@ func (s *ClassicLinkInstance) SetVpcId(v string) *ClassicLinkInstance { return s } +// Describes a Classic Load Balancer. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClassicLoadBalancer +type ClassicLoadBalancer struct { + _ struct{} `type:"structure"` + + // The name of the load balancer. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s ClassicLoadBalancer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClassicLoadBalancer) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ClassicLoadBalancer) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancer"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *ClassicLoadBalancer) SetName(v string) *ClassicLoadBalancer { + s.Name = &v + return s +} + +// Describes the Classic Load Balancers to attach to a Spot fleet. Spot fleet +// registers the running Spot instances with these Classic Load Balancers. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClassicLoadBalancersConfig +type ClassicLoadBalancersConfig struct { + _ struct{} `type:"structure"` + + // One or more Classic Load Balancers. + // + // ClassicLoadBalancers is a required field + ClassicLoadBalancers []*ClassicLoadBalancer `locationName:"classicLoadBalancers" locationNameList:"item" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s ClassicLoadBalancersConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClassicLoadBalancersConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ClassicLoadBalancersConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancersConfig"} + if s.ClassicLoadBalancers == nil { + invalidParams.Add(request.NewErrParamRequired("ClassicLoadBalancers")) + } + if s.ClassicLoadBalancers != nil && len(s.ClassicLoadBalancers) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClassicLoadBalancers", 1)) + } + if s.ClassicLoadBalancers != nil { + for i, v := range s.ClassicLoadBalancers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ClassicLoadBalancers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClassicLoadBalancers sets the ClassicLoadBalancers field's value. +func (s *ClassicLoadBalancersConfig) SetClassicLoadBalancers(v []*ClassicLoadBalancer) *ClassicLoadBalancersConfig { + s.ClassicLoadBalancers = v + return s +} + // Describes the client-specific data. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClientData type ClientData struct { @@ -23511,6 +24151,123 @@ func (s *ConversionTask) SetTags(v []*Tag) *ConversionTask { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImageRequest +type CopyFpgaImageInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` + + // The description for the new AFI. + Description *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The name for the new AFI. The default is the name of the source AFI. + Name *string `type:"string"` + + // The ID of the source AFI. + // + // SourceFpgaImageId is a required field + SourceFpgaImageId *string `type:"string" required:"true"` + + // The region that contains the source AFI. + // + // SourceRegion is a required field + SourceRegion *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CopyFpgaImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyFpgaImageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyFpgaImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyFpgaImageInput"} + if s.SourceFpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("SourceFpgaImageId")) + } + if s.SourceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceRegion")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CopyFpgaImageInput) SetClientToken(v string) *CopyFpgaImageInput { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CopyFpgaImageInput) SetDescription(v string) *CopyFpgaImageInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CopyFpgaImageInput) SetDryRun(v bool) *CopyFpgaImageInput { + s.DryRun = &v + return s +} + +// SetName sets the Name field's value. +func (s *CopyFpgaImageInput) SetName(v string) *CopyFpgaImageInput { + s.Name = &v + return s +} + +// SetSourceFpgaImageId sets the SourceFpgaImageId field's value. +func (s *CopyFpgaImageInput) SetSourceFpgaImageId(v string) *CopyFpgaImageInput { + s.SourceFpgaImageId = &v + return s +} + +// SetSourceRegion sets the SourceRegion field's value. +func (s *CopyFpgaImageInput) SetSourceRegion(v string) *CopyFpgaImageInput { + s.SourceRegion = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImageResult +type CopyFpgaImageOutput struct { + _ struct{} `type:"structure"` + + // The ID of the new AFI. + FpgaImageId *string `locationName:"fpgaImageId" type:"string"` +} + +// String returns the string representation +func (s CopyFpgaImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyFpgaImageOutput) GoString() string { + return s.String() +} + +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *CopyFpgaImageOutput) SetFpgaImageId(v string) *CopyFpgaImageOutput { + s.FpgaImageId = &v + return s +} + // Contains the parameters for CopyImage. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImageRequest type CopyImageInput struct { @@ -23940,6 +24697,81 @@ func (s *CreateCustomerGatewayOutput) SetCustomerGateway(v *CustomerGateway) *Cr return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnetRequest +type CreateDefaultSubnetInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to create the default subnet. + // + // AvailabilityZone is a required field + AvailabilityZone *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s CreateDefaultSubnetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDefaultSubnetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDefaultSubnetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDefaultSubnetInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDefaultSubnetInput) SetAvailabilityZone(v string) *CreateDefaultSubnetInput { + s.AvailabilityZone = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateDefaultSubnetInput) SetDryRun(v bool) *CreateDefaultSubnetInput { + s.DryRun = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnetResult +type CreateDefaultSubnetOutput struct { + _ struct{} `type:"structure"` + + // Information about the subnet. + Subnet *Subnet `locationName:"subnet" type:"structure"` +} + +// String returns the string representation +func (s CreateDefaultSubnetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDefaultSubnetOutput) GoString() string { + return s.String() +} + +// SetSubnet sets the Subnet field's value. +func (s *CreateDefaultSubnetOutput) SetSubnet(v *Subnet) *CreateDefaultSubnetOutput { + s.Subnet = v + return s +} + // Contains the parameters for CreateDefaultVpc. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcRequest type CreateDefaultVpcInput struct { @@ -26547,20 +27379,47 @@ type CreateVpcEndpointInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // A policy to attach to the endpoint that controls access to the service. The - // policy must be in valid JSON format. If this parameter is not specified, - // we attach a default policy that allows full access to the service. + // (Gateway endpoint) A policy to attach to the endpoint that controls access + // to the service. The policy must be in valid JSON format. If this parameter + // is not specified, we attach a default policy that allows full access to the + // service. PolicyDocument *string `type:"string"` - // One or more route table IDs. + // (Interface endpoint) Indicate whether to associate a private hosted zone + // with the specified VPC. The private hosted zone contains a record set for + // the default public DNS name for the service for the region (for example, + // kinesis.us-east-1.amazonaws.com) which resolves to the private IP addresses + // of the endpoint network interfaces in the VPC. This enables you to make requests + // to the default public DNS name for the service instead of the public DNS + // names that are automatically generated by the VPC endpoint service. + // + // To use a private hosted zone, you must set the following VPC attributes to + // true: enableDnsHostnames and enableDnsSupport. Use ModifyVpcAttribute to + // set the VPC attributes. + // + // Default: true + PrivateDnsEnabled *bool `type:"boolean"` + + // (Gateway endpoint) One or more route table IDs. RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` + // (Interface endpoint) The ID of one or more security groups to associate with + // the network interface. + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` + // The AWS service name, in the form com.amazonaws.region.service. To get a // list of available services, use the DescribeVpcEndpointServices request. // // ServiceName is a required field ServiceName *string `type:"string" required:"true"` + // (Interface endpoint) The ID of one or more subnets in which to create a network + // interface for the endpoint. + SubnetIds []*string `locationName:"SubnetId" locationNameList:"item" type:"list"` + + // The type of endpoint. If not specified, the default is a gateway endpoint. + VpcEndpointType *string `type:"string" enum:"VpcEndpointType"` + // The ID of the VPC in which the endpoint will be used. // // VpcId is a required field @@ -26611,18 +27470,42 @@ func (s *CreateVpcEndpointInput) SetPolicyDocument(v string) *CreateVpcEndpointI return s } +// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. +func (s *CreateVpcEndpointInput) SetPrivateDnsEnabled(v bool) *CreateVpcEndpointInput { + s.PrivateDnsEnabled = &v + return s +} + // SetRouteTableIds sets the RouteTableIds field's value. func (s *CreateVpcEndpointInput) SetRouteTableIds(v []*string) *CreateVpcEndpointInput { s.RouteTableIds = v return s } +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateVpcEndpointInput) SetSecurityGroupIds(v []*string) *CreateVpcEndpointInput { + s.SecurityGroupIds = v + return s +} + // SetServiceName sets the ServiceName field's value. func (s *CreateVpcEndpointInput) SetServiceName(v string) *CreateVpcEndpointInput { s.ServiceName = &v return s } +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateVpcEndpointInput) SetSubnetIds(v []*string) *CreateVpcEndpointInput { + s.SubnetIds = v + return s +} + +// SetVpcEndpointType sets the VpcEndpointType field's value. +func (s *CreateVpcEndpointInput) SetVpcEndpointType(v string) *CreateVpcEndpointInput { + s.VpcEndpointType = &v + return s +} + // SetVpcId sets the VpcId field's value. func (s *CreateVpcEndpointInput) SetVpcId(v string) *CreateVpcEndpointInput { s.VpcId = &v @@ -26868,11 +27751,7 @@ type CreateVpnConnectionInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Indicates whether the VPN connection requires static routes. If you are creating - // a VPN connection for a device that does not support BGP, you must specify - // true. - // - // Default: false + // The options for the VPN connection. Options *VpnConnectionOptionsSpecification `locationName:"options" type:"structure"` // The type of VPN connection (ipsec.1). @@ -27044,6 +27923,13 @@ func (s CreateVpnConnectionRouteOutput) GoString() string { type CreateVpnGatewayInput struct { _ struct{} `type:"structure"` + // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. + // If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If + // you're using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range. + // + // Default: 64512 + AmazonSideAsn *int64 `type:"long"` + // The Availability Zone for the virtual private gateway. AvailabilityZone *string `type:"string"` @@ -27082,6 +27968,12 @@ func (s *CreateVpnGatewayInput) Validate() error { return nil } +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *CreateVpnGatewayInput) SetAmazonSideAsn(v int64) *CreateVpnGatewayInput { + s.AmazonSideAsn = &v + return s +} + // SetAvailabilityZone sets the AvailabilityZone field's value. func (s *CreateVpnGatewayInput) SetAvailabilityZone(v string) *CreateVpnGatewayInput { s.AvailabilityZone = &v @@ -27471,6 +28363,81 @@ func (s *DeleteFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteFlo return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImageRequest +type DeleteFpgaImageInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the AFI. + // + // FpgaImageId is a required field + FpgaImageId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFpgaImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFpgaImageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFpgaImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFpgaImageInput"} + if s.FpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteFpgaImageInput) SetDryRun(v bool) *DeleteFpgaImageInput { + s.DryRun = &v + return s +} + +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *DeleteFpgaImageInput) SetFpgaImageId(v string) *DeleteFpgaImageInput { + s.FpgaImageId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImageResult +type DeleteFpgaImageOutput struct { + _ struct{} `type:"structure"` + + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s DeleteFpgaImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFpgaImageOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *DeleteFpgaImageOutput) SetReturn(v bool) *DeleteFpgaImageOutput { + s.Return = &v + return s +} + // Contains the parameters for DeleteInternetGateway. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGatewayRequest type DeleteInternetGatewayInput struct { @@ -29983,7 +30950,7 @@ type DescribeElasticGpusOutput struct { _ struct{} `type:"structure"` // Information about the Elastic GPUs. - ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" type:"list"` + ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" locationNameList:"item" type:"list"` // The total number of items to return. If the total number of items available // is more than the value specified in max-items then a Next-Token will be provided @@ -30174,6 +31141,95 @@ func (s *DescribeFlowLogsOutput) SetNextToken(v string) *DescribeFlowLogsOutput return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttributeRequest +type DescribeFpgaImageAttributeInput struct { + _ struct{} `type:"structure"` + + // The AFI attribute. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"FpgaImageAttributeName"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the AFI. + // + // FpgaImageId is a required field + FpgaImageId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeFpgaImageAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFpgaImageAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFpgaImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImageAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.FpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *DescribeFpgaImageAttributeInput) SetAttribute(v string) *DescribeFpgaImageAttributeInput { + s.Attribute = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeFpgaImageAttributeInput) SetDryRun(v bool) *DescribeFpgaImageAttributeInput { + s.DryRun = &v + return s +} + +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *DescribeFpgaImageAttributeInput) SetFpgaImageId(v string) *DescribeFpgaImageAttributeInput { + s.FpgaImageId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttributeResult +type DescribeFpgaImageAttributeOutput struct { + _ struct{} `type:"structure"` + + // Information about the attribute. + FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"` +} + +// String returns the string representation +func (s DescribeFpgaImageAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFpgaImageAttributeOutput) GoString() string { + return s.String() +} + +// SetFpgaImageAttribute sets the FpgaImageAttribute field's value. +func (s *DescribeFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *DescribeFpgaImageAttributeOutput { + s.FpgaImageAttribute = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesRequest type DescribeFpgaImagesInput struct { _ struct{} `type:"structure"` @@ -30425,7 +31481,7 @@ type DescribeHostReservationOfferingsOutput struct { NextToken *string `locationName:"nextToken" type:"string"` // Information about the offerings. - OfferingSet []*HostOffering `locationName:"offeringSet" type:"list"` + OfferingSet []*HostOffering `locationName:"offeringSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -31065,8 +32121,8 @@ type DescribeImagesInput struct { // * block-device-mapping.delete-on-termination - A Boolean value that indicates // whether the Amazon EBS volume is deleted on instance termination. // - // * block-device-mapping.device-name - The device name for the EBS volume - // (for example, /dev/sdh). + // * block-device-mapping.device-name - The device name specified in the + // block device mapping (for example, /dev/sdh or xvdh). // // * block-device-mapping.snapshot-id - The ID of the snapshot used for the // EBS volume. @@ -31110,7 +32166,7 @@ type DescribeImagesInput struct { // // * ramdisk-id - The RAM disk ID. // - // * root-device-name - The name of the root device volume (for example, + // * root-device-name - The device name of the root device volume (for example, // /dev/sda1). // // * root-device-type - The type of the root device volume (ebs | instance-store). @@ -31121,6 +32177,9 @@ type DescribeImagesInput struct { // // * state-reason-message - The message for the state change. // + // * sriov-net-support - A value of simple indicates that enhanced networking + // with the Intel 82599 VF interface is enabled. + // // * tag:key=value - The key/value combination of a tag assigned to the resource. // Specify the key of the tag in the filter name and the value of the tag // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose @@ -31500,7 +32559,7 @@ type DescribeInstanceAttributeOutput struct { // EC2 console, CLI, or API; otherwise, you can. DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` - // Indicates whether the instance is optimized for EBS I/O. + // Indicates whether the instance is optimized for Amazon EBS I/O. EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` // Indicates whether enhanced networking with ENA is enabled. @@ -31528,12 +32587,12 @@ type DescribeInstanceAttributeOutput struct { // The RAM disk ID. RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` - // The name of the root device (for example, /dev/sda1 or /dev/xvda). + // The device name of the root device volume (for example, /dev/sda1). RootDeviceName *AttributeValue `locationName:"rootDeviceName" type:"structure"` // Indicates whether source/destination checking is enabled. A value of true - // means checking is enabled, and false means checking is disabled. This value - // must be false for a NAT instance to perform NAT. + // means that checking is enabled, and false means that checking is disabled. + // This value must be false for a NAT instance to perform NAT. SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` // Indicates whether enhanced networking with the Intel 82599 Virtual Function @@ -31822,8 +32881,8 @@ type DescribeInstancesInput struct { // * block-device-mapping.delete-on-termination - A Boolean that indicates // whether the EBS volume is deleted on instance termination. // - // * block-device-mapping.device-name - The device name for the EBS volume - // (for example, /dev/sdh or xvdh). + // * block-device-mapping.device-name - The device name specified in the + // block device mapping (for example, /dev/sdh or xvdh). // // * block-device-mapping.status - The status for the EBS volume (attaching // | attached | detaching | detached). @@ -31964,10 +33023,10 @@ type DescribeInstancesInput struct { // | in-use). // // * network-interface.source-dest-check - Whether the network interface - // performs source/destination checking. A value of true means checking is - // enabled, and false means checking is disabled. The value must be false - // for the network interface to perform network address translation (NAT) - // in your VPC. + // performs source/destination checking. A value of true means that checking + // is enabled, and false means that checking is disabled. The value must + // be false for the network interface to perform network address translation + // (NAT) in your VPC. // // * network-interface.subnet-id - The ID of the subnet for the network interface. // @@ -32002,22 +33061,21 @@ type DescribeInstancesInput struct { // ID is created any time you launch an instance. A reservation ID has a // one-to-one relationship with an instance launch request, but can be associated // with more than one instance if you launch multiple instances using the - // same launch request. For example, if you launch one instance, you'll get + // same launch request. For example, if you launch one instance, you get // one reservation ID. If you launch ten instances using the same launch - // request, you'll also get one reservation ID. + // request, you also get one reservation ID. // - // * root-device-name - The name of the root device for the instance (for - // example, /dev/sda1 or /dev/xvda). + // * root-device-name - The device name of the root device volume (for example, + // /dev/sda1). // - // * root-device-type - The type of root device that the instance uses (ebs - // | instance-store). + // * root-device-type - The type of the root device volume (ebs | instance-store). // // * source-dest-check - Indicates whether the instance performs source/destination // checking. A value of true means that checking is enabled, and false means - // checking is disabled. The value must be false for the instance to perform - // network address translation (NAT) in your VPC. + // that checking is disabled. The value must be false for the instance to + // perform network address translation (NAT) in your VPC. // - // * spot-instance-request-id - The ID of the Spot instance request. + // * spot-instance-request-id - The ID of the Spot Instance request. // // * state-reason-code - The reason code for the state change. // @@ -32034,9 +33092,8 @@ type DescribeInstancesInput struct { // independent of the tag-value filter. For example, if you use both the // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. + // is), and the tag value X (regardless of the tag's key). If you want to + // list only resources where Purpose is X, see the tag:key=value filter. // // * tag-value - The value of a tag assigned to the resource. This filter // is independent of the tag-key filter. @@ -32433,6 +33490,22 @@ type DescribeNatGatewaysInput struct { // // * subnet-id - The ID of the subnet in which the NAT gateway resides. // + // * tag:key=value - The key/value combination of a tag assigned to the resource. + // Specify the key of the tag in the filter name and the value of the tag + // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose + // for the filter name and X for the filter value. + // + // * tag-key - The key of a tag assigned to the resource. This filter is + // independent of the tag-value filter. For example, if you use both the + // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources + // assigned both the tag key Purpose (regardless of what the tag's value + // is), and the tag value X (regardless of what the tag's key is). If you + // want to list only resources where Purpose is X, see the tag:key=value + // filter. + // + // * tag-value - The value of a tag assigned to the resource. This filter + // is independent of the tag-key filter. + // // * vpc-id - The ID of the VPC in which the NAT gateway resides. Filter []*Filter `locationNameList:"Filter" type:"list"` @@ -34408,36 +35481,63 @@ type DescribeSecurityGroupsInput struct { // // * description - The description of the security group. // + // * egress.ip-permission.cidr - An IPv4 CIDR block for an outbound security + // group rule. + // + // * egress.ip-permission.from-port - For an outbound rule, the start of + // port range for the TCP and UDP protocols, or an ICMP type number. + // + // * egress.ip-permission.group-id - The ID of a security group that has + // been referenced in an outbound security group rule. + // + // * egress.ip-permission.group-name - The name of a security group that + // has been referenced in an outbound security group rule. + // + // * egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound + // security group rule. + // // * egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service - // to which the security group allows access. + // to which a security group rule allows outbound access. + // + // * egress.ip-permission.protocol - The IP protocol for an outbound security + // group rule (tcp | udp | icmp or a protocol number). + // + // * egress.ip-permission.to-port - For an outbound rule, the end of port + // range for the TCP and UDP protocols, or an ICMP code. + // + // * egress.ip-permission.user-id - The ID of an AWS account that has been + // referenced in an outbound security group rule. // // * group-id - The ID of the security group. // // * group-name - The name of the security group. // - // * ip-permission.cidr - An IPv4 CIDR range that has been granted permission - // in a security group rule. + // * ip-permission.cidr - An IPv4 CIDR block for an inbound security group + // rule. // - // * ip-permission.from-port - The start of port range for the TCP and UDP - // protocols, or an ICMP type number. + // * ip-permission.from-port - For an inbound rule, the start of port range + // for the TCP and UDP protocols, or an ICMP type number. // - // * ip-permission.group-id - The ID of a security group that has been granted - // permission. + // * ip-permission.group-id - The ID of a security group that has been referenced + // in an inbound security group rule. // // * ip-permission.group-name - The name of a security group that has been - // granted permission. + // referenced in an inbound security group rule. // - // * ip-permission.ipv6-cidr - An IPv6 CIDR range that has been granted permission - // in a security group rule. + // * ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security + // group rule. // - // * ip-permission.protocol - The IP protocol for the permission (tcp | udp - // | icmp or a protocol number). + // * ip-permission.prefix-list-id - The ID (prefix) of the AWS service from + // which a security group rule allows inbound access. // - // * ip-permission.to-port - The end of port range for the TCP and UDP protocols, - // or an ICMP code. + // * ip-permission.protocol - The IP protocol for an inbound security group + // rule (tcp | udp | icmp or a protocol number). // - // * ip-permission.user-id - The ID of an AWS account that has been granted - // permission. + // * ip-permission.to-port - For an inbound rule, the end of port range for + // the TCP and UDP protocols, or an ICMP code. + // + // * ip-permission.user-id - The ID of an AWS account that has been referenced + // in an inbound security group rule. // // * owner-id - The AWS account ID of the owner of the security group. // @@ -34461,6 +35561,14 @@ type DescribeSecurityGroupsInput struct { // // Default: Describes all your security groups. GroupNames []*string `locationName:"GroupName" locationNameList:"GroupName" type:"list"` + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another request with the returned NextToken value. + // This value can be between 5 and 1000. + MaxResults *int64 `type:"integer"` + + // The token to request the next page of results. + NextToken *string `type:"string"` } // String returns the string representation @@ -34497,11 +35605,27 @@ func (s *DescribeSecurityGroupsInput) SetGroupNames(v []*string) *DescribeSecuri return s } +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSecurityGroupsInput) SetMaxResults(v int64) *DescribeSecurityGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSecurityGroupsInput) SetNextToken(v string) *DescribeSecurityGroupsInput { + s.NextToken = &v + return s +} + // Contains the output of DescribeSecurityGroups. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupsResult type DescribeSecurityGroupsOutput struct { _ struct{} `type:"structure"` + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + // Information about one or more security groups. SecurityGroups []*SecurityGroup `locationName:"securityGroupInfo" locationNameList:"item" type:"list"` } @@ -34516,6 +35640,12 @@ func (s DescribeSecurityGroupsOutput) GoString() string { return s.String() } +// SetNextToken sets the NextToken field's value. +func (s *DescribeSecurityGroupsOutput) SetNextToken(v string) *DescribeSecurityGroupsOutput { + s.NextToken = &v + return s +} + // SetSecurityGroups sets the SecurityGroups field's value. func (s *DescribeSecurityGroupsOutput) SetSecurityGroups(v []*SecurityGroup) *DescribeSecurityGroupsOutput { s.SecurityGroups = v @@ -35264,20 +36394,20 @@ type DescribeSpotInstanceRequestsInput struct { // * launch-group - The Spot instance launch group. // // * launch.block-device-mapping.delete-on-termination - Indicates whether - // the Amazon EBS volume is deleted on instance termination. + // the EBS volume is deleted on instance termination. // - // * launch.block-device-mapping.device-name - The device name for the Amazon - // EBS volume (for example, /dev/sdh). + // * launch.block-device-mapping.device-name - The device name for the volume + // in the block device mapping (for example, /dev/sdh or xvdh). // - // * launch.block-device-mapping.snapshot-id - The ID of the snapshot used - // for the Amazon EBS volume. + // * launch.block-device-mapping.snapshot-id - The ID of the snapshot for + // the EBS volume. // - // * launch.block-device-mapping.volume-size - The size of the Amazon EBS - // volume, in GiB. + // * launch.block-device-mapping.volume-size - The size of the EBS volume, + // in GiB. // - // * launch.block-device-mapping.volume-type - The type of the Amazon EBS - // volume: gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 - // for Throughput Optimized HDD, sc1for Cold HDD, or standard for Magnetic. + // * launch.block-device-mapping.volume-type - The type of EBS volume: gp2 + // for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput + // Optimized HDD, sc1for Cold HDD, or standard for Magnetic. // // * launch.group-id - The security group for the instance. // @@ -35289,34 +36419,34 @@ type DescribeSpotInstanceRequestsInput struct { // // * launch.key-name - The name of the key pair the instance launched with. // - // * launch.monitoring-enabled - Whether monitoring is enabled for the Spot - // instance. + // * launch.monitoring-enabled - Whether detailed monitoring is enabled for + // the Spot instance. // // * launch.ramdisk-id - The RAM disk ID. // - // * network-interface.network-interface-id - The ID of the network interface. + // * launched-availability-zone - The Availability Zone in which the bid + // is launched. // - // * network-interface.device-index - The index of the device for the network - // interface attachment on the instance. - // - // * network-interface.subnet-id - The ID of the subnet for the instance. - // - // * network-interface.description - A description of the network interface. - // - // * network-interface.private-ip-address - The primary private IP address - // of the network interface. + // * network-interface.addresses.primary - Indicates whether the IP address + // is the primary private IP address. // // * network-interface.delete-on-termination - Indicates whether the network // interface is deleted when the instance is terminated. // + // * network-interface.description - A description of the network interface. + // + // * network-interface.device-index - The index of the device for the network + // interface attachment on the instance. + // // * network-interface.group-id - The ID of the security group associated // with the network interface. // - // * network-interface.group-name - The name of the security group associated - // with the network interface. + // * network-interface.network-interface-id - The ID of the network interface. // - // * network-interface.addresses.primary - Indicates whether the IP address - // is the primary private IP address. + // * network-interface.private-ip-address - The primary private IP address + // of the network interface. + // + // * network-interface.subnet-id - The ID of the subnet for the instance. // // * product-description - The product description associated with the instance // (Linux/UNIX | Windows). @@ -35356,9 +36486,6 @@ type DescribeSpotInstanceRequestsInput struct { // // * type - The type of Spot instance request (one-time | persistent). // - // * launched-availability-zone - The Availability Zone in which the bid - // is launched. - // // * valid-from - The start date of the request. // // * valid-until - The end date of the request. @@ -36172,7 +37299,7 @@ type DescribeVolumesInput struct { // * attachment.delete-on-termination - Whether the volume is deleted on // instance termination. // - // * attachment.device - The device name that is exposed to the instance + // * attachment.device - The device name specified in the block device mapping // (for example, /dev/sda1). // // * attachment.instance-id - The ID of the instance the volume is attached @@ -36724,6 +37851,11 @@ type DescribeVpcEndpointServicesInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` + // One or more filters. + // + // * service-name: The name of the service. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The maximum number of items to return for this request. The request returns // a token that you can specify in a subsequent call to get the next set of // results. @@ -36734,6 +37866,9 @@ type DescribeVpcEndpointServicesInput struct { // The token for the next set of items to return. (You received this token from // a prior call.) NextToken *string `type:"string"` + + // One or more service names. + ServiceNames []*string `locationName:"ServiceName" locationNameList:"item" type:"list"` } // String returns the string representation @@ -36752,6 +37887,12 @@ func (s *DescribeVpcEndpointServicesInput) SetDryRun(v bool) *DescribeVpcEndpoin return s } +// SetFilters sets the Filters field's value. +func (s *DescribeVpcEndpointServicesInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicesInput { + s.Filters = v + return s +} + // SetMaxResults sets the MaxResults field's value. func (s *DescribeVpcEndpointServicesInput) SetMaxResults(v int64) *DescribeVpcEndpointServicesInput { s.MaxResults = &v @@ -36764,6 +37905,12 @@ func (s *DescribeVpcEndpointServicesInput) SetNextToken(v string) *DescribeVpcEn return s } +// SetServiceNames sets the ServiceNames field's value. +func (s *DescribeVpcEndpointServicesInput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesInput { + s.ServiceNames = v + return s +} + // Contains the output of DescribeVpcEndpointServices. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicesResult type DescribeVpcEndpointServicesOutput struct { @@ -36773,6 +37920,9 @@ type DescribeVpcEndpointServicesOutput struct { // items to return, the string is empty. NextToken *string `locationName:"nextToken" type:"string"` + // Information about the service. + ServiceDetails []*ServiceDetail `locationName:"serviceDetailSet" locationNameList:"item" type:"list"` + // A list of supported AWS services. ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"` } @@ -36793,6 +37943,12 @@ func (s *DescribeVpcEndpointServicesOutput) SetNextToken(v string) *DescribeVpcE return s } +// SetServiceDetails sets the ServiceDetails field's value. +func (s *DescribeVpcEndpointServicesOutput) SetServiceDetails(v []*ServiceDetail) *DescribeVpcEndpointServicesOutput { + s.ServiceDetails = v + return s +} + // SetServiceNames sets the ServiceNames field's value. func (s *DescribeVpcEndpointServicesOutput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesOutput { s.ServiceNames = v @@ -37275,6 +38431,9 @@ type DescribeVpnGatewaysInput struct { // One or more filters. // + // * amazon-side-asn - The Autonomous System Number (ASN) for the Amazon + // side of the gateway. + // // * attachment.state - The current state of the attachment between the gateway // and the VPC (attaching | attached | detaching | detached). // @@ -38638,6 +39797,40 @@ func (s *DiskImageVolumeDescription) SetSize(v int64) *DiskImageVolumeDescriptio return s } +// Describes a DNS entry. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DnsEntry +type DnsEntry struct { + _ struct{} `type:"structure"` + + // The DNS name. + DnsName *string `locationName:"dnsName" type:"string"` + + // The ID of the private hosted zone. + HostedZoneId *string `locationName:"hostedZoneId" type:"string"` +} + +// String returns the string representation +func (s DnsEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DnsEntry) GoString() string { + return s.String() +} + +// SetDnsName sets the DnsName field's value. +func (s *DnsEntry) SetDnsName(v string) *DnsEntry { + s.DnsName = &v + return s +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *DnsEntry) SetHostedZoneId(v string) *DnsEntry { + s.HostedZoneId = &v + return s +} + // Describes a block device for an EBS volume. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsBlockDevice type EbsBlockDevice struct { @@ -38646,8 +39839,10 @@ type EbsBlockDevice struct { // Indicates whether the EBS volume is deleted on instance termination. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - // Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes - // may only be attached to instances that support Amazon EBS encryption. + // Indicates whether the EBS volume is encrypted. Encrypted volumes can only + // be attached to instances that support Amazon EBS encryption. If you are creating + // a volume from a snapshot, you can't specify an encryption value. This is + // because only blank volumes can be encrypted on creation. Encrypted *bool `locationName:"encrypted" type:"boolean"` // The number of I/O operations per second (IOPS) that the volume supports. @@ -39313,7 +40508,7 @@ type EventInformation struct { // The event. // - // The following are the error events. + // The following are the error events: // // * iamFleetRoleInvalid - The Spot fleet did not have the required permissions // either to launch or terminate an instance. @@ -39328,7 +40523,7 @@ type EventInformation struct { // * spotInstanceCountLimitExceeded - You've reached the limit on the number // of Spot instances that you can launch. // - // The following are the fleetRequestChange events. + // The following are the fleetRequestChange events: // // * active - The Spot fleet has been validated and Amazon EC2 is attempting // to maintain the target number of running Spot instances. @@ -39358,11 +40553,21 @@ type EventInformation struct { // * submitted - The Spot fleet request is being evaluated and Amazon EC2 // is preparing to launch the target number of Spot instances. // - // The following are the instanceChange events. + // The following are the instanceChange events: // // * launched - A bid was fulfilled and a new instance was launched. // // * terminated - An instance was terminated by the user. + // + // The following are the Information events: + // + // * launchSpecUnusable - The bid price of a launch specification is not + // valid because it is below the market price or the market price is above + // the On-Demand price. + // + // * fleetProgressHalted - The bid price of every launch specification is + // not valid. A launch specification might become valid if the market price + // changes. EventSubType *string `locationName:"eventSubType" type:"string"` // The ID of the instance. This information is available only for instanceChange @@ -39747,6 +40952,9 @@ type FpgaImage struct { // The product codes for the AFI. ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + // Indicates whether the AFI is public. + Public *bool `locationName:"public" type:"boolean"` + // The version of the AWS Shell that was used to create the bitstream. ShellVersion *string `locationName:"shellVersion" type:"string"` @@ -39824,6 +41032,12 @@ func (s *FpgaImage) SetProductCodes(v []*ProductCode) *FpgaImage { return s } +// SetPublic sets the Public field's value. +func (s *FpgaImage) SetPublic(v bool) *FpgaImage { + s.Public = &v + return s +} + // SetShellVersion sets the ShellVersion field's value. func (s *FpgaImage) SetShellVersion(v string) *FpgaImage { s.ShellVersion = &v @@ -39848,6 +41062,67 @@ func (s *FpgaImage) SetUpdateTime(v time.Time) *FpgaImage { return s } +// Describes an Amazon FPGA image (AFI) attribute. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImageAttribute +type FpgaImageAttribute struct { + _ struct{} `type:"structure"` + + // The description of the AFI. + Description *string `locationName:"description" type:"string"` + + // The ID of the AFI. + FpgaImageId *string `locationName:"fpgaImageId" type:"string"` + + // One or more load permissions. + LoadPermissions []*LoadPermission `locationName:"loadPermissions" locationNameList:"item" type:"list"` + + // The name of the AFI. + Name *string `locationName:"name" type:"string"` + + // One or more product codes. + ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s FpgaImageAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FpgaImageAttribute) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *FpgaImageAttribute) SetDescription(v string) *FpgaImageAttribute { + s.Description = &v + return s +} + +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *FpgaImageAttribute) SetFpgaImageId(v string) *FpgaImageAttribute { + s.FpgaImageId = &v + return s +} + +// SetLoadPermissions sets the LoadPermissions field's value. +func (s *FpgaImageAttribute) SetLoadPermissions(v []*LoadPermission) *FpgaImageAttribute { + s.LoadPermissions = v + return s +} + +// SetName sets the Name field's value. +func (s *FpgaImageAttribute) SetName(v string) *FpgaImageAttribute { + s.Name = &v + return s +} + +// SetProductCodes sets the ProductCodes field's value. +func (s *FpgaImageAttribute) SetProductCodes(v []*ProductCode) *FpgaImageAttribute { + s.ProductCodes = v + return s +} + // Describes the state of the bitstream generation process for an Amazon FPGA // image (AFI). // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImageState @@ -40147,7 +41422,7 @@ type GetHostReservationPurchasePreviewOutput struct { // The purchase information of the Dedicated Host Reservation and the Dedicated // Hosts associated with it. - Purchase []*Purchase `locationName:"purchase" type:"list"` + Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` // The potential total hourly price of the reservation per hour. TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"` @@ -40250,7 +41525,8 @@ type GetPasswordDataOutput struct { // The ID of the Windows instance. InstanceId *string `locationName:"instanceId" type:"string"` - // The password of the instance. + // The password of the instance. Returns an empty string if the password is + // not available. PasswordData *string `locationName:"passwordData" type:"string"` // The time the data was last updated. @@ -40301,7 +41577,7 @@ type GetReservedInstancesExchangeQuoteInput struct { // ReservedInstanceIds is a required field ReservedInstanceIds []*string `locationName:"ReservedInstanceId" locationNameList:"ReservedInstanceId" type:"list" required:"true"` - // The configuration requirements of the Convertible Reserved Instances to exchange + // The configuration of the target Convertible Reserved Instance to exchange // for your current Convertible Reserved Instances. TargetConfigurations []*TargetConfigurationRequest `locationName:"TargetConfiguration" locationNameList:"TargetConfigurationRequest" type:"list"` } @@ -40500,12 +41776,14 @@ type HistoryRecord struct { // The event type. // - // * error - Indicates an error with the Spot fleet request. + // * error - An error with the Spot fleet request. // - // * fleetRequestChange - Indicates a change in the status or configuration - // of the Spot fleet request. + // * fleetRequestChange - A change in the status or configuration of the + // Spot fleet request. // - // * instanceChange - Indicates that an instance was launched or terminated. + // * instanceChange - An instance was launched or terminated. + // + // * Information - An informational event. // // EventType is a required field EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"` @@ -41216,7 +42494,7 @@ type Image struct { // images. RamdiskId *string `locationName:"ramdiskId" type:"string"` - // The device name of the root device (for example, /dev/sda1 or /dev/xvda). + // The device name of the root device volume (for example, /dev/sda1). RootDeviceName *string `locationName:"rootDeviceName" type:"string"` // The type of root device used by the AMI. The AMI can use an EBS volume or @@ -42674,7 +43952,7 @@ type Instance struct { // The idempotency token you provided when you launched the instance, if applicable. ClientToken *string `locationName:"clientToken" type:"string"` - // Indicates whether the instance is optimized for EBS I/O. This optimization + // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization // provides dedicated throughput to Amazon EBS and an optimized configuration // stack to provide optimal I/O performance. This optimization isn't available // with all instance types. Additional usage charges apply when using an EBS @@ -42699,7 +43977,7 @@ type Instance struct { // The ID of the instance. InstanceId *string `locationName:"instanceId" type:"string"` - // Indicates whether this is a Spot instance or a Scheduled Instance. + // Indicates whether this is a Spot Instance or a Scheduled Instance. InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"` // The instance type. @@ -42731,7 +44009,7 @@ type Instance struct { // DNS hostname can only be used inside the Amazon EC2 network. This name is // not available until the instance enters the running state. // - // [EC2-VPC] The Amazon-provided DNS server will resolve Amazon-provided private + // [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private // DNS hostnames if you've enabled DNS resolution and DNS hostnames in your // VPC. If you are not using the Amazon-provided DNS server in your VPC, your // custom domain name servers must resolve the hostname as appropriate. @@ -42754,7 +44032,7 @@ type Instance struct { // The RAM disk associated with this instance, if applicable. RamdiskId *string `locationName:"ramdiskId" type:"string"` - // The root device name (for example, /dev/sda1 or /dev/xvda). + // The device name of the root device volume (for example, /dev/sda1). RootDeviceName *string `locationName:"rootDeviceName" type:"string"` // The root device type used by the AMI. The AMI can use an EBS volume or an @@ -42766,13 +44044,13 @@ type Instance struct { // Specifies whether to enable an instance launched in a VPC to perform NAT. // This controls whether source/destination checking is enabled on the instance. - // A value of true means checking is enabled, and false means checking is disabled. - // The value must be false for the instance to perform NAT. For more information, - // see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) + // A value of true means that checking is enabled, and false means that checking + // is disabled. The value must be false for the instance to perform NAT. For + // more information, see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) // in the Amazon Virtual Private Cloud User Guide. SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` - // If the request is a Spot instance request, the ID of the request. + // If the request is a Spot Instance request, the ID of the request. SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` // Specifies whether enhanced networking with the Intel 82599 Virtual Function @@ -43050,7 +44328,7 @@ func (s *Instance) SetVpcId(v string) *Instance { type InstanceBlockDeviceMapping struct { _ struct{} `type:"structure"` - // The device name exposed to the instance (for example, /dev/sdh or xvdh). + // The device name (for example, /dev/sdh or xvdh). DeviceName *string `locationName:"deviceName" type:"string"` // Parameters used to automatically set up EBS volumes when the instance is @@ -43085,7 +44363,7 @@ func (s *InstanceBlockDeviceMapping) SetEbs(v *EbsInstanceBlockDevice) *Instance type InstanceBlockDeviceMappingSpecification struct { _ struct{} `type:"structure"` - // The device name exposed to the instance (for example, /dev/sdh or xvdh). + // The device name (for example, /dev/sdh or xvdh). DeviceName *string `locationName:"deviceName" type:"string"` // Parameters used to automatically set up EBS volumes when the instance is @@ -44158,7 +45436,7 @@ func (s *InternetGatewayAttachment) SetVpcId(v string) *InternetGatewayAttachmen return s } -// Describes a security group rule. +// Describes a set of permissions for a security group rule. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IpPermission type IpPermission struct { _ struct{} `type:"structure"` @@ -44257,7 +45535,7 @@ type IpRange struct { _ struct{} `type:"structure"` // The IPv4 CIDR range. You can either specify a CIDR range or a source security - // group, not both. To specify a single IPv4 address, use the /32 prefix. + // group, not both. To specify a single IPv4 address, use the /32 prefix length. CidrIp *string `locationName:"cidrIp" type:"string"` // A description for the security group rule that references this IPv4 address @@ -44321,7 +45599,7 @@ type Ipv6Range struct { _ struct{} `type:"structure"` // The IPv6 CIDR range. You can either specify a CIDR range or a source security - // group, not both. To specify a single IPv6 address, use the /128 prefix. + // group, not both. To specify a single IPv6 address, use the /128 prefix length. CidrIpv6 *string `locationName:"cidrIpv6" type:"string"` // A description for the security group rule that references this IPv6 address @@ -44469,9 +45747,6 @@ type LaunchSpecification struct { AddressingType *string `locationName:"addressingType" type:"string"` // One or more block device mapping entries. - // - // Although you can specify encrypted EBS volumes in this block device mapping - // for your Spot Instances, these volumes are not encrypted. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` // Indicates whether the instance is optimized for EBS I/O. This optimization @@ -44625,6 +45900,314 @@ func (s *LaunchSpecification) SetUserData(v string) *LaunchSpecification { return s } +// Describes the Classic Load Balancers and target groups to attach to a Spot +// fleet request. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LoadBalancersConfig +type LoadBalancersConfig struct { + _ struct{} `type:"structure"` + + // The Classic Load Balancers. + ClassicLoadBalancersConfig *ClassicLoadBalancersConfig `locationName:"classicLoadBalancersConfig" type:"structure"` + + // The target groups. + TargetGroupsConfig *TargetGroupsConfig `locationName:"targetGroupsConfig" type:"structure"` +} + +// String returns the string representation +func (s LoadBalancersConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadBalancersConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoadBalancersConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoadBalancersConfig"} + if s.ClassicLoadBalancersConfig != nil { + if err := s.ClassicLoadBalancersConfig.Validate(); err != nil { + invalidParams.AddNested("ClassicLoadBalancersConfig", err.(request.ErrInvalidParams)) + } + } + if s.TargetGroupsConfig != nil { + if err := s.TargetGroupsConfig.Validate(); err != nil { + invalidParams.AddNested("TargetGroupsConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClassicLoadBalancersConfig sets the ClassicLoadBalancersConfig field's value. +func (s *LoadBalancersConfig) SetClassicLoadBalancersConfig(v *ClassicLoadBalancersConfig) *LoadBalancersConfig { + s.ClassicLoadBalancersConfig = v + return s +} + +// SetTargetGroupsConfig sets the TargetGroupsConfig field's value. +func (s *LoadBalancersConfig) SetTargetGroupsConfig(v *TargetGroupsConfig) *LoadBalancersConfig { + s.TargetGroupsConfig = v + return s +} + +// Describes a load permission. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LoadPermission +type LoadPermission struct { + _ struct{} `type:"structure"` + + // The name of the group. + Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` + + // The AWS account ID. + UserId *string `locationName:"userId" type:"string"` +} + +// String returns the string representation +func (s LoadPermission) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadPermission) GoString() string { + return s.String() +} + +// SetGroup sets the Group field's value. +func (s *LoadPermission) SetGroup(v string) *LoadPermission { + s.Group = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *LoadPermission) SetUserId(v string) *LoadPermission { + s.UserId = &v + return s +} + +// Describes modifications to the load permissions of an Amazon FPGA image (AFI). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LoadPermissionModifications +type LoadPermissionModifications struct { + _ struct{} `type:"structure"` + + // The load permissions to add. + Add []*LoadPermissionRequest `locationNameList:"item" type:"list"` + + // The load permissions to remove. + Remove []*LoadPermissionRequest `locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s LoadPermissionModifications) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadPermissionModifications) GoString() string { + return s.String() +} + +// SetAdd sets the Add field's value. +func (s *LoadPermissionModifications) SetAdd(v []*LoadPermissionRequest) *LoadPermissionModifications { + s.Add = v + return s +} + +// SetRemove sets the Remove field's value. +func (s *LoadPermissionModifications) SetRemove(v []*LoadPermissionRequest) *LoadPermissionModifications { + s.Remove = v + return s +} + +// Describes a load permission. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LoadPermissionRequest +type LoadPermissionRequest struct { + _ struct{} `type:"structure"` + + // The name of the group. + Group *string `type:"string" enum:"PermissionGroup"` + + // The AWS account ID. + UserId *string `type:"string"` +} + +// String returns the string representation +func (s LoadPermissionRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadPermissionRequest) GoString() string { + return s.String() +} + +// SetGroup sets the Group field's value. +func (s *LoadPermissionRequest) SetGroup(v string) *LoadPermissionRequest { + s.Group = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *LoadPermissionRequest) SetUserId(v string) *LoadPermissionRequest { + s.UserId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttributeRequest +type ModifyFpgaImageAttributeInput struct { + _ struct{} `type:"structure"` + + // The name of the attribute. + Attribute *string `type:"string" enum:"FpgaImageAttributeName"` + + // A description for the AFI. + Description *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the AFI. + // + // FpgaImageId is a required field + FpgaImageId *string `type:"string" required:"true"` + + // The load permission for the AFI. + LoadPermission *LoadPermissionModifications `type:"structure"` + + // A name for the AFI. + Name *string `type:"string"` + + // The operation type. + OperationType *string `type:"string" enum:"OperationType"` + + // One or more product codes. After you add a product code to an AFI, it can't + // be removed. This parameter is valid only when modifying the productCodes + // attribute. + ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"` + + // One or more user groups. This parameter is valid only when modifying the + // loadPermission attribute. + UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"` + + // One or more AWS account IDs. This parameter is valid only when modifying + // the loadPermission attribute. + UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` +} + +// String returns the string representation +func (s ModifyFpgaImageAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyFpgaImageAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyFpgaImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyFpgaImageAttributeInput"} + if s.FpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *ModifyFpgaImageAttributeInput) SetAttribute(v string) *ModifyFpgaImageAttributeInput { + s.Attribute = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ModifyFpgaImageAttributeInput) SetDescription(v string) *ModifyFpgaImageAttributeInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyFpgaImageAttributeInput) SetDryRun(v bool) *ModifyFpgaImageAttributeInput { + s.DryRun = &v + return s +} + +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *ModifyFpgaImageAttributeInput) SetFpgaImageId(v string) *ModifyFpgaImageAttributeInput { + s.FpgaImageId = &v + return s +} + +// SetLoadPermission sets the LoadPermission field's value. +func (s *ModifyFpgaImageAttributeInput) SetLoadPermission(v *LoadPermissionModifications) *ModifyFpgaImageAttributeInput { + s.LoadPermission = v + return s +} + +// SetName sets the Name field's value. +func (s *ModifyFpgaImageAttributeInput) SetName(v string) *ModifyFpgaImageAttributeInput { + s.Name = &v + return s +} + +// SetOperationType sets the OperationType field's value. +func (s *ModifyFpgaImageAttributeInput) SetOperationType(v string) *ModifyFpgaImageAttributeInput { + s.OperationType = &v + return s +} + +// SetProductCodes sets the ProductCodes field's value. +func (s *ModifyFpgaImageAttributeInput) SetProductCodes(v []*string) *ModifyFpgaImageAttributeInput { + s.ProductCodes = v + return s +} + +// SetUserGroups sets the UserGroups field's value. +func (s *ModifyFpgaImageAttributeInput) SetUserGroups(v []*string) *ModifyFpgaImageAttributeInput { + s.UserGroups = v + return s +} + +// SetUserIds sets the UserIds field's value. +func (s *ModifyFpgaImageAttributeInput) SetUserIds(v []*string) *ModifyFpgaImageAttributeInput { + s.UserIds = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttributeResult +type ModifyFpgaImageAttributeOutput struct { + _ struct{} `type:"structure"` + + // Information about the attribute. + FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"` +} + +// String returns the string representation +func (s ModifyFpgaImageAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyFpgaImageAttributeOutput) GoString() string { + return s.String() +} + +// SetFpgaImageAttribute sets the FpgaImageAttribute field's value. +func (s *ModifyFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *ModifyFpgaImageAttributeOutput { + s.FpgaImageAttribute = v + return s +} + // Contains the parameters for ModifyHosts. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHostsRequest type ModifyHostsInput struct { @@ -44873,10 +46456,11 @@ func (s ModifyIdentityIdFormatOutput) GoString() string { type ModifyImageAttributeInput struct { _ struct{} `type:"structure"` - // The name of the attribute to modify. + // The name of the attribute to modify. The valid values are description, launchPermission, + // and productCodes. Attribute *string `type:"string"` - // A description for the AMI. + // A new description for the AMI. Description *AttributeValue `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -44890,26 +46474,27 @@ type ModifyImageAttributeInput struct { // ImageId is a required field ImageId *string `type:"string" required:"true"` - // A launch permission modification. + // A new launch permission for the AMI. LaunchPermission *LaunchPermissionModifications `type:"structure"` - // The operation type. + // The operation type. This parameter can be used only when the Attribute parameter + // is launchPermission. OperationType *string `type:"string" enum:"OperationType"` - // One or more product codes. After you add a product code to an AMI, it can't - // be removed. This is only valid when modifying the productCodes attribute. + // One or more DevPay product codes. After you add a product code to an AMI, + // it can't be removed. ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"` - // One or more user groups. This is only valid when modifying the launchPermission - // attribute. + // One or more user groups. This parameter can be used only when the Attribute + // parameter is launchPermission. UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"` - // One or more AWS account IDs. This is only valid when modifying the launchPermission - // attribute. + // One or more AWS account IDs. This parameter can be used only when the Attribute + // parameter is launchPermission. UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` - // The value of the attribute being modified. This is only valid when modifying - // the description attribute. + // The value of the attribute being modified. This parameter can be used only + // when the Attribute parameter is description or productCodes. Value *string `type:"string"` } @@ -45041,7 +46626,7 @@ type ModifyInstanceAttributeInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Specifies whether the instance is optimized for EBS I/O. This optimization + // Specifies whether the instance is optimized for Amazon EBS I/O. This optimization // provides dedicated throughput to Amazon EBS and an optimized configuration // stack to provide optimal EBS I/O performance. This optimization isn't available // with all instance types. Additional usage charges apply when using an EBS @@ -45084,8 +46669,8 @@ type ModifyInstanceAttributeInput struct { Ramdisk *AttributeValue `locationName:"ramdisk" type:"structure"` // Specifies whether source/destination checking is enabled. A value of true - // means that checking is enabled, and false means checking is disabled. This - // value must be false for a NAT instance to perform NAT. + // means that checking is enabled, and false means that checking is disabled. + // This value must be false for a NAT instance to perform NAT. SourceDestCheck *AttributeBooleanValue `type:"structure"` // Set to simple to enable enhanced networking with the Intel 82599 Virtual @@ -45099,8 +46684,8 @@ type ModifyInstanceAttributeInput struct { SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` // Changes the instance's user data to the specified value. If you are using - // an AWS SDK or command line tool, Base64-encoding is performed for you, and - // you can load the text from a file. Otherwise, you must provide Base64-encoded + // an AWS SDK or command line tool, base64-encoding is performed for you, and + // you can load the text from a file. Otherwise, you must provide base64-encoded // text. UserData *BlobAttributeValue `locationName:"userData" type:"structure"` @@ -46099,24 +47684,42 @@ func (s ModifyVpcAttributeOutput) GoString() string { type ModifyVpcEndpointInput struct { _ struct{} `type:"structure"` - // One or more route tables IDs to associate with the endpoint. + // (Gateway endpoint) One or more route tables IDs to associate with the endpoint. AddRouteTableIds []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"` + // (Interface endpoint) One or more security group IDs to associate with the + // network interface. + AddSecurityGroupIds []*string `locationName:"AddSecurityGroupId" locationNameList:"item" type:"list"` + + // (Interface endpoint) One or more subnet IDs in which to serve the endpoint. + AddSubnetIds []*string `locationName:"AddSubnetId" locationNameList:"item" type:"list"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // A policy document to attach to the endpoint. The policy must be in valid - // JSON format. + // (Gateway endpoint) A policy document to attach to the endpoint. The policy + // must be in valid JSON format. PolicyDocument *string `type:"string"` - // One or more route table IDs to disassociate from the endpoint. + // (Interface endpoint) Indicate whether a private hosted zone is associated + // with the VPC. + PrivateDnsEnabled *bool `type:"boolean"` + + // (Gateway endpoint) One or more route table IDs to disassociate from the endpoint. RemoveRouteTableIds []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"` - // Specify true to reset the policy document to the default policy. The default - // policy allows access to the service. + // (Interface endpoint) One or more security group IDs to disassociate from + // the network interface. + RemoveSecurityGroupIds []*string `locationName:"RemoveSecurityGroupId" locationNameList:"item" type:"list"` + + // (Interface endpoint) One or more subnets IDs in which to remove the endpoint. + RemoveSubnetIds []*string `locationName:"RemoveSubnetId" locationNameList:"item" type:"list"` + + // (Gateway endpoint) Specify true to reset the policy document to the default + // policy. The default policy allows full access to the service. ResetPolicy *bool `type:"boolean"` // The ID of the endpoint. @@ -46154,6 +47757,18 @@ func (s *ModifyVpcEndpointInput) SetAddRouteTableIds(v []*string) *ModifyVpcEndp return s } +// SetAddSecurityGroupIds sets the AddSecurityGroupIds field's value. +func (s *ModifyVpcEndpointInput) SetAddSecurityGroupIds(v []*string) *ModifyVpcEndpointInput { + s.AddSecurityGroupIds = v + return s +} + +// SetAddSubnetIds sets the AddSubnetIds field's value. +func (s *ModifyVpcEndpointInput) SetAddSubnetIds(v []*string) *ModifyVpcEndpointInput { + s.AddSubnetIds = v + return s +} + // SetDryRun sets the DryRun field's value. func (s *ModifyVpcEndpointInput) SetDryRun(v bool) *ModifyVpcEndpointInput { s.DryRun = &v @@ -46166,12 +47781,30 @@ func (s *ModifyVpcEndpointInput) SetPolicyDocument(v string) *ModifyVpcEndpointI return s } +// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. +func (s *ModifyVpcEndpointInput) SetPrivateDnsEnabled(v bool) *ModifyVpcEndpointInput { + s.PrivateDnsEnabled = &v + return s +} + // SetRemoveRouteTableIds sets the RemoveRouteTableIds field's value. func (s *ModifyVpcEndpointInput) SetRemoveRouteTableIds(v []*string) *ModifyVpcEndpointInput { s.RemoveRouteTableIds = v return s } +// SetRemoveSecurityGroupIds sets the RemoveSecurityGroupIds field's value. +func (s *ModifyVpcEndpointInput) SetRemoveSecurityGroupIds(v []*string) *ModifyVpcEndpointInput { + s.RemoveSecurityGroupIds = v + return s +} + +// SetRemoveSubnetIds sets the RemoveSubnetIds field's value. +func (s *ModifyVpcEndpointInput) SetRemoveSubnetIds(v []*string) *ModifyVpcEndpointInput { + s.RemoveSubnetIds = v + return s +} + // SetResetPolicy sets the ResetPolicy field's value. func (s *ModifyVpcEndpointInput) SetResetPolicy(v bool) *ModifyVpcEndpointInput { s.ResetPolicy = &v @@ -46184,7 +47817,6 @@ func (s *ModifyVpcEndpointInput) SetVpcEndpointId(v string) *ModifyVpcEndpointIn return s } -// Contains the output of ModifyVpcEndpoint. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointResult type ModifyVpcEndpointOutput struct { _ struct{} `type:"structure"` @@ -46311,6 +47943,97 @@ func (s *ModifyVpcPeeringConnectionOptionsOutput) SetRequesterPeeringConnectionO return s } +// Contains the parameters for ModifyVpcTenancy. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancyRequest +type ModifyVpcTenancyInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the operation, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The instance tenancy attribute for the VPC. + // + // InstanceTenancy is a required field + InstanceTenancy *string `type:"string" required:"true" enum:"VpcTenancy"` + + // The ID of the VPC. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyVpcTenancyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpcTenancyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyVpcTenancyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcTenancyInput"} + if s.InstanceTenancy == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceTenancy")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyVpcTenancyInput) SetDryRun(v bool) *ModifyVpcTenancyInput { + s.DryRun = &v + return s +} + +// SetInstanceTenancy sets the InstanceTenancy field's value. +func (s *ModifyVpcTenancyInput) SetInstanceTenancy(v string) *ModifyVpcTenancyInput { + s.InstanceTenancy = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *ModifyVpcTenancyInput) SetVpcId(v string) *ModifyVpcTenancyInput { + s.VpcId = &v + return s +} + +// Contains the output of ModifyVpcTenancy. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancyResult +type ModifyVpcTenancyOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, returns an error. + ReturnValue *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s ModifyVpcTenancyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpcTenancyOutput) GoString() string { + return s.String() +} + +// SetReturnValue sets the ReturnValue field's value. +func (s *ModifyVpcTenancyOutput) SetReturnValue(v bool) *ModifyVpcTenancyOutput { + s.ReturnValue = &v + return s +} + // Contains the parameters for MonitorInstances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstancesRequest type MonitorInstancesInput struct { @@ -46607,6 +48330,9 @@ type NatGateway struct { // The ID of the subnet in which the NAT gateway is located. SubnetId *string `locationName:"subnetId" type:"string"` + // The tags for the NAT gateway. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The ID of the VPC in which the NAT gateway is located. VpcId *string `locationName:"vpcId" type:"string"` } @@ -46675,6 +48401,12 @@ func (s *NatGateway) SetSubnetId(v string) *NatGateway { return s } +// SetTags sets the Tags field's value. +func (s *NatGateway) SetTags(v []*Tag) *NatGateway { + s.Tags = v + return s +} + // SetVpcId sets the VpcId field's value. func (s *NatGateway) SetVpcId(v string) *NatGateway { s.VpcId = &v @@ -48418,7 +50150,7 @@ type PurchaseHostReservationOutput struct { CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` // Describes the details of the purchase. - Purchase []*Purchase `locationName:"purchase" type:"list"` + Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` // The total hourly price of the reservation calculated per hour. TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"` @@ -48912,7 +50644,7 @@ type RegisterImageInput struct { // The ID of the RAM disk. RamdiskId *string `locationName:"ramdiskId" type:"string"` - // The name of the root device (for example, /dev/sda1, or /dev/xvda). + // The device name of the root device volume (for example, /dev/sda1). RootDeviceName *string `locationName:"rootDeviceName" type:"string"` // Set to simple to enable enhanced networking with the Intel 82599 Virtual @@ -49862,7 +51594,7 @@ type ReportInstanceStatusInput struct { // Instances is a required field Instances []*string `locationName:"instanceId" locationNameList:"InstanceId" type:"list" required:"true"` - // One or more reason codes that describes the health state of your instance. + // One or more reason codes that describe the health state of your instance. // // * instance-stuck-in-state: My instance is stuck in a state. // @@ -49873,13 +51605,13 @@ type ReportInstanceStatusInput struct { // * password-not-available: A password is not available for my instance. // // * performance-network: My instance is experiencing performance problems - // which I believe are network related. + // that I believe are network related. // // * performance-instance-store: My instance is experiencing performance - // problems which I believe are related to the instance stores. + // problems that I believe are related to the instance stores. // // * performance-ebs-volume: My instance is experiencing performance problems - // which I believe are related to an EBS volume. + // that I believe are related to an EBS volume. // // * performance-other: My instance is experiencing performance problems. // @@ -50122,6 +51854,9 @@ type RequestSpotInstancesInput struct { // Default: 1 InstanceCount *int64 `locationName:"instanceCount" type:"integer"` + // Indicates whether a Spot instance stops or terminates when it is interrupted. + InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` + // The instance launch group. Launch groups are Spot instances that launch together // and terminate together. // @@ -50218,6 +51953,12 @@ func (s *RequestSpotInstancesInput) SetInstanceCount(v int64) *RequestSpotInstan return s } +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *RequestSpotInstancesInput) SetInstanceInterruptionBehavior(v string) *RequestSpotInstancesInput { + s.InstanceInterruptionBehavior = &v + return s +} + // SetLaunchGroup sets the LaunchGroup field's value. func (s *RequestSpotInstancesInput) SetLaunchGroup(v string) *RequestSpotInstancesInput { s.LaunchGroup = &v @@ -50287,10 +52028,10 @@ type RequestSpotLaunchSpecification struct { // Deprecated. AddressingType *string `locationName:"addressingType" type:"string"` - // One or more block device mapping entries. - // - // Although you can specify encrypted EBS volumes in this block device mapping - // for your Spot Instances, these volumes are not encrypted. + // One or more block device mapping entries. You can't specify both a snapshot + // ID and an encryption value. This is because only blank volumes can be encrypted + // on creation. If a snapshot is the basis for a volume, it is not blank and + // its encryption status is used for the volume encryption status. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` // Indicates whether the instance is optimized for EBS I/O. This optimization @@ -51325,6 +53066,90 @@ func (s *ReservedInstancesOffering) SetUsagePrice(v float64) *ReservedInstancesO return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttributeRequest +type ResetFpgaImageAttributeInput struct { + _ struct{} `type:"structure"` + + // The attribute. + Attribute *string `type:"string" enum:"ResetFpgaImageAttributeName"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the AFI. + // + // FpgaImageId is a required field + FpgaImageId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ResetFpgaImageAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetFpgaImageAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetFpgaImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetFpgaImageAttributeInput"} + if s.FpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *ResetFpgaImageAttributeInput) SetAttribute(v string) *ResetFpgaImageAttributeInput { + s.Attribute = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ResetFpgaImageAttributeInput) SetDryRun(v bool) *ResetFpgaImageAttributeInput { + s.DryRun = &v + return s +} + +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *ResetFpgaImageAttributeInput) SetFpgaImageId(v string) *ResetFpgaImageAttributeInput { + s.FpgaImageId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttributeResult +type ResetFpgaImageAttributeOutput struct { + _ struct{} `type:"structure"` + + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s ResetFpgaImageAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetFpgaImageAttributeOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ResetFpgaImageAttributeOutput) SetReturn(v bool) *ResetFpgaImageAttributeOutput { + s.Return = &v + return s +} + // Contains the parameters for ResetImageAttribute. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttributeRequest type ResetImageAttributeInput struct { @@ -51740,8 +53565,7 @@ func (s *RestoreAddressToClassicOutput) SetStatus(v string) *RestoreAddressToCla type RevokeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` - // The CIDR IP address range. We recommend that you specify the CIDR range in - // a set of IP permissions instead. + // Not supported. Use a set of IP permissions to specify the CIDR. CidrIp *string `locationName:"cidrIp" type:"string"` // Checks whether you have the required permissions for the action, without @@ -51750,8 +53574,7 @@ type RevokeSecurityGroupEgressInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The start of port range for the TCP and UDP protocols, or an ICMP type number. - // We recommend that you specify the port range in a set of IP permissions instead. + // Not supported. Use a set of IP permissions to specify the port. FromPort *int64 `locationName:"fromPort" type:"integer"` // The ID of the security group. @@ -51759,26 +53582,23 @@ type RevokeSecurityGroupEgressInput struct { // GroupId is a required field GroupId *string `locationName:"groupId" type:"string" required:"true"` - // A set of IP permissions. You can't specify a destination security group and - // a CIDR IP address range. + // One or more sets of IP permissions. You can't specify a destination security + // group and a CIDR IP address range in the same set of permissions. IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` - // The IP protocol name or number. We recommend that you specify the protocol - // in a set of IP permissions instead. + // Not supported. Use a set of IP permissions to specify the protocol name or + // number. IpProtocol *string `locationName:"ipProtocol" type:"string"` - // The name of a destination security group. To revoke outbound access to a - // destination security group, we recommend that you use a set of IP permissions - // instead. + // Not supported. Use a set of IP permissions to specify a destination security + // group. SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` - // The AWS account number for a destination security group. To revoke outbound - // access to a destination security group, we recommend that you use a set of - // IP permissions instead. + // Not supported. Use a set of IP permissions to specify a destination security + // group. SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` - // The end of port range for the TCP and UDP protocols, or an ICMP type number. - // We recommend that you specify the port range in a set of IP permissions instead. + // Not supported. Use a set of IP permissions to specify the port. ToPort *int64 `locationName:"toPort" type:"integer"` } @@ -51893,15 +53713,17 @@ type RevokeSecurityGroupIngressInput struct { // For the ICMP type number, use -1 to specify all ICMP types. FromPort *int64 `type:"integer"` - // The ID of the security group. Required for a security group in a nondefault - // VPC. + // The ID of the security group. You must specify either the security group + // ID or the security group name in the request. For security groups in a nondefault + // VPC, you must specify the security group ID. GroupId *string `type:"string"` - // [EC2-Classic, default VPC] The name of the security group. + // [EC2-Classic, default VPC] The name of the security group. You must specify + // either the security group ID or the security group name in the request. GroupName *string `type:"string"` - // A set of IP permissions. You can't specify a source security group and a - // CIDR IP address range. + // One or more sets of IP permissions. You can't specify a source security group + // and a CIDR IP address range in the same set of permissions. IpPermissions []*IpPermission `locationNameList:"item" type:"list"` // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). @@ -52277,13 +54099,10 @@ type RunInstancesInput struct { // Reserved. AdditionalInfo *string `locationName:"additionalInfo" type:"string"` - // The block device mapping. - // - // Supplying both a snapshot ID and an encryption value as arguments for block-device - // mapping results in an error. This is because only blank volumes can be encrypted - // on start, and these are not created from a snapshot. If a snapshot is the - // basis for the volume, it contains data by definition and its encryption status - // cannot be changed using this action. + // One or more block device mapping entries. You can't specify both a snapshot + // ID and an encryption value. This is because only blank volumes can be encrypted + // on creation. If a snapshot is the basis for a volume, it is not blank and + // its encryption status is used for the volume encryption status. BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` // Unique, case-sensitive identifier you provide to ensure the idempotency of @@ -52307,11 +54126,11 @@ type RunInstancesInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Indicates whether the instance is optimized for EBS I/O. This optimization + // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS-optimized - // instance. + // stack to provide optimal Amazon EBS I/O performance. This optimization isn't + // available with all instance types. Additional usage charges apply when using + // an EBS-optimized instance. // // Default: false EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` @@ -52438,9 +54257,9 @@ type RunInstancesInput struct { // The user data to make available to the instance. For more information, see // Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) - // (Windows). If you are using an AWS SDK or command line tool, Base64-encoding - // is performed for you, and you can load the text from a file. Otherwise, you - // must provide Base64-encoded text. + // (Windows). If you are using a command line tool, base64-encoding is performed + // for you, and you can load the text from a file. Otherwise, you must provide + // base64-encoded text. UserData *string `type:"string"` } @@ -53311,7 +55130,7 @@ func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceUnit(v string) *Schedu type ScheduledInstancesBlockDeviceMapping struct { _ struct{} `type:"structure"` - // The device name exposed to the instance (for example, /dev/sdh or xvdh). + // The device name (for example, /dev/sdh or xvdh). DeviceName *string `type:"string"` // Parameters used to set up EBS volumes automatically when the instance is @@ -53324,7 +55143,7 @@ type ScheduledInstancesBlockDeviceMapping struct { // The virtual device name (ephemeralN). Instance store volumes are numbered // starting from 0. An instance type with two available instance store volumes - // can specify mappings for ephemeral0 and ephemeral1.The number of available + // can specify mappings for ephemeral0 and ephemeral1. The number of available // instance store volumes depends on the instance type. After you connect to // the instance, you must mount the volume. // @@ -53995,6 +55814,40 @@ func (s *SecurityGroup) SetVpcId(v string) *SecurityGroup { return s } +// Describes a security group. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SecurityGroupIdentifier +type SecurityGroupIdentifier struct { + _ struct{} `type:"structure"` + + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` + + // The name of the security group. + GroupName *string `locationName:"groupName" type:"string"` +} + +// String returns the string representation +func (s SecurityGroupIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroupIdentifier) GoString() string { + return s.String() +} + +// SetGroupId sets the GroupId field's value. +func (s *SecurityGroupIdentifier) SetGroupId(v string) *SecurityGroupIdentifier { + s.GroupId = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *SecurityGroupIdentifier) SetGroupName(v string) *SecurityGroupIdentifier { + s.GroupName = &v + return s +} + // Describes a VPC with a security group that references your security group. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SecurityGroupReference type SecurityGroupReference struct { @@ -54042,6 +55895,120 @@ func (s *SecurityGroupReference) SetVpcPeeringConnectionId(v string) *SecurityGr return s } +// Describes a service. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ServiceDetail +type ServiceDetail struct { + _ struct{} `type:"structure"` + + // Indicates whether VPC endpoint connection requests to the service must be + // accepted by the service owner. + AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"` + + // The Availability Zones in which the service is available. + AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"` + + // The DNS names for the service. + BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"` + + // The AWS account ID of the service owner. + Owner *string `locationName:"owner" type:"string"` + + // The private DNS name for the service. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + + // The Amazon Resource Name (ARN) of the service. + ServiceName *string `locationName:"serviceName" type:"string"` + + // The type of service. + ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"` + + // Indicates whether the service supports endpoint policies. + VpcEndpointPolicySupported *bool `locationName:"vpcEndpointPolicySupported" type:"boolean"` +} + +// String returns the string representation +func (s ServiceDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceDetail) GoString() string { + return s.String() +} + +// SetAcceptanceRequired sets the AcceptanceRequired field's value. +func (s *ServiceDetail) SetAcceptanceRequired(v bool) *ServiceDetail { + s.AcceptanceRequired = &v + return s +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *ServiceDetail) SetAvailabilityZones(v []*string) *ServiceDetail { + s.AvailabilityZones = v + return s +} + +// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value. +func (s *ServiceDetail) SetBaseEndpointDnsNames(v []*string) *ServiceDetail { + s.BaseEndpointDnsNames = v + return s +} + +// SetOwner sets the Owner field's value. +func (s *ServiceDetail) SetOwner(v string) *ServiceDetail { + s.Owner = &v + return s +} + +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *ServiceDetail) SetPrivateDnsName(v string) *ServiceDetail { + s.PrivateDnsName = &v + return s +} + +// SetServiceName sets the ServiceName field's value. +func (s *ServiceDetail) SetServiceName(v string) *ServiceDetail { + s.ServiceName = &v + return s +} + +// SetServiceType sets the ServiceType field's value. +func (s *ServiceDetail) SetServiceType(v []*ServiceTypeDetail) *ServiceDetail { + s.ServiceType = v + return s +} + +// SetVpcEndpointPolicySupported sets the VpcEndpointPolicySupported field's value. +func (s *ServiceDetail) SetVpcEndpointPolicySupported(v bool) *ServiceDetail { + s.VpcEndpointPolicySupported = &v + return s +} + +// Describes the type of service for a VPC endpoint. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ServiceTypeDetail +type ServiceTypeDetail struct { + _ struct{} `type:"structure"` + + // The type of service. + ServiceType *string `locationName:"serviceType" type:"string" enum:"ServiceType"` +} + +// String returns the string representation +func (s ServiceTypeDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceTypeDetail) GoString() string { + return s.String() +} + +// SetServiceType sets the ServiceType field's value. +func (s *ServiceTypeDetail) SetServiceType(v string) *ServiceTypeDetail { + s.ServiceType = &v + return s +} + // Describes the time period for a Scheduled Instance to start its first schedule. // The time period must span less than one day. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SlotDateTimeRangeRequest @@ -54618,7 +56585,10 @@ type SpotFleetLaunchSpecification struct { // Deprecated. AddressingType *string `locationName:"addressingType" type:"string"` - // One or more block device mapping entries. + // One or more block device mapping entries. You can't specify both a snapshot + // ID and an encryption value. This is because only blank volumes can be encrypted + // on creation. If a snapshot is the basis for a volume, it is not blank and + // its encryption status is used for the volume encryption status. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` // Indicates whether the instances are optimized for EBS I/O. This optimization @@ -54959,11 +56929,23 @@ type SpotFleetRequestConfigData struct { // IamFleetRole is a required field IamFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"` + // Indicates whether a Spot instance stops or terminates when it is interrupted. + InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` + // Information about the launch specifications for the Spot fleet request. // // LaunchSpecifications is a required field LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" min:"1" type:"list" required:"true"` + // One or more Classic Load Balancers and target groups to attach to the Spot + // fleet request. Spot fleet registers the running Spot instances with the specified + // Classic Load Balancers and target groups. + // + // With Network Load Balancers, Spot fleet cannot register instances that have + // the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, + // HS1, M1, M2, M3, and T1. + LoadBalancersConfig *LoadBalancersConfig `locationName:"loadBalancersConfig" type:"structure"` + // Indicates whether Spot fleet should replace unhealthy instances. ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` @@ -55041,6 +57023,11 @@ func (s *SpotFleetRequestConfigData) Validate() error { } } } + if s.LoadBalancersConfig != nil { + if err := s.LoadBalancersConfig.Validate(); err != nil { + invalidParams.AddNested("LoadBalancersConfig", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -55078,12 +57065,24 @@ func (s *SpotFleetRequestConfigData) SetIamFleetRole(v string) *SpotFleetRequest return s } +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotFleetRequestConfigData) SetInstanceInterruptionBehavior(v string) *SpotFleetRequestConfigData { + s.InstanceInterruptionBehavior = &v + return s +} + // SetLaunchSpecifications sets the LaunchSpecifications field's value. func (s *SpotFleetRequestConfigData) SetLaunchSpecifications(v []*SpotFleetLaunchSpecification) *SpotFleetRequestConfigData { s.LaunchSpecifications = v return s } +// SetLoadBalancersConfig sets the LoadBalancersConfig field's value. +func (s *SpotFleetRequestConfigData) SetLoadBalancersConfig(v *LoadBalancersConfig) *SpotFleetRequestConfigData { + s.LoadBalancersConfig = v + return s +} + // SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. func (s *SpotFleetRequestConfigData) SetReplaceUnhealthyInstances(v bool) *SpotFleetRequestConfigData { s.ReplaceUnhealthyInstances = &v @@ -55189,6 +57188,9 @@ type SpotInstanceRequest struct { // request. InstanceId *string `locationName:"instanceId" type:"string"` + // Indicates whether a Spot instance stops or terminates when it is interrupted. + InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` + // The instance launch group. Launch groups are Spot instances that launch together // and terminate together. LaunchGroup *string `locationName:"launchGroup" type:"string"` @@ -55281,6 +57283,12 @@ func (s *SpotInstanceRequest) SetInstanceId(v string) *SpotInstanceRequest { return s } +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotInstanceRequest) SetInstanceInterruptionBehavior(v string) *SpotInstanceRequest { + s.InstanceInterruptionBehavior = &v + return s +} + // SetLaunchGroup sets the LaunchGroup field's value. func (s *SpotInstanceRequest) SetLaunchGroup(v string) *SpotInstanceRequest { s.LaunchGroup = &v @@ -55793,7 +57801,7 @@ type StateReason struct { // // * Server.ScheduledStop: The instance was stopped due to a scheduled retirement. // - // * Server.SpotInstanceTermination: A Spot instance was terminated due to + // * Server.SpotInstanceTermination: A Spot Instance was terminated due to // an increase in the market price. // // * Client.InternalError: A client error caused the instance to terminate @@ -56395,6 +58403,100 @@ func (s *TargetConfigurationRequest) SetOfferingId(v string) *TargetConfiguratio return s } +// Describes a load balancer target group. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetGroup +type TargetGroup struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the target group. + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s TargetGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetGroup) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetGroup) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetGroup"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *TargetGroup) SetArn(v string) *TargetGroup { + s.Arn = &v + return s +} + +// Describes the target groups to attach to a Spot fleet. Spot fleet registers +// the running Spot instances with these target groups. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetGroupsConfig +type TargetGroupsConfig struct { + _ struct{} `type:"structure"` + + // One or more target groups. + // + // TargetGroups is a required field + TargetGroups []*TargetGroup `locationName:"targetGroups" locationNameList:"item" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TargetGroupsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetGroupsConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetGroupsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetGroupsConfig"} + if s.TargetGroups == nil { + invalidParams.Add(request.NewErrParamRequired("TargetGroups")) + } + if s.TargetGroups != nil && len(s.TargetGroups) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetGroups", 1)) + } + if s.TargetGroups != nil { + for i, v := range s.TargetGroups { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGroups", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTargetGroups sets the TargetGroups field's value. +func (s *TargetGroupsConfig) SetTargetGroups(v []*TargetGroup) *TargetGroupsConfig { + s.TargetGroups = v + return s +} + // The total value of the new Convertible Reserved Instances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetReservationValue type TargetReservationValue struct { @@ -58140,10 +60242,24 @@ type VpcEndpoint struct { // The date and time the VPC endpoint was created. CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"` - // The policy document associated with the endpoint. + // (Interface endpoint) The DNS entries for the endpoint. + DnsEntries []*DnsEntry `locationName:"dnsEntrySet" locationNameList:"item" type:"list"` + + // (Interface endpoint) Information about the security groups associated with + // the network interface. + Groups []*SecurityGroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` + + // (Interface endpoint) One or more network interfaces for the endpoint. + NetworkInterfaceIds []*string `locationName:"networkInterfaceIdSet" locationNameList:"item" type:"list"` + + // The policy document associated with the endpoint, if applicable. PolicyDocument *string `locationName:"policyDocument" type:"string"` - // One or more route tables associated with the endpoint. + // (Interface endpoint) Indicates whether the VPC is associated with a private + // hosted zone. + PrivateDnsEnabled *bool `locationName:"privateDnsEnabled" type:"boolean"` + + // (Gateway endpoint) One or more route tables associated with the endpoint. RouteTableIds []*string `locationName:"routeTableIdSet" locationNameList:"item" type:"list"` // The name of the AWS service to which the endpoint is associated. @@ -58152,9 +60268,15 @@ type VpcEndpoint struct { // The state of the VPC endpoint. State *string `locationName:"state" type:"string" enum:"State"` + // (Interface endpoint) One or more subnets in which the endpoint is located. + SubnetIds []*string `locationName:"subnetIdSet" locationNameList:"item" type:"list"` + // The ID of the VPC endpoint. VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"` + // The type of endpoint. + VpcEndpointType *string `locationName:"vpcEndpointType" type:"string" enum:"VpcEndpointType"` + // The ID of the VPC to which the endpoint is associated. VpcId *string `locationName:"vpcId" type:"string"` } @@ -58175,12 +60297,36 @@ func (s *VpcEndpoint) SetCreationTimestamp(v time.Time) *VpcEndpoint { return s } +// SetDnsEntries sets the DnsEntries field's value. +func (s *VpcEndpoint) SetDnsEntries(v []*DnsEntry) *VpcEndpoint { + s.DnsEntries = v + return s +} + +// SetGroups sets the Groups field's value. +func (s *VpcEndpoint) SetGroups(v []*SecurityGroupIdentifier) *VpcEndpoint { + s.Groups = v + return s +} + +// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. +func (s *VpcEndpoint) SetNetworkInterfaceIds(v []*string) *VpcEndpoint { + s.NetworkInterfaceIds = v + return s +} + // SetPolicyDocument sets the PolicyDocument field's value. func (s *VpcEndpoint) SetPolicyDocument(v string) *VpcEndpoint { s.PolicyDocument = &v return s } +// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. +func (s *VpcEndpoint) SetPrivateDnsEnabled(v bool) *VpcEndpoint { + s.PrivateDnsEnabled = &v + return s +} + // SetRouteTableIds sets the RouteTableIds field's value. func (s *VpcEndpoint) SetRouteTableIds(v []*string) *VpcEndpoint { s.RouteTableIds = v @@ -58199,12 +60345,24 @@ func (s *VpcEndpoint) SetState(v string) *VpcEndpoint { return s } +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcEndpoint) SetSubnetIds(v []*string) *VpcEndpoint { + s.SubnetIds = v + return s +} + // SetVpcEndpointId sets the VpcEndpointId field's value. func (s *VpcEndpoint) SetVpcEndpointId(v string) *VpcEndpoint { s.VpcEndpointId = &v return s } +// SetVpcEndpointType sets the VpcEndpointType field's value. +func (s *VpcEndpoint) SetVpcEndpointType(v string) *VpcEndpoint { + s.VpcEndpointType = &v + return s +} + // SetVpcId sets the VpcId field's value. func (s *VpcEndpoint) SetVpcId(v string) *VpcEndpoint { s.VpcId = &v @@ -58482,6 +60640,12 @@ func (s *VpcPeeringConnectionVpcInfo) SetVpcId(v string) *VpcPeeringConnectionVp type VpnConnection struct { _ struct{} `type:"structure"` + // The category of the VPN connection. A value of VPN indicates an AWS VPN connection. + // A value of VPN-Classic indicates an AWS Classic VPN connection. For more + // information, see AWS Managed VPN Categories (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html#vpn-categories) + // in the Amazon Virtual Private Cloud User Guide. + Category *string `locationName:"category" type:"string"` + // The configuration information for the VPN connection's customer gateway (in // the native XML format). This element is always present in the CreateVpnConnection // response; however, it's present in the DescribeVpnConnections response only @@ -58526,6 +60690,12 @@ func (s VpnConnection) GoString() string { return s.String() } +// SetCategory sets the Category field's value. +func (s *VpnConnection) SetCategory(v string) *VpnConnection { + s.Category = &v + return s +} + // SetCustomerGatewayConfiguration sets the CustomerGatewayConfiguration field's value. func (s *VpnConnection) SetCustomerGatewayConfiguration(v string) *VpnConnection { s.CustomerGatewayConfiguration = &v @@ -58617,9 +60787,15 @@ func (s *VpnConnectionOptions) SetStaticRoutesOnly(v bool) *VpnConnectionOptions type VpnConnectionOptionsSpecification struct { _ struct{} `type:"structure"` - // Indicates whether the VPN connection uses static routes only. Static routes - // must be used for devices that don't support BGP. + // Indicate whether the VPN connection uses static routes only. If you are creating + // a VPN connection for a device that does not support BGP, you must specify + // true. + // + // Default: false StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` + + // The tunnel options for the VPN connection. + TunnelOptions []*VpnTunnelOptionsSpecification `locationNameList:"item" type:"list"` } // String returns the string representation @@ -58638,11 +60814,20 @@ func (s *VpnConnectionOptionsSpecification) SetStaticRoutesOnly(v bool) *VpnConn return s } +// SetTunnelOptions sets the TunnelOptions field's value. +func (s *VpnConnectionOptionsSpecification) SetTunnelOptions(v []*VpnTunnelOptionsSpecification) *VpnConnectionOptionsSpecification { + s.TunnelOptions = v + return s +} + // Describes a virtual private gateway. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnGateway type VpnGateway struct { _ struct{} `type:"structure"` + // The private Autonomous System Number (ASN) for the Amazon side of a BGP session. + AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` + // The Availability Zone where the virtual private gateway was created, if applicable. // This field may be empty or not returned. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` @@ -58673,6 +60858,12 @@ func (s VpnGateway) GoString() string { return s.String() } +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *VpnGateway) SetAmazonSideAsn(v int64) *VpnGateway { + s.AmazonSideAsn = &v + return s +} + // SetAvailabilityZone sets the AvailabilityZone field's value. func (s *VpnGateway) SetAvailabilityZone(v string) *VpnGateway { s.AvailabilityZone = &v @@ -58752,6 +60943,63 @@ func (s *VpnStaticRoute) SetState(v string) *VpnStaticRoute { return s } +// The tunnel options for a VPN connection. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnTunnelOptionsSpecification +type VpnTunnelOptionsSpecification struct { + _ struct{} `type:"structure"` + + // The pre-shared key (PSK) to establish initial authentication between the + // virtual private gateway and customer gateway. + // + // Constraints: Allowed characters are alphanumeric characters and ._. Must + // be between 8 and 64 characters in length and cannot start with zero (0). + PreSharedKey *string `type:"string"` + + // The range of inside IP addresses for the tunnel. Any specified CIDR blocks + // must be unique across all VPN connections that use the same virtual private + // gateway. + // + // Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following + // CIDR blocks are reserved and cannot be used: + // + // * 169.254.0.0/30 + // + // * 169.254.1.0/30 + // + // * 169.254.2.0/30 + // + // * 169.254.3.0/30 + // + // * 169.254.4.0/30 + // + // * 169.254.5.0/30 + // + // * 169.254.169.252/30 + TunnelInsideCidr *string `type:"string"` +} + +// String returns the string representation +func (s VpnTunnelOptionsSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpnTunnelOptionsSpecification) GoString() string { + return s.String() +} + +// SetPreSharedKey sets the PreSharedKey field's value. +func (s *VpnTunnelOptionsSpecification) SetPreSharedKey(v string) *VpnTunnelOptionsSpecification { + s.PreSharedKey = &v + return s +} + +// SetTunnelInsideCidr sets the TunnelInsideCidr field's value. +func (s *VpnTunnelOptionsSpecification) SetTunnelInsideCidr(v string) *VpnTunnelOptionsSpecification { + s.TunnelInsideCidr = &v + return s +} + const ( // AccountAttributeNameSupportedPlatforms is a AccountAttributeName enum value AccountAttributeNameSupportedPlatforms = "supported-platforms" @@ -59080,6 +61328,20 @@ const ( FlowLogsResourceTypeNetworkInterface = "NetworkInterface" ) +const ( + // FpgaImageAttributeNameDescription is a FpgaImageAttributeName enum value + FpgaImageAttributeNameDescription = "description" + + // FpgaImageAttributeNameName is a FpgaImageAttributeName enum value + FpgaImageAttributeNameName = "name" + + // FpgaImageAttributeNameLoadPermission is a FpgaImageAttributeName enum value + FpgaImageAttributeNameLoadPermission = "loadPermission" + + // FpgaImageAttributeNameProductCodes is a FpgaImageAttributeName enum value + FpgaImageAttributeNameProductCodes = "productCodes" +) + const ( // FpgaImageStateCodePending is a FpgaImageStateCode enum value FpgaImageStateCodePending = "pending" @@ -59238,6 +61500,14 @@ const ( InstanceHealthStatusUnhealthy = "unhealthy" ) +const ( + // InstanceInterruptionBehaviorStop is a InstanceInterruptionBehavior enum value + InstanceInterruptionBehaviorStop = "stop" + + // InstanceInterruptionBehaviorTerminate is a InstanceInterruptionBehavior enum value + InstanceInterruptionBehaviorTerminate = "terminate" +) + const ( // InstanceLifecycleTypeSpot is a InstanceLifecycleType enum value InstanceLifecycleTypeSpot = "spot" @@ -59384,6 +61654,9 @@ const ( // InstanceTypeX132xlarge is a InstanceType enum value InstanceTypeX132xlarge = "x1.32xlarge" + // InstanceTypeX1e32xlarge is a InstanceType enum value + InstanceTypeX1e32xlarge = "x1e.32xlarge" + // InstanceTypeI2Xlarge is a InstanceType enum value InstanceTypeI2Xlarge = "i2.xlarge" @@ -59456,6 +61729,24 @@ const ( // InstanceTypeC48xlarge is a InstanceType enum value InstanceTypeC48xlarge = "c4.8xlarge" + // InstanceTypeC5Large is a InstanceType enum value + InstanceTypeC5Large = "c5.large" + + // InstanceTypeC5Xlarge is a InstanceType enum value + InstanceTypeC5Xlarge = "c5.xlarge" + + // InstanceTypeC52xlarge is a InstanceType enum value + InstanceTypeC52xlarge = "c5.2xlarge" + + // InstanceTypeC54xlarge is a InstanceType enum value + InstanceTypeC54xlarge = "c5.4xlarge" + + // InstanceTypeC59xlarge is a InstanceType enum value + InstanceTypeC59xlarge = "c5.9xlarge" + + // InstanceTypeC518xlarge is a InstanceType enum value + InstanceTypeC518xlarge = "c5.18xlarge" + // InstanceTypeCc14xlarge is a InstanceType enum value InstanceTypeCc14xlarge = "cc1.4xlarge" @@ -59489,6 +61780,15 @@ const ( // InstanceTypeP216xlarge is a InstanceType enum value InstanceTypeP216xlarge = "p2.16xlarge" + // InstanceTypeP32xlarge is a InstanceType enum value + InstanceTypeP32xlarge = "p3.2xlarge" + + // InstanceTypeP38xlarge is a InstanceType enum value + InstanceTypeP38xlarge = "p3.8xlarge" + + // InstanceTypeP316xlarge is a InstanceType enum value + InstanceTypeP316xlarge = "p3.16xlarge" + // InstanceTypeD2Xlarge is a InstanceType enum value InstanceTypeD2Xlarge = "d2.xlarge" @@ -59801,6 +62101,11 @@ const ( ReservedInstanceStateRetired = "retired" ) +const ( + // ResetFpgaImageAttributeNameLoadPermission is a ResetFpgaImageAttributeName enum value + ResetFpgaImageAttributeNameLoadPermission = "loadPermission" +) + const ( // ResetImageAttributeNameLaunchPermission is a ResetImageAttributeName enum value ResetImageAttributeNameLaunchPermission = "launchPermission" @@ -59886,6 +62191,14 @@ const ( RuleActionDeny = "deny" ) +const ( + // ServiceTypeInterface is a ServiceType enum value + ServiceTypeInterface = "Interface" + + // ServiceTypeGateway is a ServiceType enum value + ServiceTypeGateway = "Gateway" +) + const ( // ShutdownBehaviorStop is a ShutdownBehavior enum value ShutdownBehaviorStop = "stop" @@ -59939,6 +62252,9 @@ const ( ) const ( + // StatePendingAcceptance is a State enum value + StatePendingAcceptance = "PendingAcceptance" + // StatePending is a State enum value StatePending = "Pending" @@ -59950,6 +62266,15 @@ const ( // StateDeleted is a State enum value StateDeleted = "Deleted" + + // StateRejected is a State enum value + StateRejected = "Rejected" + + // StateFailed is a State enum value + StateFailed = "Failed" + + // StateExpired is a State enum value + StateExpired = "Expired" ) const ( @@ -60185,6 +62510,14 @@ const ( VpcCidrBlockStateCodeFailed = "failed" ) +const ( + // VpcEndpointTypeInterface is a VpcEndpointType enum value + VpcEndpointTypeInterface = "Interface" + + // VpcEndpointTypeGateway is a VpcEndpointType enum value + VpcEndpointTypeGateway = "Gateway" +) + const ( // VpcPeeringConnectionStateReasonCodeInitiatingRequest is a VpcPeeringConnectionStateReasonCode enum value VpcPeeringConnectionStateReasonCodeInitiatingRequest = "initiating-request" @@ -60222,6 +62555,11 @@ const ( VpcStateAvailable = "available" ) +const ( + // VpcTenancyDefault is a VpcTenancy enum value + VpcTenancyDefault = "default" +) + const ( // VpnStatePending is a VpnState enum value VpnStatePending = "pending" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go index 547167782..1ba51125e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go @@ -15,7 +15,7 @@ // // Using the Client // -// To Amazon Elastic Compute Cloud with the SDK use the New function to create +// To contact Amazon Elastic Compute Cloud with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go index 6914a666b..0469f0f01 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go @@ -1025,6 +1025,11 @@ func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context, Matcher: request.PathAllWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", Expected: "fulfilled", }, + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", + Expected: "request-canceled-and-instance-running", + }, { State: request.FailureWaiterState, Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code", diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go index f9136852f..5938049e3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go @@ -329,9 +329,9 @@ func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req * // CompleteLayerUpload API operation for Amazon EC2 Container Registry. // -// Inform Amazon ECR that the image layer upload for a specified registry, repository -// name, and upload ID, has completed. You can optionally provide a sha256 digest -// of the image layer for data validation purposes. +// Informs Amazon ECR that the image layer upload has completed for a specified +// registry, repository name, and upload ID. You can optionally provide a sha256 +// digest of the image layer for data validation purposes. // // This operation is used by the Amazon ECR proxy, and it is not intended for // general use by customers for pulling and pushing images. In most cases, you @@ -487,6 +487,96 @@ func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateReposito return out, req.Send() } +const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" + +// DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLifecyclePolicy operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLifecyclePolicyRequest method. +// req, resp := client.DeleteLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy +func (c *ECR) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opDeleteLifecyclePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLifecyclePolicyInput{} + } + + output = &DeleteLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteLifecyclePolicy API operation for Amazon EC2 Container Registry. +// +// Deletes the specified lifecycle policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation DeleteLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException" +// The lifecycle policy could not be found, and no policy is set to the repository. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy +func (c *ECR) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) { + req, out := c.DeleteLifecyclePolicyRequest(input) + return out, req.Send() +} + +// DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLifecyclePolicy for details on how to use this API operation. +// +// 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 *ECR) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) { + req, out := c.DeleteLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the @@ -1155,6 +1245,186 @@ func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownl return out, req.Send() } +const opGetLifecyclePolicy = "GetLifecyclePolicy" + +// GetLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetLifecyclePolicy operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLifecyclePolicy for more information on using the GetLifecyclePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLifecyclePolicyRequest method. +// req, resp := client.GetLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy +func (c *ECR) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opGetLifecyclePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetLifecyclePolicyInput{} + } + + output = &GetLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLifecyclePolicy API operation for Amazon EC2 Container Registry. +// +// Retrieves the specified lifecycle policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation GetLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException" +// The lifecycle policy could not be found, and no policy is set to the repository. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy +func (c *ECR) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) { + req, out := c.GetLifecyclePolicyRequest(input) + return out, req.Send() +} + +// GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetLifecyclePolicy for details on how to use this API operation. +// +// 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 *ECR) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) { + req, out := c.GetLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetLifecyclePolicyPreview = "GetLifecyclePolicyPreview" + +// GetLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the +// client's request for the GetLifecyclePolicyPreview operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLifecyclePolicyPreview for more information on using the GetLifecyclePolicyPreview +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLifecyclePolicyPreviewRequest method. +// req, resp := client.GetLifecyclePolicyPreviewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview +func (c *ECR) GetLifecyclePolicyPreviewRequest(input *GetLifecyclePolicyPreviewInput) (req *request.Request, output *GetLifecyclePolicyPreviewOutput) { + op := &request.Operation{ + Name: opGetLifecyclePolicyPreview, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetLifecyclePolicyPreviewInput{} + } + + output = &GetLifecyclePolicyPreviewOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLifecyclePolicyPreview API operation for Amazon EC2 Container Registry. +// +// Retrieves the results of the specified lifecycle policy preview request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation GetLifecyclePolicyPreview for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeLifecyclePolicyPreviewNotFoundException "LifecyclePolicyPreviewNotFoundException" +// There is no dry run for this repository. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview +func (c *ECR) GetLifecyclePolicyPreview(input *GetLifecyclePolicyPreviewInput) (*GetLifecyclePolicyPreviewOutput, error) { + req, out := c.GetLifecyclePolicyPreviewRequest(input) + return out, req.Send() +} + +// GetLifecyclePolicyPreviewWithContext is the same as GetLifecyclePolicyPreview with the addition of +// the ability to pass a context and additional request options. +// +// See GetLifecyclePolicyPreview for details on how to use this API operation. +// +// 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 *ECR) GetLifecyclePolicyPreviewWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.Option) (*GetLifecyclePolicyPreviewOutput, error) { + req, out := c.GetLifecyclePolicyPreviewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetRepositoryPolicy = "GetRepositoryPolicy" // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the @@ -1556,8 +1826,8 @@ func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, outpu // repository and ensure that you are performing operations on the correct registry. // // * ErrCodeImageAlreadyExistsException "ImageAlreadyExistsException" -// The specified image has already been pushed, and there are no changes to -// the manifest or image tag since the last push. +// The specified image has already been pushed, and there were no changes to +// the manifest or image tag after the last push. // // * ErrCodeLayersNotFoundException "LayersNotFoundException" // The specified layers could not be found, or the specified layer is not valid @@ -1591,6 +1861,93 @@ func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts .. return out, req.Send() } +const opPutLifecyclePolicy = "PutLifecyclePolicy" + +// PutLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutLifecyclePolicy operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutLifecyclePolicy for more information on using the PutLifecyclePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutLifecyclePolicyRequest method. +// req, resp := client.PutLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy +func (c *ECR) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opPutLifecyclePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutLifecyclePolicyInput{} + } + + output = &PutLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutLifecyclePolicy API operation for Amazon EC2 Container Registry. +// +// Creates or updates a lifecycle policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation PutLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy +func (c *ECR) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) { + req, out := c.PutLifecyclePolicyRequest(input) + return out, req.Send() +} + +// PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutLifecyclePolicy for details on how to use this API operation. +// +// 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 *ECR) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) { + req, out := c.PutLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opSetRepositoryPolicy = "SetRepositoryPolicy" // SetRepositoryPolicyRequest generates a "aws/request.Request" representing the @@ -1678,6 +2035,101 @@ func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetReposito return out, req.Send() } +const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview" + +// StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the +// client's request for the StartLifecyclePolicyPreview operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartLifecyclePolicyPreview for more information on using the StartLifecyclePolicyPreview +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartLifecyclePolicyPreviewRequest method. +// req, resp := client.StartLifecyclePolicyPreviewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview +func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPreviewInput) (req *request.Request, output *StartLifecyclePolicyPreviewOutput) { + op := &request.Operation{ + Name: opStartLifecyclePolicyPreview, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartLifecyclePolicyPreviewInput{} + } + + output = &StartLifecyclePolicyPreviewOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartLifecyclePolicyPreview API operation for Amazon EC2 Container Registry. +// +// Starts a preview of the specified lifecycle policy. This allows you to see +// the results before creating the lifecycle policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation StartLifecyclePolicyPreview for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException" +// The lifecycle policy could not be found, and no policy is set to the repository. +// +// * ErrCodeLifecyclePolicyPreviewInProgressException "LifecyclePolicyPreviewInProgressException" +// The previous lifecycle policy preview request has not completed. Please try +// again later. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview +func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error) { + req, out := c.StartLifecyclePolicyPreviewRequest(input) + return out, req.Send() +} + +// StartLifecyclePolicyPreviewWithContext is the same as StartLifecyclePolicyPreview with the addition of +// the ability to pass a context and additional request options. +// +// See StartLifecyclePolicyPreview for details on how to use this API operation. +// +// 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 *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *StartLifecyclePolicyPreviewInput, opts ...request.Option) (*StartLifecyclePolicyPreviewOutput, error) { + req, out := c.StartLifecyclePolicyPreviewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUploadLayerPart = "UploadLayerPart" // UploadLayerPartRequest generates a "aws/request.Request" representing the @@ -2360,11 +2812,115 @@ func (s *CreateRepositoryOutput) SetRepository(v *Repository) *CreateRepositoryO return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicyRequest +type DeleteLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // The AWS account ID associated with the registry that contains the repository. + // If you do not specify a registry, the default registry is assumed. + RegistryId *string `locationName:"registryId" type:"string"` + + // The name of the repository that is associated with the repository policy + // to
 delete. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRegistryId sets the RegistryId field's value. +func (s *DeleteLifecyclePolicyInput) SetRegistryId(v string) *DeleteLifecyclePolicyInput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *DeleteLifecyclePolicyInput) SetRepositoryName(v string) *DeleteLifecyclePolicyInput { + s.RepositoryName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicyResponse +type DeleteLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` + + // The time stamp of the last time that the lifecycle policy was run. + LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp" timestampFormat:"unix"` + + // The JSON repository policy text. + LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` + + // The registry ID associated with the request. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository name associated with the request. + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` +} + +// String returns the string representation +func (s DeleteLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLifecyclePolicyOutput) GoString() string { + return s.String() +} + +// SetLastEvaluatedAt sets the LastEvaluatedAt field's value. +func (s *DeleteLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *DeleteLifecyclePolicyOutput { + s.LastEvaluatedAt = &v + return s +} + +// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. +func (s *DeleteLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *DeleteLifecyclePolicyOutput { + s.LifecyclePolicyText = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *DeleteLifecyclePolicyOutput) SetRegistryId(v string) *DeleteLifecyclePolicyOutput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *DeleteLifecyclePolicyOutput) SetRepositoryName(v string) *DeleteLifecyclePolicyOutput { + s.RepositoryName = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryRequest type DeleteRepositoryInput struct { _ struct{} `type:"structure"` - // Force the deletion of the repository if it contains images. + // If a repository contains images, forces the deletion. Force *bool `locationName:"force" type:"boolean"` // The AWS account ID associated with the registry that contains the repository @@ -2990,6 +3546,296 @@ func (s *GetDownloadUrlForLayerOutput) SetLayerDigest(v string) *GetDownloadUrlF return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyRequest +type GetLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // The AWS account ID associated with the registry that contains the repository. + // If you do not specify a registry, the default registry is assumed. + RegistryId *string `locationName:"registryId" type:"string"` + + // The name of the repository with the policy to retrieve. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRegistryId sets the RegistryId field's value. +func (s *GetLifecyclePolicyInput) SetRegistryId(v string) *GetLifecyclePolicyInput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetLifecyclePolicyInput) SetRepositoryName(v string) *GetLifecyclePolicyInput { + s.RepositoryName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyResponse +type GetLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` + + // The time stamp of the last time that the lifecycle policy was run. + LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp" timestampFormat:"unix"` + + // The JSON repository policy text. + LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` + + // The registry ID associated with the request. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository name associated with the request. + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` +} + +// String returns the string representation +func (s GetLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePolicyOutput) GoString() string { + return s.String() +} + +// SetLastEvaluatedAt sets the LastEvaluatedAt field's value. +func (s *GetLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *GetLifecyclePolicyOutput { + s.LastEvaluatedAt = &v + return s +} + +// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. +func (s *GetLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *GetLifecyclePolicyOutput { + s.LifecyclePolicyText = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *GetLifecyclePolicyOutput) SetRegistryId(v string) *GetLifecyclePolicyOutput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetLifecyclePolicyOutput) SetRepositoryName(v string) *GetLifecyclePolicyOutput { + s.RepositoryName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreviewRequest +type GetLifecyclePolicyPreviewInput struct { + _ struct{} `type:"structure"` + + // An optional parameter that filters results based on image tag status and + // all tags, if tagged. + Filter *LifecyclePolicyPreviewFilter `locationName:"filter" type:"structure"` + + // The list of imageIDs to be included. + ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"` + + // The maximum number of repository results returned by GetLifecyclePolicyPreviewRequest + // in
 paginated output. When this parameter is used, GetLifecyclePolicyPreviewRequest + // only returns
 maxResults results in a single page along with a nextToken + // response element. The remaining results of the initial request can be seen + // by sending
 another GetLifecyclePolicyPreviewRequest request with the returned + // nextToken
 value. This value can be between 1 and 100. If this
 parameter + // is not used, then GetLifecyclePolicyPreviewRequest returns up to
 100 results + // and a nextToken value, if
 applicable. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The nextToken value returned from a previous paginated
 GetLifecyclePolicyPreviewRequest + // request where maxResults was used and the
 results exceeded the value of + // that parameter. Pagination continues from the end of the
 previous results + // that returned the nextToken value. This value is
 null when there are no + // more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The AWS account ID associated with the registry that contains the repository. + // If you do not specify a registry, the default registry is assumed. + RegistryId *string `locationName:"registryId" type:"string"` + + // The name of the repository with the policy to retrieve. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLifecyclePolicyPreviewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePolicyPreviewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLifecyclePolicyPreviewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyPreviewInput"} + if s.ImageIds != nil && len(s.ImageIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilter sets the Filter field's value. +func (s *GetLifecyclePolicyPreviewInput) SetFilter(v *LifecyclePolicyPreviewFilter) *GetLifecyclePolicyPreviewInput { + s.Filter = v + return s +} + +// SetImageIds sets the ImageIds field's value. +func (s *GetLifecyclePolicyPreviewInput) SetImageIds(v []*ImageIdentifier) *GetLifecyclePolicyPreviewInput { + s.ImageIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetLifecyclePolicyPreviewInput) SetMaxResults(v int64) *GetLifecyclePolicyPreviewInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetLifecyclePolicyPreviewInput) SetNextToken(v string) *GetLifecyclePolicyPreviewInput { + s.NextToken = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *GetLifecyclePolicyPreviewInput) SetRegistryId(v string) *GetLifecyclePolicyPreviewInput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetLifecyclePolicyPreviewInput) SetRepositoryName(v string) *GetLifecyclePolicyPreviewInput { + s.RepositoryName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreviewResponse +type GetLifecyclePolicyPreviewOutput struct { + _ struct{} `type:"structure"` + + // The JSON repository policy text. + LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` + + // The nextToken value to include in a future GetLifecyclePolicyPreview request. + // When the results of a GetLifecyclePolicyPreview request exceed maxResults, + // this value can be used to retrieve the next page of results. This value is + // null when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The results of the lifecycle policy preview request. + PreviewResults []*LifecyclePolicyPreviewResult `locationName:"previewResults" type:"list"` + + // The registry ID associated with the request. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository name associated with the request. + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` + + // The status of the lifecycle policy preview request. + Status *string `locationName:"status" type:"string" enum:"LifecyclePolicyPreviewStatus"` + + // The list of images that is returned as a result of the action. + Summary *LifecyclePolicyPreviewSummary `locationName:"summary" type:"structure"` +} + +// String returns the string representation +func (s GetLifecyclePolicyPreviewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePolicyPreviewOutput) GoString() string { + return s.String() +} + +// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. +func (s *GetLifecyclePolicyPreviewOutput) SetLifecyclePolicyText(v string) *GetLifecyclePolicyPreviewOutput { + s.LifecyclePolicyText = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetLifecyclePolicyPreviewOutput) SetNextToken(v string) *GetLifecyclePolicyPreviewOutput { + s.NextToken = &v + return s +} + +// SetPreviewResults sets the PreviewResults field's value. +func (s *GetLifecyclePolicyPreviewOutput) SetPreviewResults(v []*LifecyclePolicyPreviewResult) *GetLifecyclePolicyPreviewOutput { + s.PreviewResults = v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *GetLifecyclePolicyPreviewOutput) SetRegistryId(v string) *GetLifecyclePolicyPreviewOutput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetLifecyclePolicyPreviewOutput) SetRepositoryName(v string) *GetLifecyclePolicyPreviewOutput { + s.RepositoryName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetLifecyclePolicyPreviewOutput) SetStatus(v string) *GetLifecyclePolicyPreviewOutput { + s.Status = &v + return s +} + +// SetSummary sets the Summary field's value. +func (s *GetLifecyclePolicyPreviewOutput) SetSummary(v *LifecyclePolicyPreviewSummary) *GetLifecyclePolicyPreviewOutput { + s.Summary = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicyRequest type GetRepositoryPolicyInput struct { _ struct{} `type:"structure"` @@ -2998,7 +3844,7 @@ type GetRepositoryPolicyInput struct { // If you do not specify a registry, the default registry is assumed. RegistryId *string `locationName:"registryId" type:"string"` - // The name of the repository whose policy you want to retrieve. + // The name of the repository with the policy to retrieve. // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` @@ -3293,11 +4139,11 @@ func (s *ImageIdentifier) SetImageTag(v string) *ImageIdentifier { type InitiateLayerUploadInput struct { _ struct{} `type:"structure"` - // The AWS account ID associated with the registry that you intend to upload - // layers to. If you do not specify a registry, the default registry is assumed. + // The AWS account ID associated with the registry to which you intend to upload + // layers. If you do not specify a registry, the default registry is assumed. RegistryId *string `locationName:"registryId" type:"string"` - // The name of the repository that you intend to upload layers to. + // The name of the repository to which you intend to upload layers. // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` @@ -3472,6 +4318,143 @@ func (s *LayerFailure) SetLayerDigest(v string) *LayerFailure { return s } +// The filter for the lifecycle policy preview. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewFilter +type LifecyclePolicyPreviewFilter struct { + _ struct{} `type:"structure"` + + // The tag status of the image. + TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"` +} + +// String returns the string representation +func (s LifecyclePolicyPreviewFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LifecyclePolicyPreviewFilter) GoString() string { + return s.String() +} + +// SetTagStatus sets the TagStatus field's value. +func (s *LifecyclePolicyPreviewFilter) SetTagStatus(v string) *LifecyclePolicyPreviewFilter { + s.TagStatus = &v + return s +} + +// The result of the lifecycle policy preview. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewResult +type LifecyclePolicyPreviewResult struct { + _ struct{} `type:"structure"` + + // The type of action to be taken. + Action *LifecyclePolicyRuleAction `locationName:"action" type:"structure"` + + // The priority of the applied rule. + AppliedRulePriority *int64 `locationName:"appliedRulePriority" min:"1" type:"integer"` + + // The sha256 digest of the image manifest. + ImageDigest *string `locationName:"imageDigest" type:"string"` + + // The date and time, expressed in standard JavaScript date format, at which + // the current image was pushed to the repository. + ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp" timestampFormat:"unix"` + + // The list of tags associated with this image. + ImageTags []*string `locationName:"imageTags" type:"list"` +} + +// String returns the string representation +func (s LifecyclePolicyPreviewResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LifecyclePolicyPreviewResult) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *LifecyclePolicyPreviewResult) SetAction(v *LifecyclePolicyRuleAction) *LifecyclePolicyPreviewResult { + s.Action = v + return s +} + +// SetAppliedRulePriority sets the AppliedRulePriority field's value. +func (s *LifecyclePolicyPreviewResult) SetAppliedRulePriority(v int64) *LifecyclePolicyPreviewResult { + s.AppliedRulePriority = &v + return s +} + +// SetImageDigest sets the ImageDigest field's value. +func (s *LifecyclePolicyPreviewResult) SetImageDigest(v string) *LifecyclePolicyPreviewResult { + s.ImageDigest = &v + return s +} + +// SetImagePushedAt sets the ImagePushedAt field's value. +func (s *LifecyclePolicyPreviewResult) SetImagePushedAt(v time.Time) *LifecyclePolicyPreviewResult { + s.ImagePushedAt = &v + return s +} + +// SetImageTags sets the ImageTags field's value. +func (s *LifecyclePolicyPreviewResult) SetImageTags(v []*string) *LifecyclePolicyPreviewResult { + s.ImageTags = v + return s +} + +// The summary of the lifecycle policy preview request. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewSummary +type LifecyclePolicyPreviewSummary struct { + _ struct{} `type:"structure"` + + // The number of expiring images. + ExpiringImageTotalCount *int64 `locationName:"expiringImageTotalCount" type:"integer"` +} + +// String returns the string representation +func (s LifecyclePolicyPreviewSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LifecyclePolicyPreviewSummary) GoString() string { + return s.String() +} + +// SetExpiringImageTotalCount sets the ExpiringImageTotalCount field's value. +func (s *LifecyclePolicyPreviewSummary) SetExpiringImageTotalCount(v int64) *LifecyclePolicyPreviewSummary { + s.ExpiringImageTotalCount = &v + return s +} + +// The type of action to be taken. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyRuleAction +type LifecyclePolicyRuleAction struct { + _ struct{} `type:"structure"` + + // The type of action to be taken. + Type *string `locationName:"type" type:"string" enum:"ImageActionType"` +} + +// String returns the string representation +func (s LifecyclePolicyRuleAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LifecyclePolicyRuleAction) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *LifecyclePolicyRuleAction) SetType(v string) *LifecyclePolicyRuleAction { + s.Type = &v + return s +} + // An object representing a filter on a ListImages operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImagesFilter type ListImagesFilter struct { @@ -3524,11 +4507,11 @@ type ListImagesInput struct { NextToken *string `locationName:"nextToken" type:"string"` // The AWS account ID associated with the registry that contains the repository - // to list images in. If you do not specify a registry, the default registry + // in which to list images. If you do not specify a registry, the default registry // is assumed. RegistryId *string `locationName:"registryId" type:"string"` - // The repository whose image IDs are to be listed. + // The repository with image IDs to be listed. // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` @@ -3730,28 +4713,138 @@ func (s *PutImageOutput) SetImage(v *Image) *PutImageOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicyRequest +type PutLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // The JSON repository policy text to apply to the repository. + // + // LifecyclePolicyText is a required field + LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string" required:"true"` + + // The AWS account ID associated with the registry that contains the repository. + // If you do
 not specify a registry, the default registry is assumed. + RegistryId *string `locationName:"registryId" type:"string"` + + // The name of the repository to receive the policy. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"} + if s.LifecyclePolicyText == nil { + invalidParams.Add(request.NewErrParamRequired("LifecyclePolicyText")) + } + if s.LifecyclePolicyText != nil && len(*s.LifecyclePolicyText) < 100 { + invalidParams.Add(request.NewErrParamMinLen("LifecyclePolicyText", 100)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. +func (s *PutLifecyclePolicyInput) SetLifecyclePolicyText(v string) *PutLifecyclePolicyInput { + s.LifecyclePolicyText = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *PutLifecyclePolicyInput) SetRegistryId(v string) *PutLifecyclePolicyInput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *PutLifecyclePolicyInput) SetRepositoryName(v string) *PutLifecyclePolicyInput { + s.RepositoryName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicyResponse +type PutLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` + + // The JSON repository policy text. + LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` + + // The registry ID associated with the request. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository name associated with the request. + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` +} + +// String returns the string representation +func (s PutLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLifecyclePolicyOutput) GoString() string { + return s.String() +} + +// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. +func (s *PutLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *PutLifecyclePolicyOutput { + s.LifecyclePolicyText = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *PutLifecyclePolicyOutput) SetRegistryId(v string) *PutLifecyclePolicyOutput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *PutLifecyclePolicyOutput) SetRepositoryName(v string) *PutLifecyclePolicyOutput { + s.RepositoryName = &v + return s +} + // An object representing a repository. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Repository type Repository struct { _ struct{} `type:"structure"` - // The date and time, in JavaScript date/time format, when the repository was - // created. + // The date and time, in JavaScript date format, when the repository was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` // The AWS account ID associated with the registry that contains the repository. RegistryId *string `locationName:"registryId" type:"string"` // The Amazon Resource Name (ARN) that identifies the repository. The ARN contains - // the arn:aws:ecr namespace, followed by the region of the repository, the - // AWS account ID of the repository owner, the repository namespace, and then - // the repository name. For example, arn:aws:ecr:region:012345678910:repository/test. + // the arn:aws:ecr namespace, followed by the region of the repository, AWS + // account ID of the repository owner, repository namespace, and repository + // name. For example, arn:aws:ecr:region:012345678910:repository/test. RepositoryArn *string `locationName:"repositoryArn" type:"string"` // The name of the repository. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` - // The URI for the repository. You can use this URI for Docker push and pull + // The URI for the repository. You can use this URI for Docker push or pull // operations. RepositoryUri *string `locationName:"repositoryUri" type:"string"` } @@ -3915,6 +5008,122 @@ func (s *SetRepositoryPolicyOutput) SetRepositoryName(v string) *SetRepositoryPo return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreviewRequest +type StartLifecyclePolicyPreviewInput struct { + _ struct{} `type:"structure"` + + // The policy to be evaluated against. If you do not specify a policy, the current + // policy for the repository is used. + LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` + + // The AWS account ID associated with the registry that contains the repository. + // If you do not specify a registry, the default registry is assumed. + RegistryId *string `locationName:"registryId" type:"string"` + + // The name of the repository to be evaluated. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartLifecyclePolicyPreviewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartLifecyclePolicyPreviewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartLifecyclePolicyPreviewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartLifecyclePolicyPreviewInput"} + if s.LifecyclePolicyText != nil && len(*s.LifecyclePolicyText) < 100 { + invalidParams.Add(request.NewErrParamMinLen("LifecyclePolicyText", 100)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. +func (s *StartLifecyclePolicyPreviewInput) SetLifecyclePolicyText(v string) *StartLifecyclePolicyPreviewInput { + s.LifecyclePolicyText = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *StartLifecyclePolicyPreviewInput) SetRegistryId(v string) *StartLifecyclePolicyPreviewInput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *StartLifecyclePolicyPreviewInput) SetRepositoryName(v string) *StartLifecyclePolicyPreviewInput { + s.RepositoryName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreviewResponse +type StartLifecyclePolicyPreviewOutput struct { + _ struct{} `type:"structure"` + + // The JSON repository policy text. + LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` + + // The registry ID associated with the request. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository name associated with the request. + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` + + // The status of the lifecycle policy preview request. + Status *string `locationName:"status" type:"string" enum:"LifecyclePolicyPreviewStatus"` +} + +// String returns the string representation +func (s StartLifecyclePolicyPreviewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartLifecyclePolicyPreviewOutput) GoString() string { + return s.String() +} + +// SetLifecyclePolicyText sets the LifecyclePolicyText field's value. +func (s *StartLifecyclePolicyPreviewOutput) SetLifecyclePolicyText(v string) *StartLifecyclePolicyPreviewOutput { + s.LifecyclePolicyText = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *StartLifecyclePolicyPreviewOutput) SetRegistryId(v string) *StartLifecyclePolicyPreviewOutput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *StartLifecyclePolicyPreviewOutput) SetRepositoryName(v string) *StartLifecyclePolicyPreviewOutput { + s.RepositoryName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *StartLifecyclePolicyPreviewOutput) SetStatus(v string) *StartLifecyclePolicyPreviewOutput { + s.Status = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPartRequest type UploadLayerPartInput struct { _ struct{} `type:"structure"` @@ -3936,11 +5145,11 @@ type UploadLayerPartInput struct { // PartLastByte is a required field PartLastByte *int64 `locationName:"partLastByte" type:"long" required:"true"` - // The AWS account ID associated with the registry that you are uploading layer - // parts to. If you do not specify a registry, the default registry is assumed. + // The AWS account ID associated with the registry to which you are uploading + // layer parts. If you do not specify a registry, the default registry is assumed. RegistryId *string `locationName:"registryId" type:"string"` - // The name of the repository that you are uploading layer parts to. + // The name of the repository to which you are uploading layer parts. // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` @@ -4077,6 +5286,11 @@ func (s *UploadLayerPartOutput) SetUploadId(v string) *UploadLayerPartOutput { return s } +const ( + // ImageActionTypeExpire is a ImageActionType enum value + ImageActionTypeExpire = "EXPIRE" +) + const ( // ImageFailureCodeInvalidImageDigest is a ImageFailureCode enum value ImageFailureCodeInvalidImageDigest = "InvalidImageDigest" @@ -4110,6 +5324,20 @@ const ( LayerFailureCodeMissingLayerDigest = "MissingLayerDigest" ) +const ( + // LifecyclePolicyPreviewStatusInProgress is a LifecyclePolicyPreviewStatus enum value + LifecyclePolicyPreviewStatusInProgress = "IN_PROGRESS" + + // LifecyclePolicyPreviewStatusComplete is a LifecyclePolicyPreviewStatus enum value + LifecyclePolicyPreviewStatusComplete = "COMPLETE" + + // LifecyclePolicyPreviewStatusExpired is a LifecyclePolicyPreviewStatus enum value + LifecyclePolicyPreviewStatusExpired = "EXPIRED" + + // LifecyclePolicyPreviewStatusFailed is a LifecyclePolicyPreviewStatus enum value + LifecyclePolicyPreviewStatusFailed = "FAILED" +) + const ( // TagStatusTagged is a TagStatus enum value TagStatusTagged = "TAGGED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go index 987aa72fa..a2aea0f6e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go @@ -3,11 +3,11 @@ // Package ecr provides the client and types for making API // requests to Amazon EC2 Container Registry. // -// Amazon EC2 Container Registry (Amazon ECR) is a managed AWS Docker registry -// service. Customers can use the familiar Docker CLI to push, pull, and manage -// images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon -// ECR supports private Docker repositories with resource-based permissions -// using AWS IAM so that specific users or Amazon EC2 instances can access repositories +// Amazon EC2 Container Registry (Amazon ECR) is a managed Docker registry service. +// Customers can use the familiar Docker CLI to push, pull, and manage images. +// Amazon ECR provides a secure, scalable, and reliable registry. Amazon ECR +// supports private Docker repositories with resource-based permissions using +// IAM so that specific users or Amazon EC2 instances can access repositories // and images. Developers can use the Docker CLI to author and manage images. // // See https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21 for more information on this service. @@ -17,7 +17,7 @@ // // Using the Client // -// To Amazon EC2 Container Registry with the SDK use the New function to create +// To contact Amazon EC2 Container Registry with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go index 4399e6a29..2a2caaedd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go @@ -13,8 +13,8 @@ const ( // ErrCodeImageAlreadyExistsException for service response error code // "ImageAlreadyExistsException". // - // The specified image has already been pushed, and there are no changes to - // the manifest or image tag since the last push. + // The specified image has already been pushed, and there were no changes to + // the manifest or image tag after the last push. ErrCodeImageAlreadyExistsException = "ImageAlreadyExistsException" // ErrCodeImageNotFoundException for service response error code @@ -70,6 +70,25 @@ const ( // for this repository. ErrCodeLayersNotFoundException = "LayersNotFoundException" + // ErrCodeLifecyclePolicyNotFoundException for service response error code + // "LifecyclePolicyNotFoundException". + // + // The lifecycle policy could not be found, and no policy is set to the repository. + ErrCodeLifecyclePolicyNotFoundException = "LifecyclePolicyNotFoundException" + + // ErrCodeLifecyclePolicyPreviewInProgressException for service response error code + // "LifecyclePolicyPreviewInProgressException". + // + // The previous lifecycle policy preview request has not completed. Please try + // again later. + ErrCodeLifecyclePolicyPreviewInProgressException = "LifecyclePolicyPreviewInProgressException" + + // ErrCodeLifecyclePolicyPreviewNotFoundException for service response error code + // "LifecyclePolicyPreviewNotFoundException". + // + // There is no dry run for this repository. + ErrCodeLifecyclePolicyPreviewNotFoundException = "LifecyclePolicyPreviewNotFoundException" + // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index 19abc2d01..6ea2ed95b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -59,6 +59,14 @@ func (c *ECS) CreateClusterRequest(input *CreateClusterInput) (req *request.Requ // cluster when you launch your first container instance. However, you can create // your own cluster with a unique name with the CreateCluster action. // +// When you call the CreateCluster API operation, Amazon ECS attempts to create +// the service-linked role for your account so that required resources in other +// AWS services can be managed on your behalf. However, if the IAM user that +// makes the call does not have permissions to create the service-linked role, +// it is not created. For more information, see Using Service-Linked Roles for +// Amazon ECS (http://docs.aws.amazon.com/AmazonECS/latest/developerguideusing-service-linked-roles.html) +// in the Amazon EC2 Container Service Developer Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3357,8 +3365,8 @@ func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Requ // UpdateService API operation for Amazon EC2 Container Service. // -// Modifies the desired count, deployment configuration, or task definition -// used in a service. +// Modifies the desired count, deployment configuration, network configuration, +// or task definition used in a service. // // You can add to or subtract from the number of instantiations of a task definition // in a service by specifying the cluster that the service is running in and @@ -3480,6 +3488,115 @@ func (c *ECS) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInpu return out, req.Send() } +// An object representing a container instance or task attachment. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/Attachment +type Attachment struct { + _ struct{} `type:"structure"` + + // Details of the attachment. For Elastic Network Interfaces, this includes + // the network interface ID, the MAC address, the subnet ID, and the private + // IPv4 address. + Details []*KeyValuePair `locationName:"details" type:"list"` + + // The unique identifier for the attachment. + Id *string `locationName:"id" type:"string"` + + // The status of the attachment. Valid values are PRECREATED, CREATED, ATTACHING, + // ATTACHED, DETACHING, DETACHED, and DELETED. + Status *string `locationName:"status" type:"string"` + + // The type of the attachment, such as an ElasticNetworkInterface. + Type *string `locationName:"type" type:"string"` +} + +// String returns the string representation +func (s Attachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Attachment) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *Attachment) SetDetails(v []*KeyValuePair) *Attachment { + s.Details = v + return s +} + +// SetId sets the Id field's value. +func (s *Attachment) SetId(v string) *Attachment { + s.Id = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *Attachment) SetStatus(v string) *Attachment { + s.Status = &v + return s +} + +// SetType sets the Type field's value. +func (s *Attachment) SetType(v string) *Attachment { + s.Type = &v + return s +} + +// An object representing a change in state for a task attachment. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/AttachmentStateChange +type AttachmentStateChange struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the attachment. + // + // AttachmentArn is a required field + AttachmentArn *string `locationName:"attachmentArn" type:"string" required:"true"` + + // The status of the attachment. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachmentStateChange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachmentStateChange) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachmentStateChange) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachmentStateChange"} + if s.AttachmentArn == nil { + invalidParams.Add(request.NewErrParamRequired("AttachmentArn")) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttachmentArn sets the AttachmentArn field's value. +func (s *AttachmentStateChange) SetAttachmentArn(v string) *AttachmentStateChange { + s.AttachmentArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AttachmentStateChange) SetStatus(v string) *AttachmentStateChange { + s.Status = &v + return s +} + // An attribute is a name-value pair associated with an Amazon ECS object. Attributes // enable you to extend the Amazon ECS data model by adding custom metadata // to your resources. For more information, see Attributes (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes) @@ -3556,6 +3673,56 @@ func (s *Attribute) SetValue(v string) *Attribute { return s } +// An object representing the subnets and security groups for a task or service. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/AwsVpcConfiguration +type AwsVpcConfiguration struct { + _ struct{} `type:"structure"` + + // The security groups associated with the task or service. If you do not specify + // a security group, the default security group for the VPC is used. + SecurityGroups []*string `locationName:"securityGroups" type:"list"` + + // The subnets associated with the task or service. + // + // Subnets is a required field + Subnets []*string `locationName:"subnets" type:"list" required:"true"` +} + +// String returns the string representation +func (s AwsVpcConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsVpcConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsVpcConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"} + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration { + s.SecurityGroups = v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { + s.Subnets = v + return s +} + // A regional grouping of one or more container instances on which you can run // task requests. Each account receives a default cluster the first time you // use the Amazon ECS service, but you may also create other clusters. Clusters @@ -3664,6 +3831,9 @@ type Container struct { // The network bindings associated with the container. NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"` + // The network interfaces associated with the container. + NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` + // A short (255 max characters) human-readable string to provide additional // details about a running or stopped container. Reason *string `locationName:"reason" type:"string"` @@ -3712,6 +3882,12 @@ func (s *Container) SetNetworkBindings(v []*NetworkBinding) *Container { return s } +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *Container) SetNetworkInterfaces(v []*NetworkInterface) *Container { + s.NetworkInterfaces = v + return s +} + // SetReason sets the Reason field's value. func (s *Container) SetReason(v string) *Container { s.Reason = &v @@ -3731,8 +3907,8 @@ type ContainerDefinition struct { _ struct{} `type:"structure"` // The command that is passed to the container. This parameter maps to Cmd in - // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/). // For more information, see https://docs.docker.com/engine/reference/builder/#cmd // (https://docs.docker.com/engine/reference/builder/#cmd). @@ -3743,8 +3919,8 @@ type ContainerDefinition struct { // amount of CPU to reserve for a container, and containers share unallocated // CPU units with other containers on the instance with the same ratio as their // allocated amount. This parameter maps to CpuShares in the Create a container - // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/). // // You can determine the number of CPU units that are available per EC2 instance @@ -3780,25 +3956,25 @@ type ContainerDefinition struct { Cpu *int64 `locationName:"cpu" type:"integer"` // When this parameter is true, networking is disabled within the container. - // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/). + // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/). DisableNetworking *bool `locationName:"disableNetworking" type:"boolean"` // A list of DNS search domains that are presented to the container. This parameter - // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --dns-search option to docker run (https://docs.docker.com/engine/reference/run/). DnsSearchDomains []*string `locationName:"dnsSearchDomains" type:"list"` // A list of DNS servers that are presented to the container. This parameter - // maps to Dns in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // maps to Dns in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --dns option to docker run (https://docs.docker.com/engine/reference/run/). DnsServers []*string `locationName:"dnsServers" type:"list"` // A key/value map of labels to add to the container. This parameter maps to - // Labels in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // Labels in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --label option to docker run (https://docs.docker.com/engine/reference/run/). // This parameter requires version 1.18 of the Docker Remote API or greater // on your container instance. To check the Docker Remote API version on your @@ -3808,8 +3984,8 @@ type ContainerDefinition struct { // A list of strings to provide custom labels for SELinux and AppArmor multi-level // security systems. This parameter maps to SecurityOpt in the Create a container - // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --security-opt option to docker run (https://docs.docker.com/engine/reference/run/). // // The Amazon ECS container agent running on a container instance must register @@ -3825,16 +4001,16 @@ type ContainerDefinition struct { // agent or enter your commands and arguments as command array items instead. // // The entry point that is passed to the container. This parameter maps to Entrypoint - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --entrypoint option to docker run (https://docs.docker.com/engine/reference/run/). // For more information, see https://docs.docker.com/engine/reference/builder/#entrypoint // (https://docs.docker.com/engine/reference/builder/#entrypoint). EntryPoint []*string `locationName:"entryPoint" type:"list"` // The environment variables to pass to a container. This parameter maps to - // Env in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // Env in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --env option to docker run (https://docs.docker.com/engine/reference/run/). // // We do not recommend using plain text environment variables for sensitive @@ -3857,28 +4033,31 @@ type ContainerDefinition struct { // A list of hostnames and IP address mappings to append to the /etc/hosts file // on the container. This parameter maps to ExtraHosts in the Create a container - // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --add-host option to docker run (https://docs.docker.com/engine/reference/run/). ExtraHosts []*HostEntry `locationName:"extraHosts" type:"list"` // The hostname to use for your container. This parameter maps to Hostname in - // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --hostname option to docker run (https://docs.docker.com/engine/reference/run/). Hostname *string `locationName:"hostname" type:"string"` // The image used to start a container. This string is passed directly to the // Docker daemon. Images in the Docker Hub registry are available by default. - // Other repositories are specified with repository-url/image:tag. Up to 255 - // letters (uppercase and lowercase), numbers, hyphens, underscores, colons, - // periods, forward slashes, and number signs are allowed. This parameter maps - // to Image in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // Other repositories are specified with either repository-url/image:tag or + // repository-url/image@digest. Up to 255 letters (uppercase and lowercase), + // numbers, hyphens, underscores, colons, periods, forward slashes, and number + // signs are allowed. This parameter maps to Image in the Create a container + // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/). // - // * Images in Amazon ECR repositories use the full registry and repository - // URI (for example, 012345678910.dkr.ecr..amazonaws.com/). + // * Images in Amazon ECR repositories can be specified by either using the + // full registry/repository:tag or registry/repository@digest. For example, + // 012345678910.dkr.ecr..amazonaws.com/:latest + // or 012345678910.dkr.ecr..amazonaws.com/@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE. // // // * Images in official repositories on Docker Hub use a single name (for @@ -3898,8 +4077,8 @@ type ContainerDefinition struct { // are allowed for each name and alias. For more information on linking Docker // containers, see https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/ // (https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/). - // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --link option to docker run (https://docs.docker.com/engine/reference/run/). // // Containers that are collocated on a single container instance may be able @@ -3908,9 +4087,13 @@ type ContainerDefinition struct { // and VPC settings. Links []*string `locationName:"links" type:"list"` + // Linux-specific modifications that are applied to the container, such as Linux + // KernelCapabilities. + LinuxParameters *LinuxParameters `locationName:"linuxParameters" type:"structure"` + // The log configuration specification for the container. This parameter maps - // to LogConfig in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // to LogConfig in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --log-driver option to docker run (https://docs.docker.com/engine/reference/run/). // By default, containers use the same logging driver that the Docker daemon // uses; however the container may use a different logging driver than the Docker @@ -3940,8 +4123,8 @@ type ContainerDefinition struct { // The hard limit (in MiB) of memory to present to the container. If your container // attempts to exceed the memory specified here, the container is killed. This - // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/). // // You must specify a non-zero integer for one or both of memory or memoryReservation @@ -3960,8 +4143,8 @@ type ContainerDefinition struct { // it needs to, up to either the hard limit specified with the memory parameter // (if applicable), or all of the available memory on the container instance, // whichever comes first. This parameter maps to MemoryReservation in the Create - // a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --memory-reservation option to docker run (https://docs.docker.com/engine/reference/run/). // // You must specify a non-zero integer for one or both of memory or memoryReservation @@ -3979,8 +4162,8 @@ type ContainerDefinition struct { MemoryReservation *int64 `locationName:"memoryReservation" type:"integer"` // The mount points for data volumes in your container. This parameter maps - // to Volumes in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // to Volumes in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --volume option to docker run (https://docs.docker.com/engine/reference/run/). MountPoints []*MountPoint `locationName:"mountPoints" type:"list"` @@ -3988,15 +4171,15 @@ type ContainerDefinition struct { // in a task definition, the name of one container can be entered in the links // of another container to connect the containers. Up to 255 letters (uppercase // and lowercase), numbers, hyphens, and underscores are allowed. This parameter - // maps to name in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // maps to name in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --name option to docker run (https://docs.docker.com/engine/reference/run/). Name *string `locationName:"name" type:"string"` // The list of port mappings for the container. Port mappings allow containers // to access ports on the host container instance to send or receive traffic. - // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --publish option to docker run (https://docs.docker.com/engine/reference/run/). // If the network mode of a task definition is set to none, then you cannot // specify port mappings. If the network mode of a task definition is set to @@ -4011,21 +4194,21 @@ type ContainerDefinition struct { // When this parameter is true, the container is given elevated privileges on // the host container instance (similar to the root user). This parameter maps - // to Privileged in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // to Privileged in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/). Privileged *bool `locationName:"privileged" type:"boolean"` // When this parameter is true, the container is given read-only access to its // root file system. This parameter maps to ReadonlyRootfs in the Create a container - // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --read-only option to docker run. ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"` // A list of ulimits to set in the container. This parameter maps to Ulimits - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/). // Valid naming values are displayed in the Ulimit data type. This parameter // requires version 1.18 of the Docker Remote API or greater on your container @@ -4035,20 +4218,20 @@ type ContainerDefinition struct { Ulimits []*Ulimit `locationName:"ulimits" type:"list"` // The user name to use inside the container. This parameter maps to User in - // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --user option to docker run (https://docs.docker.com/engine/reference/run/). User *string `locationName:"user" type:"string"` // Data volumes to mount from another container. This parameter maps to VolumesFrom - // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --volumes-from option to docker run (https://docs.docker.com/engine/reference/run/). VolumesFrom []*VolumeFrom `locationName:"volumesFrom" type:"list"` // The working directory in which to run commands inside the container. This - // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/) + // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --workdir option to docker run (https://docs.docker.com/engine/reference/run/). WorkingDirectory *string `locationName:"workingDirectory" type:"string"` } @@ -4076,6 +4259,11 @@ func (s *ContainerDefinition) Validate() error { } } } + if s.LinuxParameters != nil { + if err := s.LinuxParameters.Validate(); err != nil { + invalidParams.AddNested("LinuxParameters", err.(request.ErrInvalidParams)) + } + } if s.LogConfiguration != nil { if err := s.LogConfiguration.Validate(); err != nil { invalidParams.AddNested("LogConfiguration", err.(request.ErrInvalidParams)) @@ -4182,6 +4370,12 @@ func (s *ContainerDefinition) SetLinks(v []*string) *ContainerDefinition { return s } +// SetLinuxParameters sets the LinuxParameters field's value. +func (s *ContainerDefinition) SetLinuxParameters(v *LinuxParameters) *ContainerDefinition { + s.LinuxParameters = v + return s +} + // SetLogConfiguration sets the LogConfiguration field's value. func (s *ContainerDefinition) SetLogConfiguration(v *LogConfiguration) *ContainerDefinition { s.LogConfiguration = v @@ -4270,6 +4464,9 @@ type ContainerInstance struct { // this value is NULL. AgentUpdateStatus *string `locationName:"agentUpdateStatus" type:"string" enum:"AgentUpdateStatus"` + // The Elastic Network Interfaces associated with the container instance. + Attachments []*Attachment `locationName:"attachments" type:"list"` + // The attributes set for the container instance, either by the Amazon ECS container // agent at instance registration or manually with the PutAttributes operation. Attributes []*Attribute `locationName:"attributes" type:"list"` @@ -4350,6 +4547,12 @@ func (s *ContainerInstance) SetAgentUpdateStatus(v string) *ContainerInstance { return s } +// SetAttachments sets the Attachments field's value. +func (s *ContainerInstance) SetAttachments(v []*Attachment) *ContainerInstance { + s.Attachments = v + return s +} + // SetAttributes sets the Attributes field's value. func (s *ContainerInstance) SetAttributes(v []*Attribute) *ContainerInstance { s.Attributes = v @@ -4498,6 +4701,68 @@ func (s *ContainerOverride) SetName(v string) *ContainerOverride { return s } +// An object representing a change in state for a container. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ContainerStateChange +type ContainerStateChange struct { + _ struct{} `type:"structure"` + + // The name of the container. + ContainerName *string `locationName:"containerName" type:"string"` + + // The exit code for the container, if the state change is a result of the container + // exiting. + ExitCode *int64 `locationName:"exitCode" type:"integer"` + + // Any network bindings associated with the container. + NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"` + + // The reason for the state change. + Reason *string `locationName:"reason" type:"string"` + + // The status of the container. + Status *string `locationName:"status" type:"string"` +} + +// String returns the string representation +func (s ContainerStateChange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContainerStateChange) GoString() string { + return s.String() +} + +// SetContainerName sets the ContainerName field's value. +func (s *ContainerStateChange) SetContainerName(v string) *ContainerStateChange { + s.ContainerName = &v + return s +} + +// SetExitCode sets the ExitCode field's value. +func (s *ContainerStateChange) SetExitCode(v int64) *ContainerStateChange { + s.ExitCode = &v + return s +} + +// SetNetworkBindings sets the NetworkBindings field's value. +func (s *ContainerStateChange) SetNetworkBindings(v []*NetworkBinding) *ContainerStateChange { + s.NetworkBindings = v + return s +} + +// SetReason sets the Reason field's value. +func (s *ContainerStateChange) SetReason(v string) *ContainerStateChange { + s.Reason = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ContainerStateChange) SetStatus(v string) *ContainerStateChange { + s.Status = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateClusterRequest type CreateClusterInput struct { _ struct{} `type:"structure"` @@ -4576,20 +4841,27 @@ type CreateServiceInput struct { // After you create a service, the load balancer name or target group ARN, container // name, and container port specified in the service definition are immutable. // - // For Elastic Load Balancing Classic load balancers, this object must contain - // the load balancer name, the container name (as it appears in a container - // definition), and the container port to access from the load balancer. When - // a task from this service is placed on a container instance, the container - // instance is registered with the load balancer specified here. + // For Classic Load Balancers, this object must contain the load balancer name, + // the container name (as it appears in a container definition), and the container + // port to access from the load balancer. When a task from this service is placed + // on a container instance, the container instance is registered with the load + // balancer specified here. // - // For Elastic Load Balancing Application load balancers, this object must contain - // the load balancer target group ARN, the container name (as it appears in - // a container definition), and the container port to access from the load balancer. - // When a task from this service is placed on a container instance, the container - // instance and port combination is registered as a target in the target group - // specified here. + // For Application Load Balancers and Network Load Balancers, this object must + // contain the load balancer target group ARN, the container name (as it appears + // in a container definition), and the container port to access from the load + // balancer. When a task from this service is placed on a container instance, + // the container instance and port combination is registered as a target in + // the target group specified here. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` + // The network configuration for the service. This parameter is required for + // task definitions that use the awsvpc network mode to receive their own Elastic + // Network Interface, and it is not supported for other network modes. For more + // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguidetask-networking.html) + // in the Amazon EC2 Container Service Developer Guide. + NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` + // An array of placement constraint objects to use for tasks in your service. // You can specify a maximum of 10 constraints per task (this limit includes // constraints in the task definition and those specified at run time). @@ -4601,9 +4873,17 @@ type CreateServiceInput struct { // The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon // ECS to make calls to your load balancer on your behalf. This parameter is - // required if you are using a load balancer with your service. If you specify - // the role parameter, you must also specify a load balancer object with the - // loadBalancers parameter. + // only permitted if you are using a load balancer with your service and your + // task definition does not use the awsvpc network mode. If you specify the + // role parameter, you must also specify a load balancer object with the loadBalancers + // parameter. + // + // If your account has already created the Amazon ECS service-linked role, that + // role is used by default for your service unless you specify a role here. + // The service-linked role is required if your task definition uses the awsvpc + // network mode, in which case you should not specify a role here. For more + // information, see Using Service-Linked Roles for Amazon ECS (http://docs.aws.amazon.com/AmazonECS/latest/developerguideusing-service-linked-roles.html) + // in the Amazon EC2 Container Service Developer Guide. // // If your specified role has a path other than /, then you must either specify // the full role ARN (this is recommended) or prefix the role name with the @@ -4651,6 +4931,11 @@ func (s *CreateServiceInput) Validate() error { if s.TaskDefinition == nil { invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) } + if s.NetworkConfiguration != nil { + if err := s.NetworkConfiguration.Validate(); err != nil { + invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4688,6 +4973,12 @@ func (s *CreateServiceInput) SetLoadBalancers(v []*LoadBalancer) *CreateServiceI return s } +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *CreateServiceInput) SetNetworkConfiguration(v *NetworkConfiguration) *CreateServiceInput { + s.NetworkConfiguration = v + return s +} + // SetPlacementConstraints sets the PlacementConstraints field's value. func (s *CreateServiceInput) SetPlacementConstraints(v []*PlacementConstraint) *CreateServiceInput { s.PlacementConstraints = v @@ -4981,6 +5272,10 @@ type Deployment struct { // The ID of the deployment. Id *string `locationName:"id" type:"string"` + // The VPC subnet and security group configuration for tasks that receive their + // own Elastic Network Interface by using the awsvpc networking mode. + NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` + // The number of tasks in the deployment that are in the PENDING status. PendingCount *int64 `locationName:"pendingCount" type:"integer"` @@ -5028,6 +5323,12 @@ func (s *Deployment) SetId(v string) *Deployment { return s } +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *Deployment) SetNetworkConfiguration(v *NetworkConfiguration) *Deployment { + s.NetworkConfiguration = v + return s +} + // SetPendingCount sets the PendingCount field's value. func (s *Deployment) SetPendingCount(v int64) *Deployment { s.PendingCount = &v @@ -5127,7 +5428,7 @@ type DeregisterContainerInstanceInput struct { // of that task, on a different container instance if possible. // // Any containers in orphaned service tasks that are registered with a Classic - // load balancer or an Application load balancer target group are deregistered, + // Load Balancer or an Application Load Balancer target group are deregistered, // and they will begin connection draining according to the settings on the // load balancer or target group. Force *bool `locationName:"force" type:"boolean"` @@ -5635,6 +5936,65 @@ func (s *DescribeTasksOutput) SetTasks(v []*Task) *DescribeTasksOutput { return s } +// An object representing a container instance host device. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/Device +type Device struct { + _ struct{} `type:"structure"` + + // The path inside the container at which to expose the host device. + ContainerPath *string `locationName:"containerPath" type:"string"` + + // The path for the device on the host container instance. + // + // HostPath is a required field + HostPath *string `locationName:"hostPath" type:"string" required:"true"` + + // The explicit permissions to provide to the container for the device. By default, + // the container will be able to read, write, and mknod the device. + Permissions []*string `locationName:"permissions" type:"list"` +} + +// String returns the string representation +func (s Device) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Device) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Device) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Device"} + if s.HostPath == nil { + invalidParams.Add(request.NewErrParamRequired("HostPath")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerPath sets the ContainerPath field's value. +func (s *Device) SetContainerPath(v string) *Device { + s.ContainerPath = &v + return s +} + +// SetHostPath sets the HostPath field's value. +func (s *Device) SetHostPath(v string) *Device { + s.HostPath = &v + return s +} + +// SetPermissions sets the Permissions field's value. +func (s *Device) SetPermissions(v []*string) *Device { + s.Permissions = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DiscoverPollEndpointRequest type DiscoverPollEndpointInput struct { _ struct{} `type:"structure"` @@ -5826,6 +6186,72 @@ func (s *HostVolumeProperties) SetSourcePath(v string) *HostVolumeProperties { return s } +// The Linux capabilities for the container that are added to or dropped from +// the default configuration provided by Docker. For more information on the +// default capabilities and the non-default available capabilities, see Runtime +// privilege and Linux capabilities (https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) +// in the Docker run reference. For more detailed information on these Linux +// capabilities, see the capabilities(7) (http://man7.org/linux/man-pages/man7/capabilities.7.html) +// Linux manual page. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/KernelCapabilities +type KernelCapabilities struct { + _ struct{} `type:"structure"` + + // The Linux capabilities for the container that have been added to the default + // configuration provided by Docker. This parameter maps to CapAdd in the Create + // a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // and the --cap-add option to docker run (https://docs.docker.com/engine/reference/run/). + // + // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | + // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" + // | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" + // | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" + // | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" + // | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | + // "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | + // "WAKE_ALARM" + Add []*string `locationName:"add" type:"list"` + + // The Linux capabilities for the container that have been removed from the + // default configuration provided by Docker. This parameter maps to CapDrop + // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // and the --cap-drop option to docker run (https://docs.docker.com/engine/reference/run/). + // + // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | + // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" + // | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" + // | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" + // | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" + // | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | + // "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | + // "WAKE_ALARM" + Drop []*string `locationName:"drop" type:"list"` +} + +// String returns the string representation +func (s KernelCapabilities) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KernelCapabilities) GoString() string { + return s.String() +} + +// SetAdd sets the Add field's value. +func (s *KernelCapabilities) SetAdd(v []*string) *KernelCapabilities { + s.Add = v + return s +} + +// SetDrop sets the Drop field's value. +func (s *KernelCapabilities) SetDrop(v []*string) *KernelCapabilities { + s.Drop = v + return s +} + // A key and value pair object. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/KeyValuePair type KeyValuePair struct { @@ -5862,6 +6288,78 @@ func (s *KeyValuePair) SetValue(v string) *KeyValuePair { return s } +// Linux-specific options that are applied to the container, such as Linux KernelCapabilities. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/LinuxParameters +type LinuxParameters struct { + _ struct{} `type:"structure"` + + // The Linux capabilities for the container that are added to or dropped from + // the default configuration provided by Docker. + Capabilities *KernelCapabilities `locationName:"capabilities" type:"structure"` + + // Any host devices to expose to the container. This parameter maps to Devices + // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) + // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) + // and the --device option to docker run (https://docs.docker.com/engine/reference/run/). + Devices []*Device `locationName:"devices" type:"list"` + + // Run an init process inside the container that forwards signals and reaps + // processes. This parameter maps to the --init option to docker run (https://docs.docker.com/engine/reference/run/). + // This parameter requires version 1.25 of the Docker Remote API or greater + // on your container instance. To check the Docker Remote API version on your + // container instance, log into your container instance and run the following + // command: sudo docker version | grep "Server API version" + InitProcessEnabled *bool `locationName:"initProcessEnabled" type:"boolean"` +} + +// String returns the string representation +func (s LinuxParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LinuxParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LinuxParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LinuxParameters"} + if s.Devices != nil { + for i, v := range s.Devices { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Devices", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCapabilities sets the Capabilities field's value. +func (s *LinuxParameters) SetCapabilities(v *KernelCapabilities) *LinuxParameters { + s.Capabilities = v + return s +} + +// SetDevices sets the Devices field's value. +func (s *LinuxParameters) SetDevices(v []*Device) *LinuxParameters { + s.Devices = v + return s +} + +// SetInitProcessEnabled sets the InitProcessEnabled field's value. +func (s *LinuxParameters) SetInitProcessEnabled(v bool) *LinuxParameters { + s.InitProcessEnabled = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAttributesRequest type ListAttributesInput struct { _ struct{} `type:"structure"` @@ -6207,13 +6705,13 @@ type ListServicesInput struct { // is assumed. Cluster *string `locationName:"cluster" type:"string"` - // The maximum number of container instance results returned by ListServices - // in paginated output. When this parameter is used, ListServices only returns - // maxResults results in a single page along with a nextToken response element. - // The remaining results of the initial request can be seen by sending another - // ListServices request with the returned nextToken value. This value can be - // between 1 and 10. If this parameter is not used, then ListServices returns - // up to 10 results and a nextToken value if applicable. + // The maximum number of service results returned by ListServices in paginated + // output. When this parameter is used, ListServices only returns maxResults + // results in a single page along with a nextToken response element. The remaining + // results of the initial request can be seen by sending another ListServices + // request with the returned nextToken value. This value can be between 1 and + // 10. If this parameter is not used, then ListServices returns up to 10 results + // and a nextToken value if applicable. MaxResults *int64 `locationName:"maxResults" type:"integer"` // The nextToken value returned from a previous paginated ListServices request @@ -6687,7 +7185,7 @@ type LoadBalancer struct { // mapping. ContainerPort *int64 `locationName:"containerPort" type:"integer"` - // The name of a Classic load balancer. + // The name of a load balancer. LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` // The full Amazon Resource Name (ARN) of the Elastic Load Balancing target @@ -6897,6 +7395,90 @@ func (s *NetworkBinding) SetProtocol(v string) *NetworkBinding { return s } +// An object representing the network configuration for a task or service. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/NetworkConfiguration +type NetworkConfiguration struct { + _ struct{} `type:"structure"` + + // The VPC subnets and security groups associated with a task. + AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"` +} + +// String returns the string representation +func (s NetworkConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NetworkConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NetworkConfiguration"} + if s.AwsvpcConfiguration != nil { + if err := s.AwsvpcConfiguration.Validate(); err != nil { + invalidParams.AddNested("AwsvpcConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsvpcConfiguration sets the AwsvpcConfiguration field's value. +func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *NetworkConfiguration { + s.AwsvpcConfiguration = v + return s +} + +// An object representing the Elastic Network Interface for tasks that use the +// awsvpc network mode. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/NetworkInterface +type NetworkInterface struct { + _ struct{} `type:"structure"` + + // The attachment ID for the network interface. + AttachmentId *string `locationName:"attachmentId" type:"string"` + + // The private IPv6 address for the network interface. + Ipv6Address *string `locationName:"ipv6Address" type:"string"` + + // The private IPv4 address for the network interface. + PrivateIpv4Address *string `locationName:"privateIpv4Address" type:"string"` +} + +// String returns the string representation +func (s NetworkInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterface) GoString() string { + return s.String() +} + +// SetAttachmentId sets the AttachmentId field's value. +func (s *NetworkInterface) SetAttachmentId(v string) *NetworkInterface { + s.AttachmentId = &v + return s +} + +// SetIpv6Address sets the Ipv6Address field's value. +func (s *NetworkInterface) SetIpv6Address(v string) *NetworkInterface { + s.Ipv6Address = &v + return s +} + +// SetPrivateIpv4Address sets the PrivateIpv4Address field's value. +func (s *NetworkInterface) SetPrivateIpv4Address(v string) *NetworkInterface { + s.PrivateIpv4Address = &v + return s +} + // An object representing a constraint on task placement. For more information, // see Task Placement Constraints (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) // in the Amazon EC2 Container Service Developer Guide. @@ -7296,17 +7878,26 @@ type RegisterTaskDefinitionInput struct { Family *string `locationName:"family" type:"string" required:"true"` // The Docker networking mode to use for the containers in the task. The valid - // values are none, bridge, and host. + // values are none, bridge, awsvpc, and host. The default Docker network mode + // is bridge. If the network mode is set to none, you cannot specify port mappings + // in your container definitions, and the task's containers do not have external + // connectivity. The host and awsvpc network modes offer the highest networking + // performance for containers because they use the EC2 network stack instead + // of the virtualized network stack provided by the bridge mode. // - // The default Docker network mode is bridge. If the network mode is set to - // none, you cannot specify port mappings in your container definitions, and - // the task's containers do not have external connectivity. The host network - // mode offers the highest networking performance for containers because they - // use the host network stack instead of the virtualized network stack provided - // by the bridge mode; however, exposed container ports are mapped directly - // to the corresponding host port, so you cannot take advantage of dynamic host - // port mappings or run multiple instantiations of the same task on a single - // container instance if port mappings are used. + // With the host and awsvpc network modes, exposed container ports are mapped + // directly to the corresponding host port (for the host network mode) or the + // attached ENI port (for the awsvpc network mode), so you cannot take advantage + // of dynamic host port mappings. + // + // If the network mode is awsvpc, the task is allocated an Elastic Network Interface, + // and you must specify a NetworkConfiguration when you create a service or + // run a task with the task definition. For more information, see Task Networking + // (http://docs.aws.amazon.com/AmazonECS/latest/developerguidetask-networking.html) + // in the Amazon EC2 Container Service Developer Guide. + // + // If the network mode is host, you can not run multiple instantiations of the + // same task on a single container instance when port mappings are used. // // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings) // in the Docker run reference. @@ -7515,6 +8106,13 @@ type RunTaskInput struct { // is the family name of the task definition (for example, family:my-family-name). Group *string `locationName:"group" type:"string"` + // The network configuration for the task. This parameter is required for task + // definitions that use the awsvpc network mode to receive their own Elastic + // Network Interface, and it is not supported for other network modes. For more + // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguidetask-networking.html) + // in the Amazon EC2 Container Service Developer Guide. + NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` + // A list of container overrides in JSON format that specify the name of a container // in the specified task definition and the overrides it should receive. You // can override the default command for a container (that is specified in the @@ -7571,6 +8169,11 @@ func (s *RunTaskInput) Validate() error { if s.TaskDefinition == nil { invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) } + if s.NetworkConfiguration != nil { + if err := s.NetworkConfiguration.Validate(); err != nil { + invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -7596,6 +8199,12 @@ func (s *RunTaskInput) SetGroup(v string) *RunTaskInput { return s } +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *RunTaskInput) SetNetworkConfiguration(v *NetworkConfiguration) *RunTaskInput { + s.NetworkConfiguration = v + return s +} + // SetOverrides sets the Overrides field's value. func (s *RunTaskInput) SetOverrides(v *TaskOverride) *RunTaskInput { s.Overrides = v @@ -7692,6 +8301,10 @@ type Service struct { // and the container port to access from the load balancer. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` + // The VPC subnet and security group configuration for tasks that receive their + // own Elastic Network Interface by using the awsvpc networking mode. + NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` + // The number of tasks in the cluster that are in the PENDING state. PendingCount *int64 `locationName:"pendingCount" type:"integer"` @@ -7782,6 +8395,12 @@ func (s *Service) SetLoadBalancers(v []*LoadBalancer) *Service { return s } +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *Service) SetNetworkConfiguration(v *NetworkConfiguration) *Service { + s.NetworkConfiguration = v + return s +} + // SetPendingCount sets the PendingCount field's value. func (s *Service) SetPendingCount(v int64) *Service { s.PendingCount = &v @@ -7899,6 +8518,10 @@ type StartTaskInput struct { // is the family name of the task definition (for example, family:my-family-name). Group *string `locationName:"group" type:"string"` + // The VPC subnet and security group configuration for tasks that receive their + // own Elastic Network Interface by using the awsvpc networking mode. + NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` + // A list of container overrides in JSON format that specify the name of a container // in the specified task definition and the overrides it should receive. You // can override the default command for a container (that is specified in the @@ -7949,6 +8572,11 @@ func (s *StartTaskInput) Validate() error { if s.TaskDefinition == nil { invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) } + if s.NetworkConfiguration != nil { + if err := s.NetworkConfiguration.Validate(); err != nil { + invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -7974,6 +8602,12 @@ func (s *StartTaskInput) SetGroup(v string) *StartTaskInput { return s } +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *StartTaskInput) SetNetworkConfiguration(v *NetworkConfiguration) *StartTaskInput { + s.NetworkConfiguration = v + return s +} + // SetOverrides sets the Overrides field's value. func (s *StartTaskInput) SetOverrides(v *TaskOverride) *StartTaskInput { s.Overrides = v @@ -8220,10 +8854,16 @@ func (s *SubmitContainerStateChangeOutput) SetAcknowledgment(v string) *SubmitCo type SubmitTaskStateChangeInput struct { _ struct{} `type:"structure"` + // Any attachments associated with the state change request. + Attachments []*AttachmentStateChange `locationName:"attachments" type:"list"` + // The short name or full Amazon Resource Name (ARN) of the cluster that hosts // the task. Cluster *string `locationName:"cluster" type:"string"` + // Any containers associated with the state change request. + Containers []*ContainerStateChange `locationName:"containers" type:"list"` + // The reason for the state change request. Reason *string `locationName:"reason" type:"string"` @@ -8245,12 +8885,44 @@ func (s SubmitTaskStateChangeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SubmitTaskStateChangeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SubmitTaskStateChangeInput"} + if s.Attachments != nil { + for i, v := range s.Attachments { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attachments", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttachments sets the Attachments field's value. +func (s *SubmitTaskStateChangeInput) SetAttachments(v []*AttachmentStateChange) *SubmitTaskStateChangeInput { + s.Attachments = v + return s +} + // SetCluster sets the Cluster field's value. func (s *SubmitTaskStateChangeInput) SetCluster(v string) *SubmitTaskStateChangeInput { s.Cluster = &v return s } +// SetContainers sets the Containers field's value. +func (s *SubmitTaskStateChangeInput) SetContainers(v []*ContainerStateChange) *SubmitTaskStateChangeInput { + s.Containers = v + return s +} + // SetReason sets the Reason field's value. func (s *SubmitTaskStateChangeInput) SetReason(v string) *SubmitTaskStateChangeInput { s.Reason = &v @@ -8298,6 +8970,10 @@ func (s *SubmitTaskStateChangeOutput) SetAcknowledgment(v string) *SubmitTaskSta type Task struct { _ struct{} `type:"structure"` + // The Elastic Network Adapter associated with the task if the task uses the + // awsvpc network mode. + Attachments []*Attachment `locationName:"attachments" type:"list"` + // The Amazon Resource Name (ARN) of the cluster that hosts the task. ClusterArn *string `locationName:"clusterArn" type:"string"` @@ -8364,6 +9040,12 @@ func (s Task) GoString() string { return s.String() } +// SetAttachments sets the Attachments field's value. +func (s *Task) SetAttachments(v []*Attachment) *Task { + s.Attachments = v + return s +} + // SetClusterArn sets the ClusterArn field's value. func (s *Task) SetClusterArn(v string) *Task { s.ClusterArn = &v @@ -8469,12 +9151,14 @@ type TaskDefinition struct { Family *string `locationName:"family" type:"string"` // The Docker networking mode to use for the containers in the task. The valid - // values are none, bridge, and host. + // values are none, bridge, awsvpc, and host. // // If the network mode is none, the containers do not have external connectivity. - // The default Docker network mode is bridge. The host network mode offers the - // highest networking performance for containers because it uses the host network - // stack instead of the virtualized network stack provided by the bridge mode. + // The default Docker network mode is bridge. If the network mode is awsvpc, + // the task is allocated an Elastic Network Interface. The host and awsvpc network + // modes offer the highest networking performance for containers because they + // use the EC2 network stack instead of the virtualized network stack provided + // by the bridge mode. // // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings) // in the Docker run reference. @@ -8914,6 +9598,18 @@ type UpdateServiceInput struct { // service. DesiredCount *int64 `locationName:"desiredCount" type:"integer"` + // The network configuration for the service. This parameter is required for + // task definitions that use the awsvpc network mode to receive their own Elastic + // Network Interface, and it is not supported for other network modes. For more + // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguidetask-networking.html) + // in the Amazon EC2 Container Service Developer Guide. + // + // Updating a service to add a subnet to a list of existing subnets does not + // trigger a service deployment. For example, if your network configuration + // change is to keep the existing subnets and simply add another subnet to the + // network configuration, this does not trigger a new service deployment. + NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` + // The name of the service to update. // // Service is a required field @@ -8943,6 +9639,11 @@ func (s *UpdateServiceInput) Validate() error { if s.Service == nil { invalidParams.Add(request.NewErrParamRequired("Service")) } + if s.NetworkConfiguration != nil { + if err := s.NetworkConfiguration.Validate(); err != nil { + invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -8968,6 +9669,12 @@ func (s *UpdateServiceInput) SetDesiredCount(v int64) *UpdateServiceInput { return s } +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *UpdateServiceInput) SetNetworkConfiguration(v *NetworkConfiguration) *UpdateServiceInput { + s.NetworkConfiguration = v + return s +} + // SetService sets the Service field's value. func (s *UpdateServiceInput) SetService(v string) *UpdateServiceInput { s.Service = &v @@ -9165,6 +9872,17 @@ const ( DesiredStatusStopped = "STOPPED" ) +const ( + // DeviceCgroupPermissionRead is a DeviceCgroupPermission enum value + DeviceCgroupPermissionRead = "read" + + // DeviceCgroupPermissionWrite is a DeviceCgroupPermission enum value + DeviceCgroupPermissionWrite = "write" + + // DeviceCgroupPermissionMknod is a DeviceCgroupPermission enum value + DeviceCgroupPermissionMknod = "mknod" +) + const ( // LogDriverJsonFile is a LogDriver enum value LogDriverJsonFile = "json-file" @@ -9195,6 +9913,9 @@ const ( // NetworkModeHost is a NetworkMode enum value NetworkModeHost = "host" + // NetworkModeAwsvpc is a NetworkMode enum value + NetworkModeAwsvpc = "awsvpc" + // NetworkModeNone is a NetworkMode enum value NetworkModeNone = "none" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go index e833155fc..a181e2d21 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go @@ -23,7 +23,7 @@ // // Using the Client // -// To Amazon EC2 Container Service with the SDK use the New function to create +// To contact Amazon EC2 Container Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go index 29525633a..606891eab 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go @@ -16,7 +16,7 @@ // // Using the Client // -// To Amazon Elastic File System with the SDK use the New function to create +// To contact Amazon Elastic File System with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index 022c899a7..6edcd819c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -77,7 +77,7 @@ func (c *ElastiCache) AddTagsToResourceRequest(input *AddTagsToResourceInput) (r // // Returned Error Codes: // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" // The requested snapshot name does not refer to an existing snapshot. @@ -414,7 +414,7 @@ func (c *ElastiCache) CreateCacheClusterRequest(input *CreateCacheClusterInput) // CreateCacheCluster API operation for Amazon ElastiCache. // -// Creates a cache cluster. All nodes in the cache cluster run the same protocol-compliant +// Creates a cluster. All nodes in the cluster run the same protocol-compliant // cache engine software, either Memcached or Redis. // // Due to current limitations on Redis (cluster mode disabled), this operation @@ -436,7 +436,7 @@ func (c *ElastiCache) CreateCacheClusterRequest(input *CreateCacheClusterInput) // The requested replication group is not in the available state. // // * ErrCodeCacheClusterAlreadyExistsFault "CacheClusterAlreadyExists" -// You already have a cache cluster with the given identifier. +// You already have a cluster with the given identifier. // // * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" // The requested cache node type is not available in the specified Availability @@ -452,11 +452,11 @@ func (c *ElastiCache) CreateCacheClusterRequest(input *CreateCacheClusterInput) // // * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" // The request cannot be processed because it would exceed the allowed number -// of cache clusters per customer. +// of clusters per customer. // // * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" // The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cache cluster. +// of cache nodes in a single cluster. // // * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" // The request cannot be processed because it would exceed the allowed number @@ -548,7 +548,7 @@ func (c *ElastiCache) CreateCacheParameterGroupRequest(input *CreateCacheParamet // // Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache // parameter group is a collection of parameters and their values that are applied -// to all of the nodes in any cache cluster or replication group using the CacheParameterGroup. +// to all of the nodes in any cluster or replication group using the CacheParameterGroup. // // A newly created CacheParameterGroup is an exact duplicate of the default // parameter group for the CacheParameterGroupFamily. To customize the newly @@ -653,12 +653,12 @@ func (c *ElastiCache) CreateCacheSecurityGroupRequest(input *CreateCacheSecurity // CreateCacheSecurityGroup API operation for Amazon ElastiCache. // // Creates a new cache security group. Use a cache security group to control -// access to one or more cache clusters. +// access to one or more clusters. // -// Cache security groups are only used when you are creating a cache cluster -// outside of an Amazon Virtual Private Cloud (Amazon VPC). If you are creating -// a cache cluster inside of a VPC, use a cache subnet group instead. For more -// information, see CreateCacheSubnetGroup (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html). +// Cache security groups are only used when you are creating a cluster outside +// of an Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cluster +// inside of a VPC, use a cache subnet group instead. For more information, +// see CreateCacheSubnetGroup (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -844,10 +844,9 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) // replication group. // -// A Redis (cluster mode disabled) replication group is a collection of cache -// clusters, where one of the cache clusters is a read/write primary and the -// others are read-only replicas. Writes to the primary are asynchronously propagated -// to the replicas. +// A Redis (cluster mode disabled) replication group is a collection of clusters, +// where one of the clusters is a read/write primary and the others are read-only +// replicas. Writes to the primary are asynchronously propagated to the replicas. // // A Redis (cluster mode enabled) replication group is a collection of 1 to // 15 node groups (shards). Each node group (shard) has one read/write primary @@ -875,10 +874,10 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // // Returned Error Codes: // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cache cluster is not in the available state. +// The requested cluster is not in the available state. // // * ErrCodeReplicationGroupAlreadyExistsFault "ReplicationGroupAlreadyExists" // The specified replication group already exists. @@ -897,11 +896,11 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // // * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" // The request cannot be processed because it would exceed the allowed number -// of cache clusters per customer. +// of clusters per customer. // // * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" // The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cache cluster. +// of cache nodes in a single cluster. // // * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" // The request cannot be processed because it would exceed the allowed number @@ -920,8 +919,9 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // on a resource is 50. // // * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" -// The request cannot be processed because it would exceed the maximum of 15 -// node groups (shards) in a single replication group. +// The request cannot be processed because it would exceed the maximum allowed +// number of node groups (shards) in a single replication group. The default +// maximum is 15 // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -995,8 +995,8 @@ func (c *ElastiCache) CreateSnapshotRequest(input *CreateSnapshotInput) (req *re // CreateSnapshot API operation for Amazon ElastiCache. // -// Creates a copy of an entire cache cluster or replication group at a specific -// moment in time. +// Creates a copy of an entire cluster or replication group at a specific moment +// in time. // // This operation is valid for Redis only. // @@ -1012,13 +1012,13 @@ func (c *ElastiCache) CreateSnapshotRequest(input *CreateSnapshotInput) (req *re // You already have a snapshot with the given name. // // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" // The specified replication group does not exist. // // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cache cluster is not in the available state. +// The requested cluster is not in the available state. // // * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" // The requested replication group is not in the available state. @@ -1030,11 +1030,11 @@ func (c *ElastiCache) CreateSnapshotRequest(input *CreateSnapshotInput) (req *re // * ErrCodeSnapshotFeatureNotSupportedFault "SnapshotFeatureNotSupportedFault" // You attempted one of the following operations: // -// * Creating a snapshot of a Redis cache cluster running on a cache.t1.micro -// cache node. +// * Creating a snapshot of a Redis cluster running on a cache.t1.micro cache +// node. // -// * Creating a snapshot of a cache cluster that is running Memcached rather -// than Redis. +// * Creating a snapshot of a cluster that is running Memcached rather than +// Redis. // // Neither of these are supported by ElastiCache. // @@ -1110,16 +1110,14 @@ func (c *ElastiCache) DeleteCacheClusterRequest(input *DeleteCacheClusterInput) // DeleteCacheCluster API operation for Amazon ElastiCache. // -// Deletes a previously provisioned cache cluster. DeleteCacheCluster deletes -// all associated cache nodes, node endpoints and the cache cluster itself. -// When you receive a successful response from this operation, Amazon ElastiCache -// immediately begins deleting the cache cluster; you cannot cancel or revert -// this operation. +// Deletes a previously provisioned cluster. DeleteCacheCluster deletes all +// associated cache nodes, node endpoints and the cluster itself. When you receive +// a successful response from this operation, Amazon ElastiCache immediately +// begins deleting the cluster; you cannot cancel or revert this operation. // -// This operation cannot be used to delete a cache cluster that is the last -// read replica of a replication group or node group (shard) that has Multi-AZ -// mode enabled or a cache cluster from a Redis (cluster mode enabled) replication -// group. +// This operation cannot be used to delete a cluster that is the last read replica +// of a replication group or node group (shard) that has Multi-AZ mode enabled +// or a cluster from a Redis (cluster mode enabled) replication group. // // Due to current limitations on Redis (cluster mode disabled), this operation // or parameter is not supported on Redis (cluster mode enabled) replication @@ -1134,10 +1132,10 @@ func (c *ElastiCache) DeleteCacheClusterRequest(input *DeleteCacheClusterInput) // // Returned Error Codes: // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cache cluster is not in the available state. +// The requested cluster is not in the available state. // // * ErrCodeSnapshotAlreadyExistsFault "SnapshotAlreadyExistsFault" // You already have a snapshot with the given name. @@ -1145,11 +1143,11 @@ func (c *ElastiCache) DeleteCacheClusterRequest(input *DeleteCacheClusterInput) // * ErrCodeSnapshotFeatureNotSupportedFault "SnapshotFeatureNotSupportedFault" // You attempted one of the following operations: // -// * Creating a snapshot of a Redis cache cluster running on a cache.t1.micro -// cache node. +// * Creating a snapshot of a Redis cluster running on a cache.t1.micro cache +// node. // -// * Creating a snapshot of a cache cluster that is running Memcached rather -// than Redis. +// * Creating a snapshot of a cluster that is running Memcached rather than +// Redis. // // Neither of these are supported by ElastiCache. // @@ -1326,8 +1324,7 @@ func (c *ElastiCache) DeleteCacheSecurityGroupRequest(input *DeleteCacheSecurity // // Deletes a cache security group. // -// You cannot delete a cache security group if it is associated with any cache -// clusters. +// You cannot delete a cache security group if it is associated with any clusters. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1420,8 +1417,7 @@ func (c *ElastiCache) DeleteCacheSubnetGroupRequest(input *DeleteCacheSubnetGrou // // Deletes a cache subnet group. // -// You cannot delete a cache subnet group if it is associated with any cache -// clusters. +// You cannot delete a cache subnet group if it is associated with any clusters. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1536,11 +1532,11 @@ func (c *ElastiCache) DeleteReplicationGroupRequest(input *DeleteReplicationGrou // * ErrCodeSnapshotFeatureNotSupportedFault "SnapshotFeatureNotSupportedFault" // You attempted one of the following operations: // -// * Creating a snapshot of a Redis cache cluster running on a cache.t1.micro -// cache node. +// * Creating a snapshot of a Redis cluster running on a cache.t1.micro cache +// node. // -// * Creating a snapshot of a cache cluster that is running Memcached rather -// than Redis. +// * Creating a snapshot of a cluster that is running Memcached rather than +// Redis. // // Neither of these are supported by ElastiCache. // @@ -1719,13 +1715,13 @@ func (c *ElastiCache) DescribeCacheClustersRequest(input *DescribeCacheClustersI // DescribeCacheClusters API operation for Amazon ElastiCache. // -// Returns information about all provisioned cache clusters if no cache cluster -// identifier is specified, or about a specific cache cluster if a cache cluster -// identifier is supplied. +// Returns information about all provisioned clusters if no cluster identifier +// is specified, or about a specific cache cluster if a cluster identifier is +// supplied. // -// By default, abbreviated information about the cache clusters is returned. -// You can use the optional ShowCacheNodeInfo flag to retrieve detailed information -// about the cache nodes associated with the cache clusters. These details include +// By default, abbreviated information about the clusters is returned. You can +// use the optional ShowCacheNodeInfo flag to retrieve detailed information +// about the cache nodes associated with the clusters. These details include // the DNS address and port for the cache node endpoint. // // If the cluster is in the creating state, only cluster-level information is @@ -1734,12 +1730,12 @@ func (c *ElastiCache) DescribeCacheClustersRequest(input *DescribeCacheClustersI // If the cluster is in the deleting state, only cluster-level information is // displayed. // -// If cache nodes are currently being added to the cache cluster, node endpoint -// information and creation time for the additional nodes are not displayed -// until they are completely provisioned. When the cache cluster state is available, -// the cluster is ready for use. +// If cache nodes are currently being added to the cluster, node endpoint information +// and creation time for the additional nodes are not displayed until they are +// completely provisioned. When the cluster state is available, the cluster +// is ready for use. // -// If cache nodes are currently being removed from the cache cluster, no endpoint +// If cache nodes are currently being removed from the cluster, no endpoint // information for the removed nodes is displayed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1751,7 +1747,7 @@ func (c *ElastiCache) DescribeCacheClustersRequest(input *DescribeCacheClustersI // // Returned Error Codes: // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -2716,10 +2712,9 @@ func (c *ElastiCache) DescribeEventsRequest(input *DescribeEventsInput) (req *re // DescribeEvents API operation for Amazon ElastiCache. // -// Returns events related to cache clusters, cache security groups, and cache -// parameter groups. You can obtain events specific to a particular cache cluster, -// cache security group, or cache parameter group by providing the name as a -// parameter. +// Returns events related to clusters, cache security groups, and cache parameter +// groups. You can obtain events specific to a particular cluster, cache security +// group, or cache parameter group by providing the name as a parameter. // // By default, only the events occurring within the last hour are returned; // however, you can retrieve up to 14 days' worth of events if necessary. @@ -3288,10 +3283,10 @@ func (c *ElastiCache) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (r // DescribeSnapshots API operation for Amazon ElastiCache. // -// Returns information about cache cluster or replication group snapshots. By -// default, DescribeSnapshots lists all of your snapshots; it can optionally -// describe a single snapshot, or just the snapshots associated with a particular -// cache cluster. +// Returns information about cluster or replication group snapshots. By default, +// DescribeSnapshots lists all of your snapshots; it can optionally describe +// a single snapshot, or just the snapshots associated with a particular cache +// cluster. // // This operation is valid for Redis only. // @@ -3304,7 +3299,7 @@ func (c *ElastiCache) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (r // // Returned Error Codes: // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" // The requested snapshot name does not refer to an existing snapshot. @@ -3447,7 +3442,7 @@ func (c *ElastiCache) ListAllowedNodeTypeModificationsRequest(input *ListAllowed // // Returned Error Codes: // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" // The specified replication group does not exist. @@ -3542,7 +3537,7 @@ func (c *ElastiCache) ListTagsForResourceRequest(input *ListTagsForResourceInput // // Returned Error Codes: // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" // The requested snapshot name does not refer to an existing snapshot. @@ -3616,8 +3611,8 @@ func (c *ElastiCache) ModifyCacheClusterRequest(input *ModifyCacheClusterInput) // ModifyCacheCluster API operation for Amazon ElastiCache. // -// Modifies the settings for a cache cluster. You can use this operation to -// change one or more cluster configuration parameters by specifying the parameters +// Modifies the settings for a cluster. You can use this operation to change +// one or more cluster configuration parameters by specifying the parameters // and the new values. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3629,7 +3624,7 @@ func (c *ElastiCache) ModifyCacheClusterRequest(input *ModifyCacheClusterInput) // // Returned Error Codes: // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cache cluster is not in the available state. +// The requested cluster is not in the available state. // // * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" // The current state of the cache security group does not allow deletion. @@ -3639,11 +3634,11 @@ func (c *ElastiCache) ModifyCacheClusterRequest(input *ModifyCacheClusterInput) // Zone. // // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" // The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cache cluster. +// of cache nodes in a single cluster. // // * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" // The request cannot be processed because it would exceed the allowed number @@ -3937,7 +3932,7 @@ func (c *ElastiCache) ModifyReplicationGroupRequest(input *ModifyReplicationGrou // The requested replication group is not in the available state. // // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cache cluster is not in the available state. +// The requested cluster is not in the available state. // // * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" // The current state of the cache security group does not allow deletion. @@ -3947,11 +3942,11 @@ func (c *ElastiCache) ModifyReplicationGroupRequest(input *ModifyReplicationGrou // Zone. // // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" // The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cache cluster. +// of cache nodes in a single cluster. // // * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" // The request cannot be processed because it would exceed the allowed number @@ -3996,6 +3991,120 @@ func (c *ElastiCache) ModifyReplicationGroupWithContext(ctx aws.Context, input * return out, req.Send() } +const opModifyReplicationGroupShardConfiguration = "ModifyReplicationGroupShardConfiguration" + +// ModifyReplicationGroupShardConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the ModifyReplicationGroupShardConfiguration operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyReplicationGroupShardConfiguration for more information on using the ModifyReplicationGroupShardConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyReplicationGroupShardConfigurationRequest method. +// req, resp := client.ModifyReplicationGroupShardConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfiguration +func (c *ElastiCache) ModifyReplicationGroupShardConfigurationRequest(input *ModifyReplicationGroupShardConfigurationInput) (req *request.Request, output *ModifyReplicationGroupShardConfigurationOutput) { + op := &request.Operation{ + Name: opModifyReplicationGroupShardConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyReplicationGroupShardConfigurationInput{} + } + + output = &ModifyReplicationGroupShardConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyReplicationGroupShardConfiguration API operation for Amazon ElastiCache. +// +// Performs horizontal scaling on a Redis (cluster mode enabled) cluster with +// no downtime. Requires Redis engine version 3.2.10 or newer. For information +// on upgrading your engine to a newer version, see Upgrading Engine Versions +// (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/VersionManagement.html) +// in the Amazon ElastiCache User Guide. +// +// For more information on ElastiCache for Redis online horizontal scaling, +// see ElastiCache for Redis Horizontal Scaling (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/redis-cluster-resharding-online.html) +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation ModifyReplicationGroupShardConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cluster is not in the available state. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" +// The requested cache node type is not available in the specified Availability +// Zone. +// +// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" +// The request cannot be processed because it would exceed the maximum allowed +// number of node groups (shards) in a single replication group. The default +// maximum is 15 +// +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of cache nodes per customer. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfiguration +func (c *ElastiCache) ModifyReplicationGroupShardConfiguration(input *ModifyReplicationGroupShardConfigurationInput) (*ModifyReplicationGroupShardConfigurationOutput, error) { + req, out := c.ModifyReplicationGroupShardConfigurationRequest(input) + return out, req.Send() +} + +// ModifyReplicationGroupShardConfigurationWithContext is the same as ModifyReplicationGroupShardConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyReplicationGroupShardConfiguration for details on how to use this API operation. +// +// 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 *ElastiCache) ModifyReplicationGroupShardConfigurationWithContext(ctx aws.Context, input *ModifyReplicationGroupShardConfigurationInput, opts ...request.Option) (*ModifyReplicationGroupShardConfigurationOutput, error) { + req, out := c.ModifyReplicationGroupShardConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPurchaseReservedCacheNodesOffering = "PurchaseReservedCacheNodesOffering" // PurchaseReservedCacheNodesOfferingRequest generates a "aws/request.Request" representing the @@ -4132,16 +4241,23 @@ func (c *ElastiCache) RebootCacheClusterRequest(input *RebootCacheClusterInput) // RebootCacheCluster API operation for Amazon ElastiCache. // -// Reboots some, or all, of the cache nodes within a provisioned cache cluster. -// This operation applies any modified cache parameter groups to the cache cluster. -// The reboot operation takes place as soon as possible, and results in a momentary -// outage to the cache cluster. During the reboot, the cache cluster status -// is set to REBOOTING. +// Reboots some, or all, of the cache nodes within a provisioned cluster. This +// operation applies any modified cache parameter groups to the cluster. The +// reboot operation takes place as soon as possible, and results in a momentary +// outage to the cluster. During the reboot, the cluster status is set to REBOOTING. // // The reboot causes the contents of the cache (for each cache node being rebooted) // to be lost. // -// When the reboot is complete, a cache cluster event is created. +// When the reboot is complete, a cluster event is created. +// +// Rebooting a cluster is currently supported on Memcached and Redis (cluster +// mode disabled) clusters. Rebooting is not supported on Redis (cluster mode +// enabled) clusters. +// +// If you make changes to parameters that require a Redis (cluster mode enabled) +// cluster reboot for the changes to be applied, see Rebooting a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.Rebooting.htm) +// for an alternate process. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4152,10 +4268,10 @@ func (c *ElastiCache) RebootCacheClusterRequest(input *RebootCacheClusterInput) // // Returned Error Codes: // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cache cluster is not in the available state. +// The requested cluster is not in the available state. // // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebootCacheCluster func (c *ElastiCache) RebootCacheCluster(input *RebootCacheClusterInput) (*RebootCacheClusterOutput, error) { @@ -4234,7 +4350,7 @@ func (c *ElastiCache) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourc // // Returned Error Codes: // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cache cluster ID does not refer to an existing cache cluster. +// The requested cluster ID does not refer to an existing cluster. // // * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" // The requested snapshot name does not refer to an existing snapshot. @@ -4555,7 +4671,7 @@ func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *reques // The customer has exceeded the allowed rate of API calls. // // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cache cluster is not in the available state. +// The requested cluster is not in the available state. // // * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" // The requested replication group is not in the available state. @@ -4605,7 +4721,8 @@ type AddTagsToResourceInput struct { // The Amazon Resource Name (ARN) of the resource to which the tags are to be // added, for example arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster - // or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot. + // or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot. ElastiCache + // resources are cluster and snapshot. // // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). @@ -4759,7 +4876,7 @@ func (s *AuthorizeCacheSecurityGroupIngressOutput) SetCacheSecurityGroup(v *Cach return s } -// Describes an Availability Zone in which the cache cluster is launched. +// Describes an Availability Zone in which the cluster is launched. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/AvailabilityZone type AvailabilityZone struct { _ struct{} `type:"structure"` @@ -4784,56 +4901,90 @@ func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { return s } -// Contains all of the attributes of a specific cache cluster. +// Contains all of the attributes of a specific cluster. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CacheCluster type CacheCluster struct { _ struct{} `type:"structure"` + // A flag that enables encryption at-rest when set to true. + // + // You cannot modify the value of AtRestEncryptionEnabled after the cluster + // is created. To enable at-rest encryption on a cluster you must set AtRestEncryptionEnabled + // to true when you create a cluster. + // + // Default: false + AtRestEncryptionEnabled *bool `type:"boolean"` + + // A flag that enables using an AuthToken (password) when issuing Redis commands. + // + // Default: false + AuthTokenEnabled *bool `type:"boolean"` + // This parameter is currently disabled. AutoMinorVersionUpgrade *bool `type:"boolean"` - // The date and time when the cache cluster was created. + // The date and time when the cluster was created. CacheClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` - // The user-supplied identifier of the cache cluster. This identifier is a unique - // key that identifies a cache cluster. + // The user-supplied identifier of the cluster. This identifier is a unique + // key that identifies a cluster. CacheClusterId *string `type:"string"` - // The current state of this cache cluster, one of the following values: available, - // creating, deleted, deleting, incompatible-network, modifying, rebooting cache - // cluster nodes, restore-failed, or snapshotting. + // The current state of this cluster, one of the following values: available, + // creating, deleted, deleting, incompatible-network, modifying, rebooting cluster + // nodes, restore-failed, or snapshotting. CacheClusterStatus *string `type:"string"` - // The name of the compute and memory capacity node type for the cache cluster. + // The name of the compute and memory capacity node type for the cluster. // - // Valid node types are as follows: + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // - // Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, - // cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // Current generation: // - // Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge + // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // - // * Compute optimized: cache.c1.xlarge + // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, + // cache.m4.10xlarge + // + // Previous generation: (not recommended) + // + // T1 node types:cache.t1.micro + // + // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // + // * Compute optimized: + // + // Previous generation: (not recommended) + // + // C1 node types:cache.c1.xlarge // // * Memory optimized: // - // Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // Current generation: + // + // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // - // Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // Previous generation: (not recommended) + // + // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // - // * Redis backup/restore is not supported for Redis (cluster mode disabled) - // T1 and T2 instances. Backup/restore is supported on Redis (cluster mode - // enabled) T2 instances. + // * Redis (cluster mode disabled): Redis backup/restore is not supported + // on T1 and T2 instances. + // + // * Redis (cluster mode enabled): Backup/restore is not supported on T1 + // instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -4844,7 +4995,7 @@ type CacheCluster struct { // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). CacheNodeType *string `type:"string"` - // A list of cache nodes that are members of the cache cluster. + // A list of cache nodes that are members of the cluster. CacheNodes []*CacheNode `locationNameList:"CacheNode" type:"list"` // Status of the cache parameter group. @@ -4853,7 +5004,7 @@ type CacheCluster struct { // A list of cache security group elements, composed of name and status sub-elements. CacheSecurityGroups []*CacheSecurityGroupMembership `locationNameList:"CacheSecurityGroup" type:"list"` - // The name of the cache subnet group associated with the cache cluster. + // The name of the cache subnet group associated with the cluster. CacheSubnetGroupName *string `type:"string"` // The URL of the web page where you can download the latest ElastiCache client @@ -4867,11 +5018,10 @@ type CacheCluster struct { // Example: mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211 ConfigurationEndpoint *Endpoint `type:"structure"` - // The name of the cache engine (memcached or redis) to be used for this cache - // cluster. + // The name of the cache engine (memcached or redis) to be used for this cluster. Engine *string `type:"string"` - // The version of the cache engine that is used in this cache cluster. + // The version of the cache engine that is used in this cluster. EngineVersion *string `type:"string"` // Describes a notification topic and its status. Notification topics are used @@ -4879,18 +5029,18 @@ type CacheCluster struct { // Service (SNS). NotificationConfiguration *NotificationConfiguration `type:"structure"` - // The number of cache nodes in the cache cluster. + // The number of cache nodes in the cluster. // // For clusters running Redis, this value must be 1. For clusters running Memcached, // this value must be between 1 and 20. NumCacheNodes *int64 `type:"integer"` - // A group of settings that are applied to the cache cluster in the future, - // or that are currently being applied. + // A group of settings that are applied to the cluster in the future, or that + // are currently being applied. PendingModifiedValues *PendingModifiedValues `type:"structure"` - // The name of the Availability Zone in which the cache cluster is located or - // "Multiple" if the cache nodes are located in different Availability Zones. + // The name of the Availability Zone in which the cluster is located or "Multiple" + // if the cache nodes are located in different Availability Zones. PreferredAvailabilityZone *string `type:"string"` // Specifies the weekly time range during which maintenance on the cluster is @@ -4916,27 +5066,35 @@ type CacheCluster struct { // Example: sun:23:00-mon:01:30 PreferredMaintenanceWindow *string `type:"string"` - // The replication group to which this cache cluster belongs. If this field - // is empty, the cache cluster is not associated with any replication group. + // The replication group to which this cluster belongs. If this field is empty, + // the cluster is not associated with any replication group. ReplicationGroupId *string `type:"string"` - // A list of VPC Security Groups associated with the cache cluster. + // A list of VPC Security Groups associated with the cluster. SecurityGroups []*SecurityGroupMembership `type:"list"` - // The number of days for which ElastiCache retains automatic cache cluster - // snapshots before deleting them. For example, if you set SnapshotRetentionLimit - // to 5, a snapshot that was taken today is retained for 5 days before being - // deleted. + // The number of days for which ElastiCache retains automatic cluster snapshots + // before deleting them. For example, if you set SnapshotRetentionLimit to 5, + // a snapshot that was taken today is retained for 5 days before being deleted. // // If the value of SnapshotRetentionLimit is set to zero (0), backups are turned // off. SnapshotRetentionLimit *int64 `type:"integer"` // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your cache cluster. + // snapshot of your cluster. // // Example: 05:00-09:00 SnapshotWindow *string `type:"string"` + + // A flag that enables in-transit encryption when set to true. + // + // You cannot modify the value of TransitEncryptionEnabled after the cluster + // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled + // to true when you create a cluster. + // + // Default: false + TransitEncryptionEnabled *bool `type:"boolean"` } // String returns the string representation @@ -4949,6 +5107,18 @@ func (s CacheCluster) GoString() string { return s.String() } +// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. +func (s *CacheCluster) SetAtRestEncryptionEnabled(v bool) *CacheCluster { + s.AtRestEncryptionEnabled = &v + return s +} + +// SetAuthTokenEnabled sets the AuthTokenEnabled field's value. +func (s *CacheCluster) SetAuthTokenEnabled(v bool) *CacheCluster { + s.AuthTokenEnabled = &v + return s +} + // SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. func (s *CacheCluster) SetAutoMinorVersionUpgrade(v bool) *CacheCluster { s.AutoMinorVersionUpgrade = &v @@ -5081,6 +5251,12 @@ func (s *CacheCluster) SetSnapshotWindow(v string) *CacheCluster { return s } +// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. +func (s *CacheCluster) SetTransitEncryptionEnabled(v bool) *CacheCluster { + s.TransitEncryptionEnabled = &v + return s +} + // Provides all of the details about a particular cache engine version. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CacheEngineVersion type CacheEngineVersion struct { @@ -5144,38 +5320,58 @@ func (s *CacheEngineVersion) SetEngineVersion(v string) *CacheEngineVersion { return s } -// Represents an individual cache node within a cache cluster. Each cache node -// runs its own instance of the cluster's protocol-compliant caching software -// - either Memcached or Redis. +// Represents an individual cache node within a cluster. Each cache node runs +// its own instance of the cluster's protocol-compliant caching software - either +// Memcached or Redis. // -// Valid node types are as follows: +// The following node types are supported by ElastiCache. Generally speaking, +// the current generation types provide more memory and computational power +// at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // -// Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, -// cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, -// cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge +// Current generation: // -// Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, -// cache.m1.xlarge +// T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // -// * Compute optimized: cache.c1.xlarge +// M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge +// +// M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, +// cache.m4.10xlarge +// +// Previous generation: (not recommended) +// +// T1 node types:cache.t1.micro +// +// M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge +// +// * Compute optimized: +// +// Previous generation: (not recommended) +// +// C1 node types:cache.c1.xlarge // // * Memory optimized: // -// Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, +// Current generation: +// +// R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // -// Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge +// Previous generation: (not recommended) +// +// M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // -// * Redis backup/restore is not supported for Redis (cluster mode disabled) -// T1 and T2 instances. Backup/restore is supported on Redis (cluster mode -// enabled) T2 instances. +// * Redis (cluster mode disabled): Redis backup/restore is not supported +// on T1 and T2 instances. +// +// * Redis (cluster mode enabled): Backup/restore is not supported on T1 +// instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -5209,8 +5405,7 @@ type CacheNode struct { ParameterGroupStatus *string `type:"string"` // The ID of the primary node to which this read replica node is synchronized. - // If this field is empty, this node is not associated with a primary cache - // cluster. + // If this field is empty, this node is not associated with a primary cluster. SourceCacheNodeId *string `type:"string"` } @@ -5267,8 +5462,8 @@ func (s *CacheNode) SetSourceCacheNodeId(v string) *CacheNode { } // A parameter that has a different value for each cache node type it is applied -// to. For example, in a Redis cache cluster, a cache.m1.large cache node type -// would have a larger maxmemory value than a cache.m1.small type. +// to. For example, in a Redis cluster, a cache.m1.large cache node type would +// have a larger maxmemory value than a cache.m1.small type. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CacheNodeTypeSpecificParameter type CacheNodeTypeSpecificParameter struct { _ struct{} `type:"structure"` @@ -5582,7 +5777,7 @@ func (s *CacheSecurityGroup) SetOwnerId(v string) *CacheSecurityGroup { return s } -// Represents a cache cluster's status within a particular cache security group. +// Represents a cluster's status within a particular cache security group. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CacheSecurityGroupMembership type CacheSecurityGroupMembership struct { _ struct{} `type:"structure"` @@ -5592,7 +5787,7 @@ type CacheSecurityGroupMembership struct { // The membership status in the cache security group. The status changes when // a cache security group is modified, or when the cache security groups assigned - // to a cache cluster are modified. + // to a cluster are modified. Status *string `type:"string"` } @@ -5753,8 +5948,8 @@ func (s *CopySnapshotInput) SetTargetSnapshotName(v string) *CopySnapshotInput { type CopySnapshotOutput struct { _ struct{} `type:"structure"` - // Represents a copy of an entire Redis cache cluster as of the time when the - // snapshot was taken. + // Represents a copy of an entire Redis cluster as of the time when the snapshot + // was taken. Snapshot *Snapshot `type:"structure"` } @@ -5783,7 +5978,7 @@ type CreateCacheClusterInput struct { // Availability Zone or created across multiple Availability Zones in the cluster's // region. // - // This parameter is only supported for Memcached cache clusters. + // This parameter is only supported for Memcached clusters. // // If the AZMode and PreferredAvailabilityZones are not specified, ElastiCache // assumes single-az mode. @@ -5791,16 +5986,23 @@ type CreateCacheClusterInput struct { // Reserved parameter. The password used to access a password protected server. // + // This parameter is valid only if: + // + // * The parameter TransitEncryptionEnabled was set to true when the cluster + // was created. + // + // * The line requirepass was added to the database configuration file. + // // Password constraints: // // * Must be only printable ASCII characters. // // * Must be at least 16 characters and no more than 128 characters in length. // - // * Cannot contain any of the following characters: '/', '"', or "@". + // * Cannot contain any of the following characters: '/', '"', or '@'. // // For more information, see AUTH password (http://redis.io/commands/AUTH) at - // Redis. + // http://redis.io/commands/AUTH. AuthToken *string `type:"string"` // This parameter is currently disabled. @@ -5822,34 +6024,54 @@ type CreateCacheClusterInput struct { // The compute and memory capacity of the nodes in the node group (shard). // - // Valid node types are as follows: + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // - // Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, - // cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // Current generation: // - // Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge + // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // - // * Compute optimized: cache.c1.xlarge + // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, + // cache.m4.10xlarge + // + // Previous generation: (not recommended) + // + // T1 node types:cache.t1.micro + // + // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // + // * Compute optimized: + // + // Previous generation: (not recommended) + // + // C1 node types:cache.c1.xlarge // // * Memory optimized: // - // Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // Current generation: + // + // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // - // Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // Previous generation: (not recommended) + // + // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // - // * Redis backup/restore is not supported for Redis (cluster mode disabled) - // T1 and T2 instances. Backup/restore is supported on Redis (cluster mode - // enabled) T2 instances. + // * Redis (cluster mode disabled): Redis backup/restore is not supported + // on T1 and T2 instances. + // + // * Redis (cluster mode enabled): Backup/restore is not supported on T1 + // instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -5860,51 +6082,51 @@ type CreateCacheClusterInput struct { // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). CacheNodeType *string `type:"string"` - // The name of the parameter group to associate with this cache cluster. If - // this argument is omitted, the default parameter group for the specified engine - // is used. You cannot use any parameter group which has cluster-enabled='yes' - // when creating a cluster. + // The name of the parameter group to associate with this cluster. If this argument + // is omitted, the default parameter group for the specified engine is used. + // You cannot use any parameter group which has cluster-enabled='yes' when creating + // a cluster. CacheParameterGroupName *string `type:"string"` - // A list of security group names to associate with this cache cluster. + // A list of security group names to associate with this cluster. // - // Use this parameter only when you are creating a cache cluster outside of - // an Amazon Virtual Private Cloud (Amazon VPC). + // Use this parameter only when you are creating a cluster outside of an Amazon + // Virtual Private Cloud (Amazon VPC). CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - // The name of the subnet group to be used for the cache cluster. + // The name of the subnet group to be used for the cluster. // - // Use this parameter only when you are creating a cache cluster in an Amazon - // Virtual Private Cloud (Amazon VPC). + // Use this parameter only when you are creating a cluster in an Amazon Virtual + // Private Cloud (Amazon VPC). // // If you're going to launch your cluster in an Amazon VPC, you need to create // a subnet group before you start creating a cluster. For more information, // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SubnetGroups.html). CacheSubnetGroupName *string `type:"string"` - // The name of the cache engine to be used for this cache cluster. + // The name of the cache engine to be used for this cluster. // // Valid values for this parameter are: memcached | redis Engine *string `type:"string"` - // The version number of the cache engine to be used for this cache cluster. - // To view the supported cache engine versions, use the DescribeCacheEngineVersions + // The version number of the cache engine to be used for this cluster. To view + // the supported cache engine versions, use the DescribeCacheEngineVersions // operation. // // Important: You can upgrade to a newer engine version (see Selecting a Cache // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), // but you cannot downgrade to an earlier engine version. If you want to use - // an earlier engine version, you must delete the existing cache cluster or - // replication group and create it anew with the earlier engine version. + // an earlier engine version, you must delete the existing cluster or replication + // group and create it anew with the earlier engine version. EngineVersion *string `type:"string"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service // (SNS) topic to which notifications are sent. // - // The Amazon SNS topic owner must be the same as the cache cluster owner. + // The Amazon SNS topic owner must be the same as the cluster owner. NotificationTopicArn *string `type:"string"` - // The initial number of cache nodes that the cache cluster has. + // The initial number of cache nodes that the cluster has. // // For clusters running Redis, this value must be 1. For clusters running Memcached, // this value must be between 1 and 20. @@ -5917,9 +6139,9 @@ type CreateCacheClusterInput struct { // The port number on which each of the cache nodes accepts connections. Port *int64 `type:"integer"` - // The EC2 Availability Zone in which the cache cluster is created. + // The EC2 Availability Zone in which the cluster is created. // - // All nodes belonging to this Memcached cache cluster are placed in the preferred + // All nodes belonging to this Memcached cluster are placed in the preferred // Availability Zone. If you want to create your nodes across multiple Availability // Zones, use PreferredAvailabilityZones. // @@ -5931,9 +6153,9 @@ type CreateCacheClusterInput struct { // // This option is only supported on Memcached. // - // If you are creating your cache cluster in an Amazon VPC (recommended) you - // can only locate nodes in Availability Zones that are associated with the - // subnets in the selected subnet group. + // If you are creating your cluster in an Amazon VPC (recommended) you can only + // locate nodes in Availability Zones that are associated with the subnets in + // the selected subnet group. // // The number of Availability Zones listed must equal the value of NumCacheNodes. // @@ -5943,8 +6165,8 @@ type CreateCacheClusterInput struct { // Default: System chosen Availability Zones. PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` - // Specifies the weekly time range during which maintenance on the cache cluster - // is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi + // Specifies the weekly time range during which maintenance on the cluster is + // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi // (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid // values for ddd are: // @@ -5975,22 +6197,22 @@ type CreateCacheClusterInput struct { // or parameter is not supported on Redis (cluster mode enabled) replication // groups. // - // The ID of the replication group to which this cache cluster should belong. - // If this parameter is specified, the cache cluster is added to the specified - // replication group as a read replica; otherwise, the cache cluster is a standalone - // primary that is not part of any replication group. + // The ID of the replication group to which this cluster should belong. If this + // parameter is specified, the cluster is added to the specified replication + // group as a read replica; otherwise, the cluster is a standalone primary that + // is not part of any replication group. // // If the specified replication group is Multi-AZ enabled and the Availability - // Zone is not specified, the cache cluster is created in Availability Zones - // that provide the best spread of read replicas across Availability Zones. + // Zone is not specified, the cluster is created in Availability Zones that + // provide the best spread of read replicas across Availability Zones. // // This parameter is only valid if the Engine parameter is redis. ReplicationGroupId *string `type:"string"` - // One or more VPC security groups associated with the cache cluster. + // One or more VPC security groups associated with the cluster. // - // Use this parameter only when you are creating a cache cluster in an Amazon - // Virtual Private Cloud (Amazon VPC). + // Use this parameter only when you are creating a cluster in an Amazon Virtual + // Private Cloud (Amazon VPC). SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` // A single-element string list containing an Amazon Resource Name (ARN) that @@ -6016,7 +6238,7 @@ type CreateCacheClusterInput struct { // // This parameter is only valid if the Engine parameter is redis. // - // Default: 0 (i.e., automatic backups are disabled for this cache cluster). + // Default: 0 (i.e., automatic backups are disabled for this cluster). SnapshotRetentionLimit *int64 `type:"integer"` // The daily time range (in UTC) during which ElastiCache begins taking a daily @@ -6027,11 +6249,10 @@ type CreateCacheClusterInput struct { // If you do not specify this parameter, ElastiCache automatically chooses an // appropriate time range. // - // Note: This parameter is only valid if the Engine parameter is redis. + // This parameter is only valid if the Engine parameter is redis. SnapshotWindow *string `type:"string"` - // A list of cost allocation tags to be added to this resource. A tag is a key-value - // pair. A tag key must be accompanied by a tag value. + // A list of cost allocation tags to be added to this resource. Tags []*Tag `locationNameList:"Tag" type:"list"` } @@ -6200,7 +6421,7 @@ func (s *CreateCacheClusterInput) SetTags(v []*Tag) *CreateCacheClusterInput { type CreateCacheClusterOutput struct { _ struct{} `type:"structure"` - // Contains all of the attributes of a specific cache cluster. + // Contains all of the attributes of a specific cluster. CacheCluster *CacheCluster `type:"structure"` } @@ -6510,18 +6731,38 @@ func (s *CreateCacheSubnetGroupOutput) SetCacheSubnetGroup(v *CacheSubnetGroup) type CreateReplicationGroupInput struct { _ struct{} `type:"structure"` + // A flag that enables encryption at rest when set to true. + // + // You cannot modify the value of AtRestEncryptionEnabled after the replication + // group is created. To enable encryption at rest on a replication group you + // must set AtRestEncryptionEnabled to true when you create the replication + // group. + // + // This parameter is valid only if the Engine parameter is redis and the cluster + // is being created in an Amazon VPC. + // + // Default: false + AtRestEncryptionEnabled *bool `type:"boolean"` + // Reserved parameter. The password used to access a password protected server. // + // This parameter is valid only if: + // + // * The parameter TransitEncryptionEnabled was set to true when the cluster + // was created. + // + // * The line requirepass was added to the database configuration file. + // // Password constraints: // // * Must be only printable ASCII characters. // // * Must be at least 16 characters and no more than 128 characters in length. // - // * Cannot contain any of the following characters: '/', '"', or "@". + // * Cannot contain any of the following characters: '/', '"', or '@'. // // For more information, see AUTH password (http://redis.io/commands/AUTH) at - // Redis. + // http://redis.io/commands/AUTH. AuthToken *string `type:"string"` // This parameter is currently disabled. @@ -6538,45 +6779,66 @@ type CreateReplicationGroupInput struct { // // Default: false // - // ElastiCache Multi-AZ replication groups is not supported on: + // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover + // on: // - // Redis versions earlier than 2.8.6. + // * Redis versions earlier than 2.8.6. // - // Redis (cluster mode disabled): T1 and T2 node types. + // * Redis (cluster mode disabled): T1 and T2 cache node types. // - // Redis (cluster mode enabled): T2 node types. + // * Redis (cluster mode enabled): T1 node types. AutomaticFailoverEnabled *bool `type:"boolean"` // The compute and memory capacity of the nodes in the node group (shard). // - // Valid node types are as follows: + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // - // Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, - // cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // Current generation: // - // Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge + // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // - // * Compute optimized: cache.c1.xlarge + // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, + // cache.m4.10xlarge + // + // Previous generation: (not recommended) + // + // T1 node types:cache.t1.micro + // + // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // + // * Compute optimized: + // + // Previous generation: (not recommended) + // + // C1 node types:cache.c1.xlarge // // * Memory optimized: // - // Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // Current generation: + // + // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // - // Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // Previous generation: (not recommended) + // + // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // - // * Redis backup/restore is not supported for Redis (cluster mode disabled) - // T1 and T2 instances. Backup/restore is supported on Redis (cluster mode - // enabled) T2 instances. + // * Redis (cluster mode disabled): Redis backup/restore is not supported + // on T1 and T2 instances. + // + // * Redis (cluster mode enabled): Backup/restore is not supported on T1 + // instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -6610,19 +6872,19 @@ type CreateReplicationGroupInput struct { // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SubnetGroups.html). CacheSubnetGroupName *string `type:"string"` - // The name of the cache engine to be used for the cache clusters in this replication + // The name of the cache engine to be used for the clusters in this replication // group. Engine *string `type:"string"` - // The version number of the cache engine to be used for the cache clusters - // in this replication group. To view the supported cache engine versions, use - // the DescribeCacheEngineVersions operation. + // The version number of the cache engine to be used for the clusters in this + // replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions + // operation. // // Important: You can upgrade to a newer engine version (see Selecting a Cache // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)) // in the ElastiCache User Guide, but you cannot downgrade to an earlier engine // version. If you want to use an earlier engine version, you must delete the - // existing cache cluster or replication group and create it anew with the earlier + // existing cluster or replication group and create it anew with the earlier // engine version. EngineVersion *string `type:"string"` @@ -6638,7 +6900,7 @@ type CreateReplicationGroupInput struct { // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service // (SNS) topic to which notifications are sent. // - // The Amazon SNS topic owner must be the same as the cache cluster owner. + // The Amazon SNS topic owner must be the same as the cluster owner. NotificationTopicArn *string `type:"string"` // The number of clusters this replication group initially has. @@ -6664,7 +6926,7 @@ type CreateReplicationGroupInput struct { // The port number on which each member of the replication group accepts connections. Port *int64 `type:"integer"` - // A list of EC2 Availability Zones in which the replication group's cache clusters + // A list of EC2 Availability Zones in which the replication group's clusters // are created. The order of the Availability Zones in the list is the order // in which clusters are allocated. The primary cluster is created in the first // AZ in the list. @@ -6673,16 +6935,16 @@ type CreateReplicationGroupInput struct { // You should use NodeGroupConfiguration instead. // // If you are creating your replication group in an Amazon VPC (recommended), - // you can only locate cache clusters in Availability Zones associated with - // the subnets in the selected subnet group. + // you can only locate clusters in Availability Zones associated with the subnets + // in the selected subnet group. // // The number of Availability Zones listed must equal the value of NumCacheClusters. // // Default: system chosen Availability Zones. PreferredCacheClusterAZs []*string `locationNameList:"AvailabilityZone" type:"list"` - // Specifies the weekly time range during which maintenance on the cache cluster - // is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi + // Specifies the weekly time range during which maintenance on the cluster is + // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi // (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid // values for ddd are: // @@ -6709,8 +6971,8 @@ type CreateReplicationGroupInput struct { // Example: sun:23:00-mon:01:30 PreferredMaintenanceWindow *string `type:"string"` - // The identifier of the cache cluster that serves as the primary for this replication - // group. This cache cluster must already exist and have a status of available. + // The identifier of the cluster that serves as the primary for this replication + // group. This cluster must already exist and have a status of available. // // This parameter is not required if NumCacheClusters, NumNodeGroups, or ReplicasPerNodeGroup // is specified. @@ -6753,25 +7015,19 @@ type CreateReplicationGroupInput struct { // of node groups configured by NodeGroupConfiguration regardless of the number // of ARNs specified here. // - // This parameter is only valid if the Engine parameter is redis. - // // Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb SnapshotArns []*string `locationNameList:"SnapshotArn" type:"list"` // The name of a snapshot from which to restore data into the new replication // group. The snapshot status changes to restoring while the new replication // group is being created. - // - // This parameter is only valid if the Engine parameter is redis. SnapshotName *string `type:"string"` // The number of days for which ElastiCache retains automatic snapshots before // deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot // that was taken today is retained for 5 days before being deleted. // - // This parameter is only valid if the Engine parameter is redis. - // - // Default: 0 (i.e., automatic backups are disabled for this cache cluster). + // Default: 0 (i.e., automatic backups are disabled for this cluster). SnapshotRetentionLimit *int64 `type:"integer"` // The daily time range (in UTC) during which ElastiCache begins taking a daily @@ -6781,13 +7037,26 @@ type CreateReplicationGroupInput struct { // // If you do not specify this parameter, ElastiCache automatically chooses an // appropriate time range. - // - // This parameter is only valid if the Engine parameter is redis. SnapshotWindow *string `type:"string"` // A list of cost allocation tags to be added to this resource. A tag is a key-value - // pair. A tag key must be accompanied by a tag value. + // pair. A tag key does not have to be accompanied by a tag value. Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A flag that enables in-transit encryption when set to true. + // + // You cannot modify the value of TransitEncryptionEnabled after the cluster + // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled + // to true when you create a cluster. + // + // This parameter is valid only if the Engine parameter is redis, the EngineVersion + // parameter is 3.2.4 or later, and the cluster is being created in an Amazon + // VPC. + // + // If you enable in-transit encryption, you must also specify a value for CacheSubnetGroup. + // + // Default: false + TransitEncryptionEnabled *bool `type:"boolean"` } // String returns the string representation @@ -6816,6 +7085,12 @@ func (s *CreateReplicationGroupInput) Validate() error { return nil } +// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. +func (s *CreateReplicationGroupInput) SetAtRestEncryptionEnabled(v bool) *CreateReplicationGroupInput { + s.AtRestEncryptionEnabled = &v + return s +} + // SetAuthToken sets the AuthToken field's value. func (s *CreateReplicationGroupInput) SetAuthToken(v string) *CreateReplicationGroupInput { s.AuthToken = &v @@ -6972,6 +7247,12 @@ func (s *CreateReplicationGroupInput) SetTags(v []*Tag) *CreateReplicationGroupI return s } +// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. +func (s *CreateReplicationGroupInput) SetTransitEncryptionEnabled(v bool) *CreateReplicationGroupInput { + s.TransitEncryptionEnabled = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateReplicationGroupResult type CreateReplicationGroupOutput struct { _ struct{} `type:"structure"` @@ -7001,8 +7282,8 @@ func (s *CreateReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) type CreateSnapshotInput struct { _ struct{} `type:"structure"` - // The identifier of an existing cache cluster. The snapshot is created from - // this cache cluster. + // The identifier of an existing cluster. The snapshot is created from this + // cluster. CacheClusterId *string `type:"string"` // The identifier of an existing replication group. The snapshot is created @@ -7060,8 +7341,8 @@ func (s *CreateSnapshotInput) SetSnapshotName(v string) *CreateSnapshotInput { type CreateSnapshotOutput struct { _ struct{} `type:"structure"` - // Represents a copy of an entire Redis cache cluster as of the time when the - // snapshot was taken. + // Represents a copy of an entire Redis cluster as of the time when the snapshot + // was taken. Snapshot *Snapshot `type:"structure"` } @@ -7086,15 +7367,15 @@ func (s *CreateSnapshotOutput) SetSnapshot(v *Snapshot) *CreateSnapshotOutput { type DeleteCacheClusterInput struct { _ struct{} `type:"structure"` - // The cache cluster identifier for the cluster to be deleted. This parameter - // is not case sensitive. + // The cluster identifier for the cluster to be deleted. This parameter is not + // case sensitive. // // CacheClusterId is a required field CacheClusterId *string `type:"string" required:"true"` - // The user-supplied name of a final cache cluster snapshot. This is the unique - // name that identifies the snapshot. ElastiCache creates the snapshot, and - // then deletes the cache cluster immediately afterward. + // The user-supplied name of a final cluster snapshot. This is the unique name + // that identifies the snapshot. ElastiCache creates the snapshot, and then + // deletes the cluster immediately afterward. FinalSnapshotIdentifier *string `type:"string"` } @@ -7137,7 +7418,7 @@ func (s *DeleteCacheClusterInput) SetFinalSnapshotIdentifier(v string) *DeleteCa type DeleteCacheClusterOutput struct { _ struct{} `type:"structure"` - // Contains all of the attributes of a specific cache cluster. + // Contains all of the attributes of a specific cluster. CacheCluster *CacheCluster `type:"structure"` } @@ -7164,8 +7445,7 @@ type DeleteCacheParameterGroupInput struct { // The name of the cache parameter group to delete. // - // The specified cache security group must not be associated with any cache - // clusters. + // The specified cache security group must not be associated with any clusters. // // CacheParameterGroupName is a required field CacheParameterGroupName *string `type:"string" required:"true"` @@ -7460,8 +7740,8 @@ func (s *DeleteSnapshotInput) SetSnapshotName(v string) *DeleteSnapshotInput { type DeleteSnapshotOutput struct { _ struct{} `type:"structure"` - // Represents a copy of an entire Redis cache cluster as of the time when the - // snapshot was taken. + // Represents a copy of an entire Redis cluster as of the time when the snapshot + // was taken. Snapshot *Snapshot `type:"structure"` } @@ -7487,8 +7767,8 @@ type DescribeCacheClustersInput struct { _ struct{} `type:"structure"` // The user-supplied cluster identifier. If this parameter is specified, only - // information about that specific cache cluster is returned. This parameter - // isn't case sensitive. + // information about that specific cluster is returned. This parameter isn't + // case sensitive. CacheClusterId *string `type:"string"` // An optional marker returned from a prior request. Use this marker for pagination @@ -7560,8 +7840,8 @@ func (s *DescribeCacheClustersInput) SetShowCacheNodeInfo(v bool) *DescribeCache type DescribeCacheClustersOutput struct { _ struct{} `type:"structure"` - // A list of cache clusters. Each item in the list contains detailed information - // about one cache cluster. + // A list of clusters. Each item in the list contains detailed information about + // one cluster. CacheClusters []*CacheCluster `locationNameList:"CacheCluster" type:"list"` // Provides an identifier to allow retrieval of paginated results. @@ -8415,34 +8695,54 @@ type DescribeReservedCacheNodesInput struct { // The cache node type filter value. Use this parameter to show only those reservations // matching the specified cache node type. // - // Valid node types are as follows: + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // - // Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, - // cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // Current generation: // - // Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge + // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // - // * Compute optimized: cache.c1.xlarge + // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, + // cache.m4.10xlarge + // + // Previous generation: (not recommended) + // + // T1 node types:cache.t1.micro + // + // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // + // * Compute optimized: + // + // Previous generation: (not recommended) + // + // C1 node types:cache.c1.xlarge // // * Memory optimized: // - // Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // Current generation: + // + // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // - // Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // Previous generation: (not recommended) + // + // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // - // * Redis backup/restore is not supported for Redis (cluster mode disabled) - // T1 and T2 instances. Backup/restore is supported on Redis (cluster mode - // enabled) T2 instances. + // * Redis (cluster mode disabled): Redis backup/restore is not supported + // on T1 and T2 instances. + // + // * Redis (cluster mode enabled): Backup/restore is not supported on T1 + // instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -8558,34 +8858,54 @@ type DescribeReservedCacheNodesOfferingsInput struct { // The cache node type filter value. Use this parameter to show only the available // offerings matching the specified cache node type. // - // Valid node types are as follows: + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // - // Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, - // cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // Current generation: // - // Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge + // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // - // * Compute optimized: cache.c1.xlarge + // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, + // cache.m4.10xlarge + // + // Previous generation: (not recommended) + // + // T1 node types:cache.t1.micro + // + // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // + // * Compute optimized: + // + // Previous generation: (not recommended) + // + // C1 node types:cache.c1.xlarge // // * Memory optimized: // - // Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // Current generation: + // + // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // - // Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // Previous generation: (not recommended) + // + // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // - // * Redis backup/restore is not supported for Redis (cluster mode disabled) - // T1 and T2 instances. Backup/restore is supported on Redis (cluster mode - // enabled) T2 instances. + // * Redis (cluster mode disabled): Redis backup/restore is not supported + // on T1 and T2 instances. + // + // * Redis (cluster mode enabled): Backup/restore is not supported on T1 + // instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -8761,7 +9081,7 @@ type DescribeSnapshotsInput struct { _ struct{} `type:"structure"` // A user-supplied cluster identifier. If this parameter is specified, only - // snapshots associated with that specific cache cluster are described. + // snapshots associated with that specific cluster are described. CacheClusterId *string `type:"string"` // An optional marker returned from a prior request. Use this marker for pagination @@ -9021,8 +9341,8 @@ func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { } // Represents a single occurrence of something interesting within the system. -// Some examples of events are creating a cache cluster, adding or removing -// a cache node, or rebooting a node. +// Some examples of events are creating a cluster, adding or removing a cache +// node, or rebooting a node. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/Event type Event struct { _ struct{} `type:"structure"` @@ -9034,12 +9354,11 @@ type Event struct { Message *string `type:"string"` // The identifier for the source of the event. For example, if the event occurred - // at the cache cluster level, the identifier would be the name of the cache - // cluster. + // at the cluster level, the identifier would be the name of the cluster. SourceIdentifier *string `type:"string"` - // Specifies the origin of this event - a cache cluster, a parameter group, - // a security group, etc. + // Specifies the origin of this event - a cluster, a parameter group, a security + // group, etc. SourceType *string `type:"string" enum:"SourceType"` } @@ -9082,10 +9401,9 @@ func (s *Event) SetSourceType(v string) *Event { type ListAllowedNodeTypeModificationsInput struct { _ struct{} `type:"structure"` - // The name of the cache cluster you want to scale up to a larger node instanced - // type. ElastiCache uses the cluster id to identify the current node type of - // this cluster and from that to create a list of node types you can scale up - // to. + // The name of the cluster you want to scale up to a larger node instanced type. + // ElastiCache uses the cluster id to identify the current node type of this + // cluster and from that to create a list of node types you can scale up to. // // You must provide a value for either the CacheClusterId or the ReplicationGroupId. CacheClusterId *string `type:"string"` @@ -9121,14 +9439,14 @@ func (s *ListAllowedNodeTypeModificationsInput) SetReplicationGroupId(v string) return s } -// Represents the allowed node types you can use to modify your cache cluster -// or replication group. +// Represents the allowed node types you can use to modify your cluster or replication +// group. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/AllowedNodeTypeModificationsMessage type ListAllowedNodeTypeModificationsOutput struct { _ struct{} `type:"structure"` // A string list, each element of which specifies a cache node type which you - // can use to scale your cache cluster or replication group. + // can use to scale your cluster or replication group. // // When scaling up a Redis cluster or replication group using ModifyCacheCluster // or ModifyReplicationGroup, use a value from this list for the CacheNodeType @@ -9202,16 +9520,16 @@ func (s *ListTagsForResourceInput) SetResourceName(v string) *ListTagsForResourc type ModifyCacheClusterInput struct { _ struct{} `type:"structure"` - // Specifies whether the new nodes in this Memcached cache cluster are all created + // Specifies whether the new nodes in this Memcached cluster are all created // in a single Availability Zone or created across multiple Availability Zones. // // Valid values: single-az | cross-az. // - // This option is only supported for Memcached cache clusters. + // This option is only supported for Memcached clusters. // - // You cannot specify single-az if the Memcached cache cluster already has cache - // nodes in different Availability Zones. If cross-az is specified, existing - // Memcached nodes remain in their current Availability Zone. + // You cannot specify single-az if the Memcached cluster already has cache nodes + // in different Availability Zones. If cross-az is specified, existing Memcached + // nodes remain in their current Availability Zone. // // Only newly created nodes are located in different Availability Zones. For // instructions on how to move existing Memcached nodes to different Availability @@ -9221,10 +9539,10 @@ type ModifyCacheClusterInput struct { // If true, this parameter causes the modifications in this request and any // pending modifications to be applied, asynchronously and as soon as possible, - // regardless of the PreferredMaintenanceWindow setting for the cache cluster. + // regardless of the PreferredMaintenanceWindow setting for the cluster. // - // If false, changes to the cache cluster are applied on the next maintenance - // reboot, or the next failure reboot, whichever occurs first. + // If false, changes to the cluster are applied on the next maintenance reboot, + // or the next failure reboot, whichever occurs first. // // If you perform a ModifyCacheCluster before a pending modification is applied, // the pending modification is replaced by the newer modification. @@ -9237,7 +9555,7 @@ type ModifyCacheClusterInput struct { // This parameter is currently disabled. AutoMinorVersionUpgrade *bool `type:"boolean"` - // The cache cluster identifier. This value is stored as a lowercase string. + // The cluster identifier. This value is stored as a lowercase string. // // CacheClusterId is a required field CacheClusterId *string `type:"string" required:"true"` @@ -9250,20 +9568,20 @@ type ModifyCacheClusterInput struct { // and the value of NumCacheNodes in the request. // // For example: If you have 3 active cache nodes, 7 pending cache nodes, and - // the number of cache nodes in this ModifyCacheCluser call is 5, you must list - // 2 (7 - 5) cache node IDs to remove. + // the number of cache nodes in this ModifyCacheCluster call is 5, you must + // list 2 (7 - 5) cache node IDs to remove. CacheNodeIdsToRemove []*string `locationNameList:"CacheNodeId" type:"list"` - // A valid cache node type that you want to scale this cache cluster up to. + // A valid cache node type that you want to scale this cluster up to. CacheNodeType *string `type:"string"` - // The name of the cache parameter group to apply to this cache cluster. This - // change is asynchronously applied as soon as possible for parameters when - // the ApplyImmediately parameter is specified as true for this request. + // The name of the cache parameter group to apply to this cluster. This change + // is asynchronously applied as soon as possible for parameters when the ApplyImmediately + // parameter is specified as true for this request. CacheParameterGroupName *string `type:"string"` - // A list of cache security group names to authorize on this cache cluster. - // This change is asynchronously applied as soon as possible. + // A list of cache security group names to authorize on this cluster. This change + // is asynchronously applied as soon as possible. // // You can use this parameter only with clusters that are created outside of // an Amazon Virtual Private Cloud (Amazon VPC). @@ -9277,8 +9595,8 @@ type ModifyCacheClusterInput struct { // Important: You can upgrade to a newer engine version (see Selecting a Cache // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), // but you cannot downgrade to an earlier engine version. If you want to use - // an earlier engine version, you must delete the existing cache cluster and - // create it anew with the earlier engine version. + // an earlier engine version, you must delete the existing cluster and create + // it anew with the earlier engine version. EngineVersion *string `type:"string"` // The list of Availability Zones where the new Memcached cache nodes are created. @@ -9356,7 +9674,7 @@ type ModifyCacheClusterInput struct { // The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications // are sent. // - // The Amazon SNS topic owner must be same as the cache cluster owner. + // The Amazon SNS topic owner must be same as the cluster owner. NotificationTopicArn *string `type:"string"` // The status of the Amazon SNS notification topic. Notifications are sent only @@ -9365,12 +9683,12 @@ type ModifyCacheClusterInput struct { // Valid values: active | inactive NotificationTopicStatus *string `type:"string"` - // The number of cache nodes that the cache cluster should have. If the value - // for NumCacheNodes is greater than the sum of the number of current cache - // nodes and the number of cache nodes pending creation (which may be zero), - // more nodes are added. If the value is less than the number of existing cache - // nodes, nodes are removed. If the value is equal to the number of current - // cache nodes, any pending add or remove requests are canceled. + // The number of cache nodes that the cluster should have. If the value for + // NumCacheNodes is greater than the sum of the number of current cache nodes + // and the number of cache nodes pending creation (which may be zero), more + // nodes are added. If the value is less than the number of existing cache nodes, + // nodes are removed. If the value is equal to the number of current cache nodes, + // any pending add or remove requests are canceled. // // If you are removing cache nodes, you must use the CacheNodeIdsToRemove parameter // to provide the IDs of the specific cache nodes to remove. @@ -9395,7 +9713,7 @@ type ModifyCacheClusterInput struct { // operation to add more nodes or explicitly cancel the pending request and // retry the new request. To cancel pending operations to modify the number // of cache nodes in a cluster, use the ModifyCacheCluster request and set NumCacheNodes - // equal to the number of cache nodes currently in the cache cluster. + // equal to the number of cache nodes currently in the cluster. NumCacheNodes *int64 `type:"integer"` // Specifies the weekly time range during which maintenance on the cluster is @@ -9421,23 +9739,22 @@ type ModifyCacheClusterInput struct { // Example: sun:23:00-mon:01:30 PreferredMaintenanceWindow *string `type:"string"` - // Specifies the VPC Security Groups associated with the cache cluster. + // Specifies the VPC Security Groups associated with the cluster. // // This parameter can be used only with clusters that are created in an Amazon // Virtual Private Cloud (Amazon VPC). SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` - // The number of days for which ElastiCache retains automatic cache cluster - // snapshots before deleting them. For example, if you set SnapshotRetentionLimit - // to 5, a snapshot that was taken today is retained for 5 days before being - // deleted. + // The number of days for which ElastiCache retains automatic cluster snapshots + // before deleting them. For example, if you set SnapshotRetentionLimit to 5, + // a snapshot that was taken today is retained for 5 days before being deleted. // // If the value of SnapshotRetentionLimit is set to zero (0), backups are turned // off. SnapshotRetentionLimit *int64 `type:"integer"` // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your cache cluster. + // snapshot of your cluster. SnapshotWindow *string `type:"string"` } @@ -9570,7 +9887,7 @@ func (s *ModifyCacheClusterInput) SetSnapshotWindow(v string) *ModifyCacheCluste type ModifyCacheClusterOutput struct { _ struct{} `type:"structure"` - // Contains all of the attributes of a specific cache cluster. + // Contains all of the attributes of a specific cluster. CacheCluster *CacheCluster `type:"structure"` } @@ -9763,13 +10080,14 @@ type ModifyReplicationGroupInput struct { // // Valid values: true | false // - // ElastiCache Multi-AZ replication groups are not supported on: + // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover + // on: // - // Redis versions earlier than 2.8.6. + // * Redis versions earlier than 2.8.6. // - // Redis (cluster mode disabled):T1 and T2 cache node types. + // * Redis (cluster mode disabled): T1 and T2 cache node types. // - // Redis (cluster mode enabled): T1 node types. + // * Redis (cluster mode enabled): T1 node types. AutomaticFailoverEnabled *bool `type:"boolean"` // A valid cache node type that you want to scale this replication group to. @@ -9784,15 +10102,15 @@ type ModifyReplicationGroupInput struct { // A list of cache security group names to authorize for the clusters in this // replication group. This change is asynchronously applied as soon as possible. // - // This parameter can be used only with replication group containing cache clusters + // This parameter can be used only with replication group containing clusters // running outside of an Amazon Virtual Private Cloud (Amazon VPC). // // Constraints: Must contain no more than 255 alphanumeric characters. Must // not be Default. CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - // The upgraded version of the cache engine to be run on the cache clusters - // in the replication group. + // The upgraded version of the cache engine to be run on the clusters in the + // replication group. // // Important: You can upgrade to a newer engine version (see Selecting a Cache // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), @@ -9853,10 +10171,10 @@ type ModifyReplicationGroupInput struct { // ReplicationGroupId is a required field ReplicationGroupId *string `type:"string" required:"true"` - // Specifies the VPC Security Groups associated with the cache clusters in the - // replication group. + // Specifies the VPC Security Groups associated with the clusters in the replication + // group. // - // This parameter can be used only with replication group containing cache clusters + // This parameter can be used only with replication group containing clusters // running in an Amazon Virtual Private Cloud (Amazon VPC). SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` @@ -9878,7 +10196,7 @@ type ModifyReplicationGroupInput struct { // appropriate time range. SnapshotWindow *string `type:"string"` - // The cache cluster ID that is used as the daily snapshot source for the replication + // The cluster ID that is used as the daily snapshot source for the replication // group. This parameter cannot be set for Redis (cluster mode enabled) replication // groups. SnapshottingClusterId *string `type:"string"` @@ -10039,6 +10357,130 @@ func (s *ModifyReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) return s } +// Represents the input for a ModifyReplicationGroupShardConfiguration operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfigurationMessage +type ModifyReplicationGroupShardConfigurationInput struct { + _ struct{} `type:"structure"` + + // Indicates that the shard reconfiguration process begins immediately. At present, + // the only permitted value for this parameter is true. + // + // Value: true + // + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` + + // The number of node groups (shards) that results from the modification of + // the shard configuration. + // + // NodeGroupCount is a required field + NodeGroupCount *int64 `type:"integer" required:"true"` + + // If the value of NodeGroupCount is less than the current number of node groups + // (shards), NodeGroupsToRemove is a required list of node group ids to remove + // from the cluster. + NodeGroupsToRemove []*string `locationNameList:"NodeGroupToRemove" type:"list"` + + // The name of the Redis (cluster mode enabled) cluster (replication group) + // on which the shards are to be configured. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` + + // Specifies the preferred availability zones for each node group in the cluster. + // If the value of NodeGroupCount is greater than the current number of node + // groups (shards), you can use this parameter to specify the preferred availability + // zones of the cluster's shards. If you omit this parameter ElastiCache selects + // availability zones for you. + // + // You can specify this parameter only if the value of NodeGroupCount is greater + // than the current number of node groups (shards). + ReshardingConfiguration []*ReshardingConfiguration `locationNameList:"ReshardingConfiguration" type:"list"` +} + +// String returns the string representation +func (s ModifyReplicationGroupShardConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyReplicationGroupShardConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyReplicationGroupShardConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyReplicationGroupShardConfigurationInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) + } + if s.NodeGroupCount == nil { + invalidParams.Add(request.NewErrParamRequired("NodeGroupCount")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *ModifyReplicationGroupShardConfigurationInput) SetApplyImmediately(v bool) *ModifyReplicationGroupShardConfigurationInput { + s.ApplyImmediately = &v + return s +} + +// SetNodeGroupCount sets the NodeGroupCount field's value. +func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupCount(v int64) *ModifyReplicationGroupShardConfigurationInput { + s.NodeGroupCount = &v + return s +} + +// SetNodeGroupsToRemove sets the NodeGroupsToRemove field's value. +func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupsToRemove(v []*string) *ModifyReplicationGroupShardConfigurationInput { + s.NodeGroupsToRemove = v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *ModifyReplicationGroupShardConfigurationInput) SetReplicationGroupId(v string) *ModifyReplicationGroupShardConfigurationInput { + s.ReplicationGroupId = &v + return s +} + +// SetReshardingConfiguration sets the ReshardingConfiguration field's value. +func (s *ModifyReplicationGroupShardConfigurationInput) SetReshardingConfiguration(v []*ReshardingConfiguration) *ModifyReplicationGroupShardConfigurationInput { + s.ReshardingConfiguration = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfigurationResult +type ModifyReplicationGroupShardConfigurationOutput struct { + _ struct{} `type:"structure"` + + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s ModifyReplicationGroupShardConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyReplicationGroupShardConfigurationOutput) GoString() string { + return s.String() +} + +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *ModifyReplicationGroupShardConfigurationOutput) SetReplicationGroup(v *ReplicationGroup) *ModifyReplicationGroupShardConfigurationOutput { + s.ReplicationGroup = v + return s +} + // Represents a collection of cache nodes in a replication group. One node in // the node group is the read/write primary node. All the other nodes are read-only // Replica nodes. @@ -10106,7 +10548,7 @@ func (s *NodeGroup) SetStatus(v string) *NodeGroup { return s } -// node group (shard) configuration options. Each node group (shard) configuration +// Node group (shard) configuration options. Each node group (shard) configuration // has the following: Slots, PrimaryAvailabilityZone, ReplicaAvailabilityZones, // ReplicaCount. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/NodeGroupConfiguration @@ -10171,10 +10613,10 @@ func (s *NodeGroupConfiguration) SetSlots(v string) *NodeGroupConfiguration { type NodeGroupMember struct { _ struct{} `type:"structure"` - // The ID of the cache cluster to which the node belongs. + // The ID of the cluster to which the node belongs. CacheClusterId *string `type:"string"` - // The ID of the node within its cache cluster. A node ID is a numeric identifier + // The ID of the node within its cluster. A node ID is a numeric identifier // (0001, 0002, etc.). CacheNodeId *string `type:"string"` @@ -10229,18 +10671,18 @@ func (s *NodeGroupMember) SetReadEndpoint(v *Endpoint) *NodeGroupMember { return s } -// Represents an individual cache node in a snapshot of a cache cluster. +// Represents an individual cache node in a snapshot of a cluster. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/NodeSnapshot type NodeSnapshot struct { _ struct{} `type:"structure"` - // A unique identifier for the source cache cluster. + // A unique identifier for the source cluster. CacheClusterId *string `type:"string"` - // The date and time when the cache node was created in the source cache cluster. + // The date and time when the cache node was created in the source cluster. CacheNodeCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` - // The cache node identifier for the node in the source cache cluster. + // The cache node identifier for the node in the source cluster. CacheNodeId *string `type:"string"` // The size of the cache on the source cache node. @@ -10482,24 +10924,23 @@ func (s *ParameterNameValue) SetParameterValue(v string) *ParameterNameValue { return s } -// A group of settings that are applied to the cache cluster in the future, -// or that are currently being applied. +// A group of settings that are applied to the cluster in the future, or that +// are currently being applied. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/PendingModifiedValues type PendingModifiedValues struct { _ struct{} `type:"structure"` // A list of cache node IDs that are being removed (or will be removed) from - // the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.). + // the cluster. A node ID is a numeric identifier (0001, 0002, etc.). CacheNodeIdsToRemove []*string `locationNameList:"CacheNodeId" type:"list"` - // The cache node type that this cache cluster or replication group is scaled - // to. + // The cache node type that this cluster or replication group is scaled to. CacheNodeType *string `type:"string"` - // The new cache engine version that the cache cluster runs. + // The new cache engine version that the cluster runs. EngineVersion *string `type:"string"` - // The new number of cache nodes for the cache cluster. + // The new number of cache nodes for the cluster. // // For clusters running Redis, this value must be 1. For clusters running Memcached, // this value must be between 1 and 20. @@ -10637,14 +11078,13 @@ func (s *PurchaseReservedCacheNodesOfferingOutput) SetReservedCacheNode(v *Reser type RebootCacheClusterInput struct { _ struct{} `type:"structure"` - // The cache cluster identifier. This parameter is stored as a lowercase string. + // The cluster identifier. This parameter is stored as a lowercase string. // // CacheClusterId is a required field CacheClusterId *string `type:"string" required:"true"` // A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, - // 0002, etc.). To reboot an entire cache cluster, specify all of the cache - // node IDs. + // 0002, etc.). To reboot an entire cluster, specify all of the cache node IDs. // // CacheNodeIdsToReboot is a required field CacheNodeIdsToReboot []*string `locationNameList:"CacheNodeId" type:"list" required:"true"` @@ -10692,7 +11132,7 @@ func (s *RebootCacheClusterInput) SetCacheNodeIdsToReboot(v []*string) *RebootCa type RebootCacheClusterOutput struct { _ struct{} `type:"structure"` - // Contains all of the attributes of a specific cache cluster. + // Contains all of the attributes of a specific cluster. CacheCluster *CacheCluster `type:"structure"` } @@ -10811,15 +11251,31 @@ func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromRes type ReplicationGroup struct { _ struct{} `type:"structure"` - // Indicates the status of Multi-AZ for this replication group. + // A flag that enables encryption at-rest when set to true. // - // ElastiCache Multi-AZ replication groups are not supported on: + // You cannot modify the value of AtRestEncryptionEnabled after the cluster + // is created. To enable encryption at-rest on a cluster you must set AtRestEncryptionEnabled + // to true when you create a cluster. // - // Redis versions earlier than 2.8.6. + // Default: false + AtRestEncryptionEnabled *bool `type:"boolean"` + + // A flag that enables using an AuthToken (password) when issuing Redis commands. // - // Redis (cluster mode disabled):T1 and T2 cache node types. + // Default: false + AuthTokenEnabled *bool `type:"boolean"` + + // Indicates the status of Multi-AZ with automatic failover for this Redis replication + // group. // - // Redis (cluster mode enabled): T1 node types. + // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover + // on: + // + // * Redis versions earlier than 2.8.6. + // + // * Redis (cluster mode disabled): T1 and T2 cache node types. + // + // * Redis (cluster mode enabled): T1 node types. AutomaticFailover *string `type:"string" enum:"AutomaticFailoverStatus"` // The name of the compute and memory capacity node type for each node in the @@ -10833,18 +11289,20 @@ type ReplicationGroup struct { // Valid values: true | false ClusterEnabled *bool `type:"boolean"` - // The configuration endpoint for this replicaiton group. Use the configuration + // The configuration endpoint for this replication group. Use the configuration // endpoint to connect to this replication group. ConfigurationEndpoint *Endpoint `type:"structure"` - // The description of the replication group. + // The user supplied description of the replication group. Description *string `type:"string"` - // The names of all the cache clusters that are part of this replication group. + // The identifiers of all the nodes that are part of this replication group. MemberClusters []*string `locationNameList:"ClusterId" type:"list"` - // A single element list with information about the nodes in the replication - // group. + // A list of node groups in this replication group. For Redis (cluster mode + // disabled) replication groups, this is a single-element list. For Redis (cluster + // mode enabled) replication groups, the list contains an entry for each node + // group (shard). NodeGroups []*NodeGroup `locationNameList:"NodeGroup" type:"list"` // A group of settings to be applied to the replication group, either immediately @@ -10854,10 +11312,9 @@ type ReplicationGroup struct { // The identifier for the replication group. ReplicationGroupId *string `type:"string"` - // The number of days for which ElastiCache retains automatic cache cluster - // snapshots before deleting them. For example, if you set SnapshotRetentionLimit - // to 5, a snapshot that was taken today is retained for 5 days before being - // deleted. + // The number of days for which ElastiCache retains automatic cluster snapshots + // before deleting them. For example, if you set SnapshotRetentionLimit to 5, + // a snapshot that was taken today is retained for 5 days before being deleted. // // If the value of SnapshotRetentionLimit is set to zero (0), backups are turned // off. @@ -10871,16 +11328,25 @@ type ReplicationGroup struct { // If you do not specify this parameter, ElastiCache automatically chooses an // appropriate time range. // - // Note: This parameter is only valid if the Engine parameter is redis. + // This parameter is only valid if the Engine parameter is redis. SnapshotWindow *string `type:"string"` - // The cache cluster ID that is used as the daily snapshot source for the replication + // The cluster ID that is used as the daily snapshot source for the replication // group. SnapshottingClusterId *string `type:"string"` // The current state of this replication group - creating, available, modifying, // deleting, create-failed, snapshotting. Status *string `type:"string"` + + // A flag that enables in-transit encryption when set to true. + // + // You cannot modify the value of TransitEncryptionEnabled after the cluster + // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled + // to true when you create a cluster. + // + // Default: false + TransitEncryptionEnabled *bool `type:"boolean"` } // String returns the string representation @@ -10893,6 +11359,18 @@ func (s ReplicationGroup) GoString() string { return s.String() } +// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. +func (s *ReplicationGroup) SetAtRestEncryptionEnabled(v bool) *ReplicationGroup { + s.AtRestEncryptionEnabled = &v + return s +} + +// SetAuthTokenEnabled sets the AuthTokenEnabled field's value. +func (s *ReplicationGroup) SetAuthTokenEnabled(v bool) *ReplicationGroup { + s.AuthTokenEnabled = &v + return s +} + // SetAutomaticFailover sets the AutomaticFailover field's value. func (s *ReplicationGroup) SetAutomaticFailover(v string) *ReplicationGroup { s.AutomaticFailover = &v @@ -10971,26 +11449,37 @@ func (s *ReplicationGroup) SetStatus(v string) *ReplicationGroup { return s } +// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. +func (s *ReplicationGroup) SetTransitEncryptionEnabled(v bool) *ReplicationGroup { + s.TransitEncryptionEnabled = &v + return s +} + // The settings to be applied to the Redis replication group, either immediately // or during the next maintenance window. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ReplicationGroupPendingModifiedValues type ReplicationGroupPendingModifiedValues struct { _ struct{} `type:"structure"` - // Indicates the status of Multi-AZ for this Redis replication group. + // Indicates the status of Multi-AZ with automatic failover for this Redis replication + // group. // - // ElastiCache Multi-AZ replication groups are not supported on: + // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover + // on: // - // Redis versions earlier than 2.8.6. + // * Redis versions earlier than 2.8.6. // - // Redis (cluster mode disabled):T1 and T2 cache node types. + // * Redis (cluster mode disabled): T1 and T2 cache node types. // - // Redis (cluster mode enabled): T1 node types. + // * Redis (cluster mode enabled): T1 node types. AutomaticFailoverStatus *string `type:"string" enum:"PendingAutomaticFailoverStatus"` // The primary cluster ID that is applied immediately (if --apply-immediately // was specified), or during the next maintenance window. PrimaryClusterId *string `type:"string"` + + // The status of an online resharding operation. + Resharding *ReshardingStatus `type:"structure"` } // String returns the string representation @@ -11015,6 +11504,12 @@ func (s *ReplicationGroupPendingModifiedValues) SetPrimaryClusterId(v string) *R return s } +// SetResharding sets the Resharding field's value. +func (s *ReplicationGroupPendingModifiedValues) SetResharding(v *ReshardingStatus) *ReplicationGroupPendingModifiedValues { + s.Resharding = v + return s +} + // Represents the output of a PurchaseReservedCacheNodesOffering operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ReservedCacheNode type ReservedCacheNode struct { @@ -11025,34 +11520,54 @@ type ReservedCacheNode struct { // The cache node type for the reserved cache nodes. // - // Valid node types are as follows: + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // - // Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, - // cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // Current generation: // - // Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge + // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // - // * Compute optimized: cache.c1.xlarge + // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, + // cache.m4.10xlarge + // + // Previous generation: (not recommended) + // + // T1 node types:cache.t1.micro + // + // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // + // * Compute optimized: + // + // Previous generation: (not recommended) + // + // C1 node types:cache.c1.xlarge // // * Memory optimized: // - // Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // Current generation: + // + // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // - // Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // Previous generation: (not recommended) + // + // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // - // * Redis backup/restore is not supported for Redis (cluster mode disabled) - // T1 and T2 instances. Backup/restore is supported on Redis (cluster mode - // enabled) T2 instances. + // * Redis (cluster mode disabled): Redis backup/restore is not supported + // on T1 and T2 instances. + // + // * Redis (cluster mode enabled): Backup/restore is not supported on T1 + // instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -11183,34 +11698,54 @@ type ReservedCacheNodesOffering struct { // The cache node type for the reserved cache node. // - // Valid node types are as follows: + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // - // Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, - // cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // Current generation: // - // Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge + // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // - // * Compute optimized: cache.c1.xlarge + // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, + // cache.m4.10xlarge + // + // Previous generation: (not recommended) + // + // T1 node types:cache.t1.micro + // + // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // + // * Compute optimized: + // + // Previous generation: (not recommended) + // + // C1 node types:cache.c1.xlarge // // * Memory optimized: // - // Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // Current generation: + // + // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // - // Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // Previous generation: (not recommended) + // + // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // - // * Redis backup/restore is not supported for Redis (cluster mode disabled) - // T1 and T2 instances. Backup/restore is supported on Redis (cluster mode - // enabled) T2 instances. + // * Redis (cluster mode disabled): Redis backup/restore is not supported + // on T1 and T2 instances. + // + // * Redis (cluster mode enabled): Backup/restore is not supported on T1 + // instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -11365,6 +11900,57 @@ func (s *ResetCacheParameterGroupInput) SetResetAllParameters(v bool) *ResetCach return s } +// A list of PreferredAvailabilityZones objects that specifies the configuration +// of a node group in the resharded cluster. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ReshardingConfiguration +type ReshardingConfiguration struct { + _ struct{} `type:"structure"` + + // A list of preferred availability zones for the nodes in this cluster. + PreferredAvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` +} + +// String returns the string representation +func (s ReshardingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReshardingConfiguration) GoString() string { + return s.String() +} + +// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. +func (s *ReshardingConfiguration) SetPreferredAvailabilityZones(v []*string) *ReshardingConfiguration { + s.PreferredAvailabilityZones = v + return s +} + +// The status of an online resharding operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ReshardingStatus +type ReshardingStatus struct { + _ struct{} `type:"structure"` + + // Represents the progress of an online resharding operation. + SlotMigration *SlotMigration `type:"structure"` +} + +// String returns the string representation +func (s ReshardingStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReshardingStatus) GoString() string { + return s.String() +} + +// SetSlotMigration sets the SlotMigration field's value. +func (s *ReshardingStatus) SetSlotMigration(v *SlotMigration) *ReshardingStatus { + s.SlotMigration = v + return s +} + // Represents the input of a RevokeCacheSecurityGroupIngress operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RevokeCacheSecurityGroupIngressMessage type RevokeCacheSecurityGroupIngressInput struct { @@ -11475,7 +12061,7 @@ type SecurityGroupMembership struct { // The status of the cache security group membership. The status changes whenever // a cache security group is modified, or when the cache security groups assigned - // to a cache cluster are modified. + // to a cluster are modified. Status *string `type:"string"` } @@ -11501,8 +12087,33 @@ func (s *SecurityGroupMembership) SetStatus(v string) *SecurityGroupMembership { return s } -// Represents a copy of an entire Redis cache cluster as of the time when the -// snapshot was taken. +// Represents the progress of an online resharding operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/SlotMigration +type SlotMigration struct { + _ struct{} `type:"structure"` + + // The percentage of the slot migration that is complete. + ProgressPercentage *float64 `type:"double"` +} + +// String returns the string representation +func (s SlotMigration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SlotMigration) GoString() string { + return s.String() +} + +// SetProgressPercentage sets the ProgressPercentage field's value. +func (s *SlotMigration) SetProgressPercentage(v float64) *SlotMigration { + s.ProgressPercentage = &v + return s +} + +// Represents a copy of an entire Redis cluster as of the time when the snapshot +// was taken. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/Snapshot type Snapshot struct { _ struct{} `type:"structure"` @@ -11510,54 +12121,75 @@ type Snapshot struct { // This parameter is currently disabled. AutoMinorVersionUpgrade *bool `type:"boolean"` - // Indicates the status of Multi-AZ for the source replication group. + // Indicates the status of Multi-AZ with automatic failover for the source Redis + // replication group. // - // ElastiCache Multi-AZ replication groups are not supported on: + // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover + // on: // - // Redis versions earlier than 2.8.6. + // * Redis versions earlier than 2.8.6. // - // Redis (cluster mode disabled):T1 and T2 cache node types. + // * Redis (cluster mode disabled): T1 and T2 cache node types. // - // Redis (cluster mode enabled): T1 node types. + // * Redis (cluster mode enabled): T1 node types. AutomaticFailover *string `type:"string" enum:"AutomaticFailoverStatus"` - // The date and time when the source cache cluster was created. + // The date and time when the source cluster was created. CacheClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` - // The user-supplied identifier of the source cache cluster. + // The user-supplied identifier of the source cluster. CacheClusterId *string `type:"string"` - // The name of the compute and memory capacity node type for the source cache - // cluster. + // The name of the compute and memory capacity node type for the source cluster. // - // Valid node types are as follows: + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. // // * General purpose: // - // Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, - // cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, - // cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge + // Current generation: // - // Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge + // T2 node types:cache.t2.micro, cache.t2.small, cache.t2.medium // - // * Compute optimized: cache.c1.xlarge + // M3 node types:cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // M4 node types:cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, + // cache.m4.10xlarge + // + // Previous generation: (not recommended) + // + // T1 node types:cache.t1.micro + // + // M1 node types:cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // + // * Compute optimized: + // + // Previous generation: (not recommended) + // + // C1 node types:cache.c1.xlarge // // * Memory optimized: // - // Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // Current generation: + // + // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // - // Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // Previous generation: (not recommended) + // + // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge // // Notes: // // * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon // VPC). // - // * Redis backup/restore is not supported for Redis (cluster mode disabled) - // T1 and T2 instances. Backup/restore is supported on Redis (cluster mode - // enabled) T2 instances. + // * Redis (cluster mode disabled): Redis backup/restore is not supported + // on T1 and T2 instances. + // + // * Redis (cluster mode enabled): Backup/restore is not supported on T1 + // instances. // // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. @@ -11568,24 +12200,22 @@ type Snapshot struct { // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). CacheNodeType *string `type:"string"` - // The cache parameter group that is associated with the source cache cluster. + // The cache parameter group that is associated with the source cluster. CacheParameterGroupName *string `type:"string"` - // The name of the cache subnet group associated with the source cache cluster. + // The name of the cache subnet group associated with the source cluster. CacheSubnetGroupName *string `type:"string"` - // The name of the cache engine (memcached or redis) used by the source cache - // cluster. + // The name of the cache engine (memcached or redis) used by the source cluster. Engine *string `type:"string"` - // The version of the cache engine version that is used by the source cache - // cluster. + // The version of the cache engine version that is used by the source cluster. EngineVersion *string `type:"string"` - // A list of the cache nodes in the source cache cluster. + // A list of the cache nodes in the source cluster. NodeSnapshots []*NodeSnapshot `locationNameList:"NodeSnapshot" type:"list"` - // The number of cache nodes in the source cache cluster. + // The number of cache nodes in the source cluster. // // For clusters running Redis, this value must be 1. For clusters running Memcached, // this value must be between 1 and 20. @@ -11596,10 +12226,10 @@ type Snapshot struct { // restored replication group must be the same. NumNodeGroups *int64 `type:"integer"` - // The port number used by each cache nodes in the source cache cluster. + // The port number used by each cache nodes in the source cluster. Port *int64 `type:"integer"` - // The name of the Availability Zone in which the source cache cluster is located. + // The name of the Availability Zone in which the source cluster is located. PreferredAvailabilityZone *string `type:"string"` // Specifies the weekly time range during which maintenance on the cluster is @@ -11639,7 +12269,7 @@ type Snapshot struct { // the snapshot before deleting it. // // For manual snapshots, this field reflects the SnapshotRetentionLimit for - // the source cache cluster when the snapshot was created. This field is otherwise + // the source cluster when the snapshot was created. This field is otherwise // ignored: Manual snapshots do not expire, and can only be deleted using the // DeleteSnapshot operation. // @@ -11656,15 +12286,15 @@ type Snapshot struct { SnapshotStatus *string `type:"string"` // The daily time range during which ElastiCache takes daily snapshots of the - // source cache cluster. + // source cluster. SnapshotWindow *string `type:"string"` - // The Amazon Resource Name (ARN) for the topic used by the source cache cluster - // for publishing notifications. + // The Amazon Resource Name (ARN) for the topic used by the source cluster for + // publishing notifications. TopicArn *string `type:"string"` // The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet - // group for the source cache cluster. + // group for the source cluster. VpcId *string `type:"string"` } @@ -11822,9 +12452,9 @@ func (s *Snapshot) SetVpcId(v string) *Snapshot { return s } -// Represents the subnet associated with a cache cluster. This parameter refers -// to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used -// with ElastiCache. +// Represents the subnet associated with a cluster. This parameter refers to +// subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with +// ElastiCache. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/Subnet type Subnet struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go index 2322b6b1c..317affdc7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go @@ -22,7 +22,7 @@ // // Using the Client // -// To Amazon ElastiCache with the SDK use the New function to create +// To contact Amazon ElastiCache with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go index 668d6c52b..272ee75b8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go @@ -27,13 +27,13 @@ const ( // ErrCodeCacheClusterAlreadyExistsFault for service response error code // "CacheClusterAlreadyExists". // - // You already have a cache cluster with the given identifier. + // You already have a cluster with the given identifier. ErrCodeCacheClusterAlreadyExistsFault = "CacheClusterAlreadyExists" // ErrCodeCacheClusterNotFoundFault for service response error code // "CacheClusterNotFound". // - // The requested cache cluster ID does not refer to an existing cache cluster. + // The requested cluster ID does not refer to an existing cluster. ErrCodeCacheClusterNotFoundFault = "CacheClusterNotFound" // ErrCodeCacheParameterGroupAlreadyExistsFault for service response error code @@ -114,7 +114,7 @@ const ( // "ClusterQuotaForCustomerExceeded". // // The request cannot be processed because it would exceed the allowed number - // of cache clusters per customer. + // of clusters per customer. ErrCodeClusterQuotaForCustomerExceededFault = "ClusterQuotaForCustomerExceeded" // ErrCodeInsufficientCacheClusterCapacityFault for service response error code @@ -133,7 +133,7 @@ const ( // ErrCodeInvalidCacheClusterStateFault for service response error code // "InvalidCacheClusterState". // - // The requested cache cluster is not in the available state. + // The requested cluster is not in the available state. ErrCodeInvalidCacheClusterStateFault = "InvalidCacheClusterState" // ErrCodeInvalidCacheParameterGroupStateFault for service response error code @@ -197,15 +197,16 @@ const ( // ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault for service response error code // "NodeGroupsPerReplicationGroupQuotaExceeded". // - // The request cannot be processed because it would exceed the maximum of 15 - // node groups (shards) in a single replication group. + // The request cannot be processed because it would exceed the maximum allowed + // number of node groups (shards) in a single replication group. The default + // maximum is 15 ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault = "NodeGroupsPerReplicationGroupQuotaExceeded" // ErrCodeNodeQuotaForClusterExceededFault for service response error code // "NodeQuotaForClusterExceeded". // // The request cannot be processed because it would exceed the allowed number - // of cache nodes in a single cache cluster. + // of cache nodes in a single cluster. ErrCodeNodeQuotaForClusterExceededFault = "NodeQuotaForClusterExceeded" // ErrCodeNodeQuotaForCustomerExceededFault for service response error code @@ -263,11 +264,11 @@ const ( // // You attempted one of the following operations: // - // * Creating a snapshot of a Redis cache cluster running on a cache.t1.micro - // cache node. + // * Creating a snapshot of a Redis cluster running on a cache.t1.micro cache + // node. // - // * Creating a snapshot of a cache cluster that is running Memcached rather - // than Redis. + // * Creating a snapshot of a cluster that is running Memcached rather than + // Redis. // // Neither of these are supported by ElastiCache. ErrCodeSnapshotFeatureNotSupportedFault = "SnapshotFeatureNotSupportedFault" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index 794d3e479..565f5bec9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -2518,6 +2518,96 @@ func (c *ElasticBeanstalk) ListPlatformVersionsWithContext(ctx aws.Context, inpu return out, req.Send() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListTagsForResource +func (c *ElasticBeanstalk) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS Elastic Beanstalk. +// +// Returns the tags applied to an AWS Elastic Beanstalk resource. The response +// contains a list of tag key-value pairs. +// +// Currently, Elastic Beanstalk only supports tagging Elastic Beanstalk environments. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elastic Beanstalk's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" +// The specified account does not have sufficient privileges for one of more +// AWS services. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource doesn't exist for the specified Amazon Resource Name (ARN). +// +// * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" +// The type of the specified Amazon Resource Name (ARN) isn't supported for +// this operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListTagsForResource +func (c *ElasticBeanstalk) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// 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 *ElasticBeanstalk) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRebuildEnvironment = "RebuildEnvironment" // RebuildEnvironmentRequest generates a "aws/request.Request" representing the @@ -3420,6 +3510,109 @@ func (c *ElasticBeanstalk) UpdateEnvironmentWithContext(ctx aws.Context, input * return out, req.Send() } +const opUpdateTagsForResource = "UpdateTagsForResource" + +// UpdateTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTagsForResource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTagsForResource for more information on using the UpdateTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTagsForResourceRequest method. +// req, resp := client.UpdateTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateTagsForResource +func (c *ElasticBeanstalk) UpdateTagsForResourceRequest(input *UpdateTagsForResourceInput) (req *request.Request, output *UpdateTagsForResourceOutput) { + op := &request.Operation{ + Name: opUpdateTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTagsForResourceInput{} + } + + output = &UpdateTagsForResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateTagsForResource API operation for AWS Elastic Beanstalk. +// +// Update the list of tags applied to an AWS Elastic Beanstalk resource. Two +// lists can be passed: TagsToAdd for tags to add or update, and TagsToRemove. +// +// Currently, Elastic Beanstalk only supports tagging of Elastic Beanstalk environments. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elastic Beanstalk's +// API operation UpdateTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" +// The specified account does not have sufficient privileges for one of more +// AWS services. +// +// * ErrCodeOperationInProgressException "OperationInProgressFailure" +// Unable to perform the specified operation because another operation that +// effects an element in this activity is already in progress. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// The number of tags in the resource would exceed the number of tags that each +// resource can have. +// +// To calculate this, the operation considers both the number of tags the resource +// already has and the tags this operation would add if it succeeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource doesn't exist for the specified Amazon Resource Name (ARN). +// +// * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" +// The type of the specified Amazon Resource Name (ARN) isn't supported for +// this operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateTagsForResource +func (c *ElasticBeanstalk) UpdateTagsForResource(input *UpdateTagsForResourceInput) (*UpdateTagsForResourceOutput, error) { + req, out := c.UpdateTagsForResourceRequest(input) + return out, req.Send() +} + +// UpdateTagsForResourceWithContext is the same as UpdateTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTagsForResource for details on how to use this API operation. +// +// 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 *ElasticBeanstalk) UpdateTagsForResourceWithContext(ctx aws.Context, input *UpdateTagsForResourceInput, opts ...request.Option) (*UpdateTagsForResourceOutput, error) { + req, out := c.UpdateTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opValidateConfigurationSettings = "ValidateConfigurationSettings" // ValidateConfigurationSettingsRequest generates a "aws/request.Request" representing the @@ -8290,6 +8483,80 @@ func (s *ListPlatformVersionsOutput) SetPlatformSummaryList(v []*PlatformSummary return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListTagsForResourceMessage +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resouce for which a tag list is requested. + // + // Must be the ARN of an Elastic Beanstalk environment. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ResourceTagsDescriptionMessage +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resouce for which a tag list was requested. + ResourceArn *string `type:"string"` + + // A list of tag key-value pairs. + ResourceTags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceOutput) SetResourceArn(v string) *ListTagsForResourceOutput { + s.ResourceArn = &v + return s +} + +// SetResourceTags sets the ResourceTags field's value. +func (s *ListTagsForResourceOutput) SetResourceTags(v []*Tag) *ListTagsForResourceOutput { + s.ResourceTags = v + return s +} + // Describes the properties of a Listener for the LoadBalancer. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/Listener type Listener struct { @@ -10710,6 +10977,94 @@ func (s *UpdateEnvironmentInput) SetVersionLabel(v string) *UpdateEnvironmentInp return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateTagsForResourceMessage +type UpdateTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resouce to be updated. + // + // Must be the ARN of an Elastic Beanstalk environment. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // A list of tags to add or update. + // + // If a key of an existing tag is added, the tag's value is updated. + TagsToAdd []*Tag `type:"list"` + + // A list of tag keys to remove. + // + // If a tag key doesn't exist, it is silently ignored. + TagsToRemove []*string `type:"list"` +} + +// String returns the string representation +func (s UpdateTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagsToAdd != nil { + for i, v := range s.TagsToAdd { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsToAdd", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UpdateTagsForResourceInput) SetResourceArn(v string) *UpdateTagsForResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagsToAdd sets the TagsToAdd field's value. +func (s *UpdateTagsForResourceInput) SetTagsToAdd(v []*Tag) *UpdateTagsForResourceInput { + s.TagsToAdd = v + return s +} + +// SetTagsToRemove sets the TagsToRemove field's value. +func (s *UpdateTagsForResourceInput) SetTagsToRemove(v []*string) *UpdateTagsForResourceInput { + s.TagsToRemove = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateTagsForResourceOutput +type UpdateTagsForResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTagsForResourceOutput) GoString() string { + return s.String() +} + // A list of validation messages for a specified configuration template. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ValidateConfigurationSettingsMessage type ValidateConfigurationSettingsInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go index bd56e5c4f..cab013a58 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go @@ -28,7 +28,7 @@ // // Using the Client // -// To AWS Elastic Beanstalk with the SDK use the New function to create +// To contact AWS Elastic Beanstalk with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go index 0ed1bd633..6373e870a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go @@ -44,6 +44,19 @@ const ( // running on it. ErrCodePlatformVersionStillReferencedException = "PlatformVersionStillReferencedException" + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // A resource doesn't exist for the specified Amazon Resource Name (ARN). + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeResourceTypeNotSupportedException for service response error code + // "ResourceTypeNotSupportedException". + // + // The type of the specified Amazon Resource Name (ARN) isn't supported for + // this operation. + ErrCodeResourceTypeNotSupportedException = "ResourceTypeNotSupportedException" + // ErrCodeS3LocationNotInServiceRegionException for service response error code // "S3LocationNotInServiceRegionException". // @@ -112,4 +125,14 @@ const ( // You have exceeded the maximum number of allowed platforms associated with // the account. ErrCodeTooManyPlatformsException = "TooManyPlatformsException" + + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + // + // The number of tags in the resource would exceed the number of tags that each + // resource can have. + // + // To calculate this, the operation considers both the number of tags the resource + // already has and the tags this operation would add if it succeeded. + ErrCodeTooManyTagsException = "TooManyTagsException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index 104c424b6..2ca61fa43 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -37,8 +37,6 @@ const opAddTags = "AddTags" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/AddTags func (c *ElasticsearchService) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { op := &request.Operation{ Name: opAddTags, @@ -87,7 +85,6 @@ func (c *ElasticsearchService) AddTagsRequest(input *AddTagsInput) (req *request // or failure (the failure is internal to the service) . Gives http status code // of 500. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/AddTags func (c *ElasticsearchService) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { req, out := c.AddTagsRequest(input) return out, req.Send() @@ -133,8 +130,6 @@ const opCreateElasticsearchDomain = "CreateElasticsearchDomain" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/CreateElasticsearchDomain func (c *ElasticsearchService) CreateElasticsearchDomainRequest(input *CreateElasticsearchDomainInput) (req *request.Request, output *CreateElasticsearchDomainOutput) { op := &request.Operation{ Name: opCreateElasticsearchDomain, @@ -193,7 +188,6 @@ func (c *ElasticsearchService) CreateElasticsearchDomainRequest(input *CreateEla // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/CreateElasticsearchDomain func (c *ElasticsearchService) CreateElasticsearchDomain(input *CreateElasticsearchDomainInput) (*CreateElasticsearchDomainOutput, error) { req, out := c.CreateElasticsearchDomainRequest(input) return out, req.Send() @@ -239,8 +233,6 @@ const opDeleteElasticsearchDomain = "DeleteElasticsearchDomain" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DeleteElasticsearchDomain func (c *ElasticsearchService) DeleteElasticsearchDomainRequest(input *DeleteElasticsearchDomainInput) (req *request.Request, output *DeleteElasticsearchDomainOutput) { op := &request.Operation{ Name: opDeleteElasticsearchDomain, @@ -286,7 +278,6 @@ func (c *ElasticsearchService) DeleteElasticsearchDomainRequest(input *DeleteEla // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DeleteElasticsearchDomain func (c *ElasticsearchService) DeleteElasticsearchDomain(input *DeleteElasticsearchDomainInput) (*DeleteElasticsearchDomainOutput, error) { req, out := c.DeleteElasticsearchDomainRequest(input) return out, req.Send() @@ -308,6 +299,97 @@ func (c *ElasticsearchService) DeleteElasticsearchDomainWithContext(ctx aws.Cont return out, req.Send() } +const opDeleteElasticsearchServiceRole = "DeleteElasticsearchServiceRole" + +// DeleteElasticsearchServiceRoleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteElasticsearchServiceRole operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteElasticsearchServiceRole for more information on using the DeleteElasticsearchServiceRole +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteElasticsearchServiceRoleRequest method. +// req, resp := client.DeleteElasticsearchServiceRoleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) DeleteElasticsearchServiceRoleRequest(input *DeleteElasticsearchServiceRoleInput) (req *request.Request, output *DeleteElasticsearchServiceRoleOutput) { + op := &request.Operation{ + Name: opDeleteElasticsearchServiceRole, + HTTPMethod: "DELETE", + HTTPPath: "/2015-01-01/es/role", + } + + if input == nil { + input = &DeleteElasticsearchServiceRoleInput{} + } + + output = &DeleteElasticsearchServiceRoleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteElasticsearchServiceRole API operation for Amazon Elasticsearch Service. +// +// Deletes the service-linked role that Elasticsearch Service uses to manage +// and maintain VPC domains. Role deletion will fail if any existing VPC domains +// use the role. You must delete any such Elasticsearch domains before deleting +// the role. See Deleting Elasticsearch Service Role (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-enabling-slr) +// in VPC Endpoints for Amazon Elasticsearch Service Domains. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation DeleteElasticsearchServiceRole for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +func (c *ElasticsearchService) DeleteElasticsearchServiceRole(input *DeleteElasticsearchServiceRoleInput) (*DeleteElasticsearchServiceRoleOutput, error) { + req, out := c.DeleteElasticsearchServiceRoleRequest(input) + return out, req.Send() +} + +// DeleteElasticsearchServiceRoleWithContext is the same as DeleteElasticsearchServiceRole with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteElasticsearchServiceRole for details on how to use this API operation. +// +// 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 *ElasticsearchService) DeleteElasticsearchServiceRoleWithContext(ctx aws.Context, input *DeleteElasticsearchServiceRoleInput, opts ...request.Option) (*DeleteElasticsearchServiceRoleOutput, error) { + req, out := c.DeleteElasticsearchServiceRoleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeElasticsearchDomain = "DescribeElasticsearchDomain" // DescribeElasticsearchDomainRequest generates a "aws/request.Request" representing the @@ -332,8 +414,6 @@ const opDescribeElasticsearchDomain = "DescribeElasticsearchDomain" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomain func (c *ElasticsearchService) DescribeElasticsearchDomainRequest(input *DescribeElasticsearchDomainInput) (req *request.Request, output *DescribeElasticsearchDomainOutput) { op := &request.Operation{ Name: opDescribeElasticsearchDomain, @@ -379,7 +459,6 @@ func (c *ElasticsearchService) DescribeElasticsearchDomainRequest(input *Describ // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomain func (c *ElasticsearchService) DescribeElasticsearchDomain(input *DescribeElasticsearchDomainInput) (*DescribeElasticsearchDomainOutput, error) { req, out := c.DescribeElasticsearchDomainRequest(input) return out, req.Send() @@ -425,8 +504,6 @@ const opDescribeElasticsearchDomainConfig = "DescribeElasticsearchDomainConfig" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomainConfig func (c *ElasticsearchService) DescribeElasticsearchDomainConfigRequest(input *DescribeElasticsearchDomainConfigInput) (req *request.Request, output *DescribeElasticsearchDomainConfigOutput) { op := &request.Operation{ Name: opDescribeElasticsearchDomainConfig, @@ -473,7 +550,6 @@ func (c *ElasticsearchService) DescribeElasticsearchDomainConfigRequest(input *D // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomainConfig func (c *ElasticsearchService) DescribeElasticsearchDomainConfig(input *DescribeElasticsearchDomainConfigInput) (*DescribeElasticsearchDomainConfigOutput, error) { req, out := c.DescribeElasticsearchDomainConfigRequest(input) return out, req.Send() @@ -519,8 +595,6 @@ const opDescribeElasticsearchDomains = "DescribeElasticsearchDomains" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomains func (c *ElasticsearchService) DescribeElasticsearchDomainsRequest(input *DescribeElasticsearchDomainsInput) (req *request.Request, output *DescribeElasticsearchDomainsOutput) { op := &request.Operation{ Name: opDescribeElasticsearchDomains, @@ -562,7 +636,6 @@ func (c *ElasticsearchService) DescribeElasticsearchDomainsRequest(input *Descri // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomains func (c *ElasticsearchService) DescribeElasticsearchDomains(input *DescribeElasticsearchDomainsInput) (*DescribeElasticsearchDomainsOutput, error) { req, out := c.DescribeElasticsearchDomainsRequest(input) return out, req.Send() @@ -608,8 +681,6 @@ const opDescribeElasticsearchInstanceTypeLimits = "DescribeElasticsearchInstance // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchInstanceTypeLimits func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimitsRequest(input *DescribeElasticsearchInstanceTypeLimitsInput) (req *request.Request, output *DescribeElasticsearchInstanceTypeLimitsOutput) { op := &request.Operation{ Name: opDescribeElasticsearchInstanceTypeLimits, @@ -664,7 +735,6 @@ func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimitsRequest(in // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchInstanceTypeLimits func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimits(input *DescribeElasticsearchInstanceTypeLimitsInput) (*DescribeElasticsearchInstanceTypeLimitsOutput, error) { req, out := c.DescribeElasticsearchInstanceTypeLimitsRequest(input) return out, req.Send() @@ -710,8 +780,6 @@ const opListDomainNames = "ListDomainNames" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListDomainNames func (c *ElasticsearchService) ListDomainNamesRequest(input *ListDomainNamesInput) (req *request.Request, output *ListDomainNamesOutput) { op := &request.Operation{ Name: opListDomainNames, @@ -748,7 +816,6 @@ func (c *ElasticsearchService) ListDomainNamesRequest(input *ListDomainNamesInpu // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListDomainNames func (c *ElasticsearchService) ListDomainNames(input *ListDomainNamesInput) (*ListDomainNamesOutput, error) { req, out := c.ListDomainNamesRequest(input) return out, req.Send() @@ -794,8 +861,6 @@ const opListElasticsearchInstanceTypes = "ListElasticsearchInstanceTypes" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListElasticsearchInstanceTypes func (c *ElasticsearchService) ListElasticsearchInstanceTypesRequest(input *ListElasticsearchInstanceTypesInput) (req *request.Request, output *ListElasticsearchInstanceTypesOutput) { op := &request.Operation{ Name: opListElasticsearchInstanceTypes, @@ -846,7 +911,6 @@ func (c *ElasticsearchService) ListElasticsearchInstanceTypesRequest(input *List // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListElasticsearchInstanceTypes func (c *ElasticsearchService) ListElasticsearchInstanceTypes(input *ListElasticsearchInstanceTypesInput) (*ListElasticsearchInstanceTypesOutput, error) { req, out := c.ListElasticsearchInstanceTypesRequest(input) return out, req.Send() @@ -942,8 +1006,6 @@ const opListElasticsearchVersions = "ListElasticsearchVersions" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListElasticsearchVersions func (c *ElasticsearchService) ListElasticsearchVersionsRequest(input *ListElasticsearchVersionsInput) (req *request.Request, output *ListElasticsearchVersionsOutput) { op := &request.Operation{ Name: opListElasticsearchVersions, @@ -994,7 +1056,6 @@ func (c *ElasticsearchService) ListElasticsearchVersionsRequest(input *ListElast // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListElasticsearchVersions func (c *ElasticsearchService) ListElasticsearchVersions(input *ListElasticsearchVersionsInput) (*ListElasticsearchVersionsOutput, error) { req, out := c.ListElasticsearchVersionsRequest(input) return out, req.Send() @@ -1090,8 +1151,6 @@ const opListTags = "ListTags" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListTags func (c *ElasticsearchService) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { op := &request.Operation{ Name: opListTags, @@ -1136,7 +1195,6 @@ func (c *ElasticsearchService) ListTagsRequest(input *ListTagsInput) (req *reque // or failure (the failure is internal to the service) . Gives http status code // of 500. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListTags func (c *ElasticsearchService) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { req, out := c.ListTagsRequest(input) return out, req.Send() @@ -1182,8 +1240,6 @@ const opRemoveTags = "RemoveTags" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/RemoveTags func (c *ElasticsearchService) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { op := &request.Operation{ Name: opRemoveTags, @@ -1226,7 +1282,6 @@ func (c *ElasticsearchService) RemoveTagsRequest(input *RemoveTagsInput) (req *r // or failure (the failure is internal to the service) . Gives http status code // of 500. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/RemoveTags func (c *ElasticsearchService) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { req, out := c.RemoveTagsRequest(input) return out, req.Send() @@ -1272,8 +1327,6 @@ const opUpdateElasticsearchDomainConfig = "UpdateElasticsearchDomainConfig" // if err == nil { // resp is now filled // fmt.Println(resp) // } -// -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/UpdateElasticsearchDomainConfig func (c *ElasticsearchService) UpdateElasticsearchDomainConfigRequest(input *UpdateElasticsearchDomainConfigInput) (req *request.Request, output *UpdateElasticsearchDomainConfigOutput) { op := &request.Operation{ Name: opUpdateElasticsearchDomainConfig, @@ -1327,7 +1380,6 @@ func (c *ElasticsearchService) UpdateElasticsearchDomainConfigRequest(input *Upd // An exception for missing / invalid input fields. Gives http status code of // 400. // -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/UpdateElasticsearchDomainConfig func (c *ElasticsearchService) UpdateElasticsearchDomainConfig(input *UpdateElasticsearchDomainConfigInput) (*UpdateElasticsearchDomainConfigOutput, error) { req, out := c.UpdateElasticsearchDomainConfigRequest(input) return out, req.Send() @@ -1351,7 +1403,6 @@ func (c *ElasticsearchService) UpdateElasticsearchDomainConfigWithContext(ctx aw // The configured access rules for the domain's document and search endpoints, // and the current status of those rules. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/AccessPoliciesStatus type AccessPoliciesStatus struct { _ struct{} `type:"structure"` @@ -1394,7 +1445,6 @@ func (s *AccessPoliciesStatus) SetStatus(v *OptionStatus) *AccessPoliciesStatus // Container for the parameters to the AddTags operation. Specify the tags that // you want to attach to the Elasticsearch domain. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/AddTagsRequest type AddTagsInput struct { _ struct{} `type:"structure"` @@ -1457,7 +1507,6 @@ func (s *AddTagsInput) SetTagList(v []*Tag) *AddTagsInput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/AddTagsOutput type AddTagsOutput struct { _ struct{} `type:"structure"` } @@ -1474,7 +1523,6 @@ func (s AddTagsOutput) GoString() string { // List of limits that are specific to a given InstanceType and for each of // it's InstanceRole . -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/AdditionalLimit type AdditionalLimit struct { _ struct{} `type:"structure"` @@ -1522,7 +1570,6 @@ func (s *AdditionalLimit) SetLimitValues(v []*string) *AdditionalLimit { // * Option to specify the percentage of heap space that is allocated to // field data. By default, this setting is unbounded. // For more information, see Configuring Advanced Options (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options). -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/AdvancedOptionsStatus type AdvancedOptionsStatus struct { _ struct{} `type:"structure"` @@ -1561,7 +1608,6 @@ func (s *AdvancedOptionsStatus) SetStatus(v *OptionStatus) *AdvancedOptionsStatu return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/CreateElasticsearchDomainRequest type CreateElasticsearchDomainInput struct { _ struct{} `type:"structure"` @@ -1595,9 +1641,18 @@ type CreateElasticsearchDomainInput struct { // in the Amazon Elasticsearch Service Developer Guide. ElasticsearchVersion *string `type:"string"` + // Map of LogType and LogPublishingOption, each containing options to publish + // a given type of Elasticsearch log. + LogPublishingOptions map[string]*LogPublishingOption `type:"map"` + // Option to set time, in UTC format, of the daily automated snapshot. Default // value is 0 hours. SnapshotOptions *SnapshotOptions `type:"structure"` + + // Options to specify the subnets and security groups for VPC endpoint. For + // more information, see Creating a VPC (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc) + // in VPC Endpoints for Amazon Elasticsearch Service Domains + VPCOptions *VPCOptions `type:"structure"` } // String returns the string representation @@ -1662,15 +1717,26 @@ func (s *CreateElasticsearchDomainInput) SetElasticsearchVersion(v string) *Crea return s } +// SetLogPublishingOptions sets the LogPublishingOptions field's value. +func (s *CreateElasticsearchDomainInput) SetLogPublishingOptions(v map[string]*LogPublishingOption) *CreateElasticsearchDomainInput { + s.LogPublishingOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *CreateElasticsearchDomainInput) SetSnapshotOptions(v *SnapshotOptions) *CreateElasticsearchDomainInput { s.SnapshotOptions = v return s } +// SetVPCOptions sets the VPCOptions field's value. +func (s *CreateElasticsearchDomainInput) SetVPCOptions(v *VPCOptions) *CreateElasticsearchDomainInput { + s.VPCOptions = v + return s +} + // The result of a CreateElasticsearchDomain operation. Contains the status // of the newly created Elasticsearch domain. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/CreateElasticsearchDomainResponse type CreateElasticsearchDomainOutput struct { _ struct{} `type:"structure"` @@ -1696,7 +1762,6 @@ func (s *CreateElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomain // Container for the parameters to the DeleteElasticsearchDomain operation. // Specifies the name of the Elasticsearch domain that you want to delete. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DeleteElasticsearchDomainRequest type DeleteElasticsearchDomainInput struct { _ struct{} `type:"structure"` @@ -1741,7 +1806,6 @@ func (s *DeleteElasticsearchDomainInput) SetDomainName(v string) *DeleteElastics // The result of a DeleteElasticsearchDomain request. Contains the status of // the pending deletion, or no status if the domain and all of its resources // have been deleted. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DeleteElasticsearchDomainResponse type DeleteElasticsearchDomainOutput struct { _ struct{} `type:"structure"` @@ -1765,9 +1829,36 @@ func (s *DeleteElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomain return s } +type DeleteElasticsearchServiceRoleInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteElasticsearchServiceRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteElasticsearchServiceRoleInput) GoString() string { + return s.String() +} + +type DeleteElasticsearchServiceRoleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteElasticsearchServiceRoleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteElasticsearchServiceRoleOutput) GoString() string { + return s.String() +} + // Container for the parameters to the DescribeElasticsearchDomainConfig operation. // Specifies the domain name for which you want configuration information. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomainConfigRequest type DescribeElasticsearchDomainConfigInput struct { _ struct{} `type:"structure"` @@ -1811,7 +1902,6 @@ func (s *DescribeElasticsearchDomainConfigInput) SetDomainName(v string) *Descri // The result of a DescribeElasticsearchDomainConfig request. Contains the configuration // information of the requested domain. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomainConfigResponse type DescribeElasticsearchDomainConfigOutput struct { _ struct{} `type:"structure"` @@ -1839,7 +1929,6 @@ func (s *DescribeElasticsearchDomainConfigOutput) SetDomainConfig(v *Elasticsear } // Container for the parameters to the DescribeElasticsearchDomain operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomainRequest type DescribeElasticsearchDomainInput struct { _ struct{} `type:"structure"` @@ -1883,7 +1972,6 @@ func (s *DescribeElasticsearchDomainInput) SetDomainName(v string) *DescribeElas // The result of a DescribeElasticsearchDomain request. Contains the status // of the domain specified in the request. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomainResponse type DescribeElasticsearchDomainOutput struct { _ struct{} `type:"structure"` @@ -1911,7 +1999,6 @@ func (s *DescribeElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDoma // Container for the parameters to the DescribeElasticsearchDomains operation. // By default, the API returns the status of all Elasticsearch domains. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomainsRequest type DescribeElasticsearchDomainsInput struct { _ struct{} `type:"structure"` @@ -1952,7 +2039,6 @@ func (s *DescribeElasticsearchDomainsInput) SetDomainNames(v []*string) *Describ // The result of a DescribeElasticsearchDomains request. Contains the status // of the specified domains or all domains owned by the account. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchDomainsResponse type DescribeElasticsearchDomainsOutput struct { _ struct{} `type:"structure"` @@ -1979,7 +2065,6 @@ func (s *DescribeElasticsearchDomainsOutput) SetDomainStatusList(v []*Elasticsea } // Container for the parameters to DescribeElasticsearchInstanceTypeLimits operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchInstanceTypeLimitsRequest type DescribeElasticsearchInstanceTypeLimitsInput struct { _ struct{} `type:"structure"` @@ -2049,7 +2134,6 @@ func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetInstanceType(v string) // Container for the parameters received from DescribeElasticsearchInstanceTypeLimits // operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DescribeElasticsearchInstanceTypeLimitsResponse type DescribeElasticsearchInstanceTypeLimitsOutput struct { _ struct{} `type:"structure"` @@ -2076,7 +2160,6 @@ func (s *DescribeElasticsearchInstanceTypeLimitsOutput) SetLimitsByRole(v map[st return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/DomainInfo type DomainInfo struct { _ struct{} `type:"structure"` @@ -2102,7 +2185,6 @@ func (s *DomainInfo) SetDomainName(v string) *DomainInfo { // Options to enable, disable, and specify the properties of EBS storage volumes. // For more information, see Configuring EBS-based Storage (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs). -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/EBSOptions type EBSOptions struct { _ struct{} `type:"structure"` @@ -2154,7 +2236,6 @@ func (s *EBSOptions) SetVolumeType(v string) *EBSOptions { } // Status of the EBS options for the specified Elasticsearch domain. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/EBSOptionsStatus type EBSOptionsStatus struct { _ struct{} `type:"structure"` @@ -2193,7 +2274,6 @@ func (s *EBSOptionsStatus) SetStatus(v *OptionStatus) *EBSOptionsStatus { // Specifies the configuration for the domain cluster, such as the type and // number of instances. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ElasticsearchClusterConfig type ElasticsearchClusterConfig struct { _ struct{} `type:"structure"` @@ -2267,7 +2347,6 @@ func (s *ElasticsearchClusterConfig) SetZoneAwarenessEnabled(v bool) *Elasticsea } // Specifies the configuration status for the specified Elasticsearch domain. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ElasticsearchClusterConfigStatus type ElasticsearchClusterConfigStatus struct { _ struct{} `type:"structure"` @@ -2306,7 +2385,6 @@ func (s *ElasticsearchClusterConfigStatus) SetStatus(v *OptionStatus) *Elasticse } // The configuration of an Elasticsearch domain. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ElasticsearchDomainConfig type ElasticsearchDomainConfig struct { _ struct{} `type:"structure"` @@ -2327,8 +2405,15 @@ type ElasticsearchDomainConfig struct { // String of format X.Y to specify version for the Elasticsearch domain. ElasticsearchVersion *ElasticsearchVersionStatus `type:"structure"` + // Log publishing options for the given domain. + LogPublishingOptions *LogPublishingOptionsStatus `type:"structure"` + // Specifies the SnapshotOptions for the Elasticsearch domain. SnapshotOptions *SnapshotOptionsStatus `type:"structure"` + + // The VPCOptions for the specified domain. For more information, see VPC Endpoints + // for Amazon Elasticsearch Service Domains (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). + VPCOptions *VPCDerivedInfoStatus `type:"structure"` } // String returns the string representation @@ -2371,14 +2456,25 @@ func (s *ElasticsearchDomainConfig) SetElasticsearchVersion(v *ElasticsearchVers return s } +// SetLogPublishingOptions sets the LogPublishingOptions field's value. +func (s *ElasticsearchDomainConfig) SetLogPublishingOptions(v *LogPublishingOptionsStatus) *ElasticsearchDomainConfig { + s.LogPublishingOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *ElasticsearchDomainConfig) SetSnapshotOptions(v *SnapshotOptionsStatus) *ElasticsearchDomainConfig { s.SnapshotOptions = v return s } +// SetVPCOptions sets the VPCOptions field's value. +func (s *ElasticsearchDomainConfig) SetVPCOptions(v *VPCDerivedInfoStatus) *ElasticsearchDomainConfig { + s.VPCOptions = v + return s +} + // The current status of an Elasticsearch domain. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ElasticsearchDomainStatus type ElasticsearchDomainStatus struct { _ struct{} `type:"structure"` @@ -2434,6 +2530,13 @@ type ElasticsearchDomainStatus struct { // requests. Endpoint *string `type:"string"` + // Map containing the Elasticsearch domain endpoints used to submit index and + // search requests. Example key, value: 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'. + Endpoints map[string]*string `type:"map"` + + // Log publishing options for the given domain. + LogPublishingOptions map[string]*LogPublishingOption `type:"map"` + // The status of the Elasticsearch domain configuration. True if Amazon Elasticsearch // Service is processing configuration changes. False if the configuration is // active. @@ -2441,6 +2544,10 @@ type ElasticsearchDomainStatus struct { // Specifies the status of the SnapshotOptions SnapshotOptions *SnapshotOptions `type:"structure"` + + // The VPCOptions for the specified domain. For more information, see VPC Endpoints + // for Amazon Elasticsearch Service Domains (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). + VPCOptions *VPCDerivedInfo `type:"structure"` } // String returns the string representation @@ -2519,6 +2626,18 @@ func (s *ElasticsearchDomainStatus) SetEndpoint(v string) *ElasticsearchDomainSt return s } +// SetEndpoints sets the Endpoints field's value. +func (s *ElasticsearchDomainStatus) SetEndpoints(v map[string]*string) *ElasticsearchDomainStatus { + s.Endpoints = v + return s +} + +// SetLogPublishingOptions sets the LogPublishingOptions field's value. +func (s *ElasticsearchDomainStatus) SetLogPublishingOptions(v map[string]*LogPublishingOption) *ElasticsearchDomainStatus { + s.LogPublishingOptions = v + return s +} + // SetProcessing sets the Processing field's value. func (s *ElasticsearchDomainStatus) SetProcessing(v bool) *ElasticsearchDomainStatus { s.Processing = &v @@ -2531,9 +2650,14 @@ func (s *ElasticsearchDomainStatus) SetSnapshotOptions(v *SnapshotOptions) *Elas return s } +// SetVPCOptions sets the VPCOptions field's value. +func (s *ElasticsearchDomainStatus) SetVPCOptions(v *VPCDerivedInfo) *ElasticsearchDomainStatus { + s.VPCOptions = v + return s +} + // Status of the Elasticsearch version options for the specified Elasticsearch // domain. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ElasticsearchVersionStatus type ElasticsearchVersionStatus struct { _ struct{} `type:"structure"` @@ -2573,7 +2697,6 @@ func (s *ElasticsearchVersionStatus) SetStatus(v *OptionStatus) *ElasticsearchVe // InstanceCountLimits represents the limits on number of instances that be // created in Amazon Elasticsearch for given InstanceType. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/InstanceCountLimits type InstanceCountLimits struct { _ struct{} `type:"structure"` @@ -2608,7 +2731,6 @@ func (s *InstanceCountLimits) SetMinimumInstanceCount(v int64) *InstanceCountLim // InstanceLimits represents the list of instance related attributes that are // available for given InstanceType. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/InstanceLimits type InstanceLimits struct { _ struct{} `type:"structure"` @@ -2634,7 +2756,6 @@ func (s *InstanceLimits) SetInstanceCountLimits(v *InstanceCountLimits) *Instanc } // Limits for given InstanceType and for each of it's role. Limits contains following StorageTypes, InstanceLimitsand AdditionalLimits -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/Limits type Limits struct { _ struct{} `type:"structure"` @@ -2679,7 +2800,6 @@ func (s *Limits) SetStorageTypes(v []*StorageType) *Limits { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListDomainNamesInput type ListDomainNamesInput struct { _ struct{} `type:"structure"` } @@ -2696,7 +2816,6 @@ func (s ListDomainNamesInput) GoString() string { // The result of a ListDomainNames operation. Contains the names of all Elasticsearch // domains owned by this account. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListDomainNamesResponse type ListDomainNamesOutput struct { _ struct{} `type:"structure"` @@ -2721,7 +2840,6 @@ func (s *ListDomainNamesOutput) SetDomainNames(v []*DomainInfo) *ListDomainNames } // Container for the parameters to the ListElasticsearchInstanceTypes operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListElasticsearchInstanceTypesRequest type ListElasticsearchInstanceTypesInput struct { _ struct{} `type:"structure"` @@ -2796,7 +2914,6 @@ func (s *ListElasticsearchInstanceTypesInput) SetNextToken(v string) *ListElasti } // Container for the parameters returned by ListElasticsearchInstanceTypes operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListElasticsearchInstanceTypesResponse type ListElasticsearchInstanceTypesOutput struct { _ struct{} `type:"structure"` @@ -2838,7 +2955,6 @@ func (s *ListElasticsearchInstanceTypesOutput) SetNextToken(v string) *ListElast // // Use NextToken in response to retrieve more results. If the received response // does not contain a NextToken, then there are no more results to retrieve. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListElasticsearchVersionsRequest type ListElasticsearchVersionsInput struct { _ struct{} `type:"structure"` @@ -2876,7 +2992,6 @@ func (s *ListElasticsearchVersionsInput) SetNextToken(v string) *ListElasticsear // Container for the parameters for response received from ListElasticsearchVersions // operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListElasticsearchVersionsResponse type ListElasticsearchVersionsOutput struct { _ struct{} `type:"structure"` @@ -2914,7 +3029,6 @@ func (s *ListElasticsearchVersionsOutput) SetNextToken(v string) *ListElasticsea // Container for the parameters to the ListTags operation. Specify the ARN for // the Elasticsearch domain to which the tags are attached that you want to // view are attached. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListTagsRequest type ListTagsInput struct { _ struct{} `type:"structure"` @@ -2956,7 +3070,6 @@ func (s *ListTagsInput) SetARN(v string) *ListTagsInput { // The result of a ListTags operation. Contains tags for all requested Elasticsearch // domains. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/ListTagsResponse type ListTagsOutput struct { _ struct{} `type:"structure"` @@ -2980,8 +3093,76 @@ func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput { return s } +// Log Publishing option that is set for given domain. Attributes and their details: CloudWatchLogsLogGroupArn: ARN of the Cloudwatch +// log group to which log needs to be published. +// Enabled: Whether the log publishing for given log type is enabled or not +type LogPublishingOption struct { + _ struct{} `type:"structure"` + + // ARN of the Cloudwatch log group to which log needs to be published. + CloudWatchLogsLogGroupArn *string `type:"string"` + + // Specifies whether given log publishing option is enabled or not. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s LogPublishingOption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogPublishingOption) GoString() string { + return s.String() +} + +// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. +func (s *LogPublishingOption) SetCloudWatchLogsLogGroupArn(v string) *LogPublishingOption { + s.CloudWatchLogsLogGroupArn = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *LogPublishingOption) SetEnabled(v bool) *LogPublishingOption { + s.Enabled = &v + return s +} + +// The configured log publishing options for the domain and their current status. +type LogPublishingOptionsStatus struct { + _ struct{} `type:"structure"` + + // The log publishing options configured for the Elasticsearch domain. + Options map[string]*LogPublishingOption `type:"map"` + + // The status of the log publishing options for the Elasticsearch domain. See + // OptionStatus for the status information that's included. + Status *OptionStatus `type:"structure"` +} + +// String returns the string representation +func (s LogPublishingOptionsStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogPublishingOptionsStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *LogPublishingOptionsStatus) SetOptions(v map[string]*LogPublishingOption) *LogPublishingOptionsStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *LogPublishingOptionsStatus) SetStatus(v *OptionStatus) *LogPublishingOptionsStatus { + s.Status = v + return s +} + // Provides the current status of the entity. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/OptionStatus type OptionStatus struct { _ struct{} `type:"structure"` @@ -3050,7 +3231,6 @@ func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus { // Container for the parameters to the RemoveTags operation. Specify the ARN // for the Elasticsearch domain from which you want to remove the specified // TagKey. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/RemoveTagsRequest type RemoveTagsInput struct { _ struct{} `type:"structure"` @@ -3105,7 +3285,6 @@ func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/RemoveTagsOutput type RemoveTagsOutput struct { _ struct{} `type:"structure"` } @@ -3122,7 +3301,6 @@ func (s RemoveTagsOutput) GoString() string { // Specifies the time, in UTC format, when the service takes a daily automated // snapshot of the specified Elasticsearch domain. Default value is 0 hours. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/SnapshotOptions type SnapshotOptions struct { _ struct{} `type:"structure"` @@ -3148,7 +3326,6 @@ func (s *SnapshotOptions) SetAutomatedSnapshotStartHour(v int64) *SnapshotOption } // Status of a daily automated snapshot. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/SnapshotOptionsStatus type SnapshotOptionsStatus struct { _ struct{} `type:"structure"` @@ -3187,7 +3364,6 @@ func (s *SnapshotOptionsStatus) SetStatus(v *OptionStatus) *SnapshotOptionsStatu // StorageTypes represents the list of storage related types and their attributes // that are available for given InstanceType. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/StorageType type StorageType struct { _ struct{} `type:"structure"` @@ -3237,7 +3413,6 @@ func (s *StorageType) SetStorageTypeName(v string) *StorageType { } // Limits that are applicable for given storage type. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/StorageTypeLimit type StorageTypeLimit struct { _ struct{} `type:"structure"` @@ -3280,7 +3455,6 @@ func (s *StorageTypeLimit) SetLimitValues(v []*string) *StorageTypeLimit { } // Specifies a key value pair for a resource tag. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/Tag type Tag struct { _ struct{} `type:"structure"` @@ -3342,7 +3516,6 @@ func (s *Tag) SetValue(v string) *Tag { // Container for the parameters to the UpdateElasticsearchDomain operation. // Specifies the type and number of instances in the domain cluster. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/UpdateElasticsearchDomainConfigRequest type UpdateElasticsearchDomainConfigInput struct { _ struct{} `type:"structure"` @@ -3366,9 +3539,18 @@ type UpdateElasticsearchDomainConfigInput struct { // The type and number of instances to instantiate for the domain cluster. ElasticsearchClusterConfig *ElasticsearchClusterConfig `type:"structure"` + // Map of LogType and LogPublishingOption, each containing options to publish + // a given type of Elasticsearch log. + LogPublishingOptions map[string]*LogPublishingOption `type:"map"` + // Option to set the time, in UTC format, for the daily automated snapshot. // Default value is 0 hours. SnapshotOptions *SnapshotOptions `type:"structure"` + + // Options to specify the subnets and security groups for VPC endpoint. For + // more information, see Creating a VPC (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc) + // in VPC Endpoints for Amazon Elasticsearch Service Domains + VPCOptions *VPCOptions `type:"structure"` } // String returns the string representation @@ -3427,15 +3609,26 @@ func (s *UpdateElasticsearchDomainConfigInput) SetElasticsearchClusterConfig(v * return s } +// SetLogPublishingOptions sets the LogPublishingOptions field's value. +func (s *UpdateElasticsearchDomainConfigInput) SetLogPublishingOptions(v map[string]*LogPublishingOption) *UpdateElasticsearchDomainConfigInput { + s.LogPublishingOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *UpdateElasticsearchDomainConfigInput) SetSnapshotOptions(v *SnapshotOptions) *UpdateElasticsearchDomainConfigInput { s.SnapshotOptions = v return s } +// SetVPCOptions sets the VPCOptions field's value. +func (s *UpdateElasticsearchDomainConfigInput) SetVPCOptions(v *VPCOptions) *UpdateElasticsearchDomainConfigInput { + s.VPCOptions = v + return s +} + // The result of an UpdateElasticsearchDomain request. Contains the status of // the Elasticsearch domain being updated. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/UpdateElasticsearchDomainConfigResponse type UpdateElasticsearchDomainConfigOutput struct { _ struct{} `type:"structure"` @@ -3461,6 +3654,133 @@ func (s *UpdateElasticsearchDomainConfigOutput) SetDomainConfig(v *Elasticsearch return s } +// Options to specify the subnets and security groups for VPC endpoint. For +// more information, see VPC Endpoints for Amazon Elasticsearch Service Domains +// (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). +type VPCDerivedInfo struct { + _ struct{} `type:"structure"` + + // The availability zones for the Elasticsearch domain. Exists only if the domain + // was created with VPCOptions. + AvailabilityZones []*string `type:"list"` + + // Specifies the security groups for VPC endpoint. + SecurityGroupIds []*string `type:"list"` + + // Specifies the subnets for VPC endpoint. + SubnetIds []*string `type:"list"` + + // The VPC Id for the Elasticsearch domain. Exists only if the domain was created + // with VPCOptions. + VPCId *string `type:"string"` +} + +// String returns the string representation +func (s VPCDerivedInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VPCDerivedInfo) GoString() string { + return s.String() +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *VPCDerivedInfo) SetAvailabilityZones(v []*string) *VPCDerivedInfo { + s.AvailabilityZones = v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VPCDerivedInfo) SetSecurityGroupIds(v []*string) *VPCDerivedInfo { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VPCDerivedInfo) SetSubnetIds(v []*string) *VPCDerivedInfo { + s.SubnetIds = v + return s +} + +// SetVPCId sets the VPCId field's value. +func (s *VPCDerivedInfo) SetVPCId(v string) *VPCDerivedInfo { + s.VPCId = &v + return s +} + +// Status of the VPC options for the specified Elasticsearch domain. +type VPCDerivedInfoStatus struct { + _ struct{} `type:"structure"` + + // Specifies the VPC options for the specified Elasticsearch domain. + // + // Options is a required field + Options *VPCDerivedInfo `type:"structure" required:"true"` + + // Specifies the status of the VPC options for the specified Elasticsearch domain. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s VPCDerivedInfoStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VPCDerivedInfoStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *VPCDerivedInfoStatus) SetOptions(v *VPCDerivedInfo) *VPCDerivedInfoStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *VPCDerivedInfoStatus) SetStatus(v *OptionStatus) *VPCDerivedInfoStatus { + s.Status = v + return s +} + +// Options to specify the subnets and security groups for VPC endpoint. For +// more information, see VPC Endpoints for Amazon Elasticsearch Service Domains +// (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). +type VPCOptions struct { + _ struct{} `type:"structure"` + + // Specifies the security groups for VPC endpoint. + SecurityGroupIds []*string `type:"list"` + + // Specifies the subnets for VPC endpoint. + SubnetIds []*string `type:"list"` +} + +// String returns the string representation +func (s VPCOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VPCOptions) GoString() string { + return s.String() +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VPCOptions) SetSecurityGroupIds(v []*string) *VPCOptions { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VPCOptions) SetSubnetIds(v []*string) *VPCOptions { + s.SubnetIds = v + return s +} + const ( // ESPartitionInstanceTypeM3MediumElasticsearch is a ESPartitionInstanceType enum value ESPartitionInstanceTypeM3MediumElasticsearch = "m3.medium.elasticsearch" @@ -3563,6 +3883,37 @@ const ( // ESPartitionInstanceTypeR416xlargeElasticsearch is a ESPartitionInstanceType enum value ESPartitionInstanceTypeR416xlargeElasticsearch = "r4.16xlarge.elasticsearch" + + // ESPartitionInstanceTypeI3LargeElasticsearch is a ESPartitionInstanceType enum value + ESPartitionInstanceTypeI3LargeElasticsearch = "i3.large.elasticsearch" + + // ESPartitionInstanceTypeI3XlargeElasticsearch is a ESPartitionInstanceType enum value + ESPartitionInstanceTypeI3XlargeElasticsearch = "i3.xlarge.elasticsearch" + + // ESPartitionInstanceTypeI32xlargeElasticsearch is a ESPartitionInstanceType enum value + ESPartitionInstanceTypeI32xlargeElasticsearch = "i3.2xlarge.elasticsearch" + + // ESPartitionInstanceTypeI34xlargeElasticsearch is a ESPartitionInstanceType enum value + ESPartitionInstanceTypeI34xlargeElasticsearch = "i3.4xlarge.elasticsearch" + + // ESPartitionInstanceTypeI38xlargeElasticsearch is a ESPartitionInstanceType enum value + ESPartitionInstanceTypeI38xlargeElasticsearch = "i3.8xlarge.elasticsearch" + + // ESPartitionInstanceTypeI316xlargeElasticsearch is a ESPartitionInstanceType enum value + ESPartitionInstanceTypeI316xlargeElasticsearch = "i3.16xlarge.elasticsearch" +) + +// Type of Log File, it can be one of the following: INDEX_SLOW_LOGS: Index +// slow logs contains insert requests that took more time than configured index +// query log threshold to execute. +// SEARCH_SLOW_LOGS: Search slow logs contains search queries that took more +// time than configured search query log threshold to execute. +const ( + // LogTypeIndexSlowLogs is a LogType enum value + LogTypeIndexSlowLogs = "INDEX_SLOW_LOGS" + + // LogTypeSearchSlowLogs is a LogType enum value + LogTypeSearchSlowLogs = "SEARCH_SLOW_LOGS" ) // The state of a requested change. One of the following: diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go index 84d3a0dd4..944fadc20 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go @@ -10,14 +10,12 @@ // For example, es.us-east-1.amazonaws.com. For a current list of supported // regions and endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticsearch-service-regions). // -// See https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01 for more information on this service. -// // See elasticsearchservice package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/elasticsearchservice/ // // Using the Client // -// To Amazon Elasticsearch Service with the SDK use the New function to create +// To contact Amazon Elasticsearch Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go index 20e8ff502..436dd5827 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go @@ -10,7 +10,7 @@ // // Using the Client // -// To Amazon Elastic Transcoder with the SDK use the New function to create +// To contact Amazon Elastic Transcoder with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go index 92f97d729..53c2a067a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go @@ -39,7 +39,7 @@ // // Using the Client // -// To Elastic Load Balancing with the SDK use the New function to create +// To contact Elastic Load Balancing with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index e24386703..3c65f31bc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -11,6 +11,97 @@ import ( "github.com/aws/aws-sdk-go/aws/request" ) +const opAddListenerCertificates = "AddListenerCertificates" + +// AddListenerCertificatesRequest generates a "aws/request.Request" representing the +// client's request for the AddListenerCertificates operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddListenerCertificates for more information on using the AddListenerCertificates +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddListenerCertificatesRequest method. +// req, resp := client.AddListenerCertificatesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificates +func (c *ELBV2) AddListenerCertificatesRequest(input *AddListenerCertificatesInput) (req *request.Request, output *AddListenerCertificatesOutput) { + op := &request.Operation{ + Name: opAddListenerCertificates, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddListenerCertificatesInput{} + } + + output = &AddListenerCertificatesOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddListenerCertificates API operation for Elastic Load Balancing. +// +// Adds the specified certificate to the specified secure listener. +// +// If the certificate was already added, the call is successful but the certificate +// is not added again. +// +// To list the certificates for your listener, use DescribeListenerCertificates. +// To remove certificates from your listener, use RemoveListenerCertificates. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Elastic Load Balancing's +// API operation AddListenerCertificates for usage and error information. +// +// Returned Error Codes: +// * ErrCodeListenerNotFoundException "ListenerNotFound" +// The specified listener does not exist. +// +// * ErrCodeTooManyCertificatesException "TooManyCertificates" +// You've reached the limit on the number of certificates per load balancer. +// +// * ErrCodeCertificateNotFoundException "CertificateNotFound" +// The specified certificate does not exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificates +func (c *ELBV2) AddListenerCertificates(input *AddListenerCertificatesInput) (*AddListenerCertificatesOutput, error) { + req, out := c.AddListenerCertificatesRequest(input) + return out, req.Send() +} + +// AddListenerCertificatesWithContext is the same as AddListenerCertificates with the addition of +// the ability to pass a context and additional request options. +// +// See AddListenerCertificates for details on how to use this API operation. +// +// 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 *ELBV2) AddListenerCertificatesWithContext(ctx aws.Context, input *AddListenerCertificatesInput, opts ...request.Option) (*AddListenerCertificatesOutput, error) { + req, out := c.AddListenerCertificatesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the @@ -55,8 +146,9 @@ func (c *ELBV2) AddTagsRequest(input *AddTagsInput) (req *request.Request, outpu // AddTags API operation for Elastic Load Balancing. // -// Adds the specified tags to the specified resource. You can tag your Application -// Load Balancers and your target groups. +// Adds the specified tags to the specified Elastic Load Balancing resource. +// You can tag your Application Load Balancers, Network Load Balancers, and +// your target groups. // // Each tag consists of a key and an optional value. If a resource already has // a tag with the same key, AddTags updates its value. @@ -150,16 +242,21 @@ func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request. // CreateListener API operation for Elastic Load Balancing. // -// Creates a listener for the specified Application Load Balancer. -// -// You can create up to 10 listeners per load balancer. +// Creates a listener for the specified Application Load Balancer or Network +// Load Balancer. // // To update a listener, use ModifyListener. When you are finished with a listener, // you can delete it using DeleteListener. If you are finished with both the // listener and the load balancer, you can delete them both using DeleteLoadBalancer. // +// This operation is idempotent, which means that it completes at most one time. +// If you attempt to create multiple listeners with the same settings, each +// call succeeds. +// // For more information, see Listeners for Your Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html) -// in the Application Load Balancers Guide. +// in the Application Load Balancers Guide and Listeners for Your Network Load +// Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html) +// in the Network Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -176,7 +273,7 @@ func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request. // You've reached the limit on the number of listeners per load balancer. // // * ErrCodeTooManyCertificatesException "TooManyCertificates" -// You've reached the limit on the number of certificates per listener. +// You've reached the limit on the number of certificates per load balancer. // // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" // The specified load balancer does not exist. @@ -206,6 +303,9 @@ func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request. // You've reached the limit on the number of times a target can be registered // with a load balancer. // +// * ErrCodeTooManyTargetsException "TooManyTargets" +// You've reached the limit on the number of targets. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateListener func (c *ELBV2) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) { req, out := c.CreateListenerRequest(input) @@ -272,7 +372,7 @@ func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req * // CreateLoadBalancer API operation for Elastic Load Balancing. // -// Creates an Application Load Balancer. +// Creates an Application Load Balancer or a Network Load Balancer. // // When you create a load balancer, you can specify security groups, subnets, // IP address type, and tags. Otherwise, you could do so later using SetSecurityGroups, @@ -282,13 +382,18 @@ func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req * // your current load balancers, see DescribeLoadBalancers. When you are finished // with a load balancer, you can delete it using DeleteLoadBalancer. // -// You can create up to 20 load balancers per region per account. You can request -// an increase for the number of load balancers for your account. For more information, -// see Limits for Your Application Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html) -// in the Application Load Balancers Guide. +// For limit information, see Limits for Your Application Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html) +// in the Application Load Balancers Guide and Limits for Your Network Load +// Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html) +// in the Network Load Balancers Guide. +// +// This operation is idempotent, which means that it completes at most one time. +// If you attempt to create multiple load balancers with the same settings, +// each call succeeds. // // For more information, see Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html) -// in the Application Load Balancers Guide. +// in the Application Load Balancers Guide and Network Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html) +// in the Network Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -325,6 +430,15 @@ func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req * // * ErrCodeDuplicateTagKeysException "DuplicateTagKeys" // A tag key was specified more than once. // +// * ErrCodeResourceInUseException "ResourceInUse" +// A specified resource is in use. +// +// * ErrCodeAllocationIdNotFoundException "AllocationIdNotFound" +// The specified allocation ID does not exist. +// +// * ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported" +// The specified Availability Zone is not supported. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancer func (c *ELBV2) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) { req, out := c.CreateLoadBalancerRequest(input) @@ -391,13 +505,13 @@ func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, // CreateRule API operation for Elastic Load Balancing. // -// Creates a rule for the specified listener. +// Creates a rule for the specified listener. The listener must be associated +// with an Application Load Balancer. // -// Each rule can have one action and one condition. Rules are evaluated in priority -// order, from the lowest value to the highest value. When the condition for -// a rule is met, the specified action is taken. If no conditions are met, the -// default action for the default rule is taken. For more information, see Listener -// Rules (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules) +// Rules are evaluated in priority order, from the lowest value to the highest +// value. When the condition for a rule is met, the specified action is taken. +// If no conditions are met, the action for the default rule is taken. For more +// information, see Listener Rules (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules) // in the Application Load Balancers Guide. // // To view your current rules, use DescribeRules. To update a rule, use ModifyRule. @@ -424,6 +538,9 @@ func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, // * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" // You've reached the limit on the number of load balancers per target group. // +// * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" +// The specified configuration is not valid with this protocol. +// // * ErrCodeListenerNotFoundException "ListenerNotFound" // The specified listener does not exist. // @@ -437,6 +554,9 @@ func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, // You've reached the limit on the number of times a target can be registered // with a load balancer. // +// * ErrCodeTooManyTargetsException "TooManyTargets" +// You've reached the limit on the number of targets. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRule func (c *ELBV2) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) { req, out := c.CreateRuleRequest(input) @@ -514,9 +634,15 @@ func (c *ELBV2) CreateTargetGroupRequest(input *CreateTargetGroupInput) (req *re // // To delete a target group, use DeleteTargetGroup. // +// This operation is idempotent, which means that it completes at most one time. +// If you attempt to create multiple target groups with the same settings, each +// call succeeds. +// // For more information, see Target Groups for Your Application Load Balancers // (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html) -// in the Application Load Balancers Guide. +// in the Application Load Balancers Guide or Target Groups for Your Network +// Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html) +// in the Network Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -532,6 +658,9 @@ func (c *ELBV2) CreateTargetGroupRequest(input *CreateTargetGroupInput) (req *re // * ErrCodeTooManyTargetGroupsException "TooManyTargetGroups" // You've reached the limit on the number of target groups for your AWS account. // +// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" +// The requested configuration is not valid. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTargetGroup func (c *ELBV2) CreateTargetGroup(input *CreateTargetGroupInput) (*CreateTargetGroupOutput, error) { req, out := c.CreateTargetGroupRequest(input) @@ -680,7 +809,8 @@ func (c *ELBV2) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req * // DeleteLoadBalancer API operation for Elastic Load Balancing. // -// Deletes the specified Application Load Balancer and its attached listeners. +// Deletes the specified Application Load Balancer or Network Load Balancer +// and its attached listeners. // // You can't delete a load balancer if deletion protection is enabled. If the // load balancer does not exist or has already been deleted, the call succeeds. @@ -950,8 +1080,8 @@ func (c *ELBV2) DeregisterTargetsRequest(input *DeregisterTargetsInput) (req *re // The specified target group does not exist. // // * ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist or is not in the same VPC as the target -// group. +// The specified target does not exist, is not in the same VPC as the target +// group, or has an unsupported instance type. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeregisterTargets func (c *ELBV2) DeregisterTargets(input *DeregisterTargetsInput) (*DeregisterTargetsOutput, error) { @@ -1022,8 +1152,10 @@ func (c *ELBV2) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) // Describes the current Elastic Load Balancing resource limits for your AWS // account. // -// For more information, see Limits for Your Application Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html) -// in the Application Load Balancer Guide. +// For more information, see Limits for Your Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html) +// in the Application Load Balancer Guide or Limits for Your Network Load Balancers +// (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html) +// in the Network Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1053,6 +1185,85 @@ func (c *ELBV2) DescribeAccountLimitsWithContext(ctx aws.Context, input *Describ return out, req.Send() } +const opDescribeListenerCertificates = "DescribeListenerCertificates" + +// DescribeListenerCertificatesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeListenerCertificates operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeListenerCertificates for more information on using the DescribeListenerCertificates +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeListenerCertificatesRequest method. +// req, resp := client.DescribeListenerCertificatesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificates +func (c *ELBV2) DescribeListenerCertificatesRequest(input *DescribeListenerCertificatesInput) (req *request.Request, output *DescribeListenerCertificatesOutput) { + op := &request.Operation{ + Name: opDescribeListenerCertificates, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeListenerCertificatesInput{} + } + + output = &DescribeListenerCertificatesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeListenerCertificates API operation for Elastic Load Balancing. +// +// Describes the certificates for the specified secure listener. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Elastic Load Balancing's +// API operation DescribeListenerCertificates for usage and error information. +// +// Returned Error Codes: +// * ErrCodeListenerNotFoundException "ListenerNotFound" +// The specified listener does not exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificates +func (c *ELBV2) DescribeListenerCertificates(input *DescribeListenerCertificatesInput) (*DescribeListenerCertificatesOutput, error) { + req, out := c.DescribeListenerCertificatesRequest(input) + return out, req.Send() +} + +// DescribeListenerCertificatesWithContext is the same as DescribeListenerCertificates with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeListenerCertificates for details on how to use this API operation. +// +// 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 *ELBV2) DescribeListenerCertificatesWithContext(ctx aws.Context, input *DescribeListenerCertificatesInput, opts ...request.Option) (*DescribeListenerCertificatesOutput, error) { + req, out := c.DescribeListenerCertificatesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeListeners = "DescribeListeners" // DescribeListenersRequest generates a "aws/request.Request" representing the @@ -1104,7 +1315,8 @@ func (c *ELBV2) DescribeListenersRequest(input *DescribeListenersInput) (req *re // DescribeListeners API operation for Elastic Load Balancing. // // Describes the specified listeners or the listeners for the specified Application -// Load Balancer. You must specify either a load balancer or one or more listeners. +// Load Balancer or Network Load Balancer. You must specify either a load balancer +// or one or more listeners. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1236,7 +1448,8 @@ func (c *ELBV2) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalance // DescribeLoadBalancerAttributes API operation for Elastic Load Balancing. // -// Describes the attributes for the specified Application Load Balancer. +// Describes the attributes for the specified Application Load Balancer or Network +// Load Balancer. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1321,8 +1534,7 @@ func (c *ELBV2) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) // DescribeLoadBalancers API operation for Elastic Load Balancing. // -// Describes the specified Application Load Balancers or all of your Application -// Load Balancers. +// Describes the specified load balancers or all of your load balancers. // // To describe the listeners for a load balancer, use DescribeListeners. To // describe the attributes for a load balancer, use DescribeLoadBalancerAttributes. @@ -1620,7 +1832,8 @@ func (c *ELBV2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Requ // DescribeTags API operation for Elastic Load Balancing. // // Describes the tags for the specified resources. You can describe the tags -// for one or more Application Load Balancers and target groups. +// for one or more Application Load Balancers, Network Load Balancers, and target +// groups. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1942,8 +2155,8 @@ func (c *ELBV2) DescribeTargetHealthRequest(input *DescribeTargetHealthInput) (r // // Returned Error Codes: // * ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist or is not in the same VPC as the target -// group. +// The specified target does not exist, is not in the same VPC as the target +// group, or has an unsupported instance type. // // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" // The specified target group does not exist. @@ -2040,7 +2253,7 @@ func (c *ELBV2) ModifyListenerRequest(input *ModifyListenerInput) (req *request. // You've reached the limit on the number of listeners per load balancer. // // * ErrCodeTooManyCertificatesException "TooManyCertificates" -// You've reached the limit on the number of certificates per listener. +// You've reached the limit on the number of certificates per load balancer. // // * ErrCodeListenerNotFoundException "ListenerNotFound" // The specified listener does not exist. @@ -2070,6 +2283,9 @@ func (c *ELBV2) ModifyListenerRequest(input *ModifyListenerInput) (req *request. // You've reached the limit on the number of times a target can be registered // with a load balancer. // +// * ErrCodeTooManyTargetsException "TooManyTargets" +// You've reached the limit on the number of targets. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener func (c *ELBV2) ModifyListener(input *ModifyListenerInput) (*ModifyListenerOutput, error) { req, out := c.ModifyListenerRequest(input) @@ -2136,7 +2352,8 @@ func (c *ELBV2) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAtt // ModifyLoadBalancerAttributes API operation for Elastic Load Balancing. // -// Modifies the specified attributes of the specified Application Load Balancer. +// Modifies the specified attributes of the specified Application Load Balancer +// or Network Load Balancer. // // If any of the specified attributes can't be modified as requested, the call // fails. Any existing attributes that you do not modify retain their current @@ -2239,6 +2456,9 @@ func (c *ELBV2) ModifyRuleRequest(input *ModifyRuleInput) (req *request.Request, // * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" // You've reached the limit on the number of load balancers per target group. // +// * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" +// The specified configuration is not valid with this protocol. +// // * ErrCodeRuleNotFoundException "RuleNotFound" // The specified rule does not exist. // @@ -2337,6 +2557,9 @@ func (c *ELBV2) ModifyTargetGroupRequest(input *ModifyTargetGroupInput) (req *re // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" // The specified target group does not exist. // +// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" +// The requested configuration is not valid. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup func (c *ELBV2) ModifyTargetGroup(input *ModifyTargetGroupInput) (*ModifyTargetGroupOutput, error) { req, out := c.ModifyTargetGroupRequest(input) @@ -2416,6 +2639,9 @@ func (c *ELBV2) ModifyTargetGroupAttributesRequest(input *ModifyTargetGroupAttri // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" // The specified target group does not exist. // +// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" +// The requested configuration is not valid. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes func (c *ELBV2) ModifyTargetGroupAttributes(input *ModifyTargetGroupAttributesInput) (*ModifyTargetGroupAttributesOutput, error) { req, out := c.ModifyTargetGroupAttributesRequest(input) @@ -2484,13 +2710,18 @@ func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *reques // // Registers the specified targets with the specified target group. // -// By default, the load balancer routes requests to registered targets using -// the protocol and port number for the target group. Alternatively, you can -// override the port for a target when you register it. +// You can register targets by instance ID or by IP address. If the target is +// an EC2 instance, it must be in the running state when you register it. // -// The target must be in the virtual private cloud (VPC) that you specified -// for the target group. If the target is an EC2 instance, it must be in the -// running state when you register it. +// By default, the load balancer routes requests to registered targets using +// the protocol and port for the target group. Alternatively, you can override +// the port for a target when you register it. You can register each EC2 instance +// or IP address with the same target group multiple times using different ports. +// +// With a Network Load Balancer, you cannot register instances by instance ID +// if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, +// G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these +// types by IP address. // // To remove a target from a target group, use DeregisterTargets. // @@ -2509,8 +2740,8 @@ func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *reques // You've reached the limit on the number of targets. // // * ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist or is not in the same VPC as the target -// group. +// The specified target does not exist, is not in the same VPC as the target +// group, or has an unsupported instance type. // // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" // You've reached the limit on the number of times a target can be registered @@ -2538,6 +2769,93 @@ func (c *ELBV2) RegisterTargetsWithContext(ctx aws.Context, input *RegisterTarge return out, req.Send() } +const opRemoveListenerCertificates = "RemoveListenerCertificates" + +// RemoveListenerCertificatesRequest generates a "aws/request.Request" representing the +// client's request for the RemoveListenerCertificates operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveListenerCertificates for more information on using the RemoveListenerCertificates +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveListenerCertificatesRequest method. +// req, resp := client.RemoveListenerCertificatesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates +func (c *ELBV2) RemoveListenerCertificatesRequest(input *RemoveListenerCertificatesInput) (req *request.Request, output *RemoveListenerCertificatesOutput) { + op := &request.Operation{ + Name: opRemoveListenerCertificates, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveListenerCertificatesInput{} + } + + output = &RemoveListenerCertificatesOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveListenerCertificates API operation for Elastic Load Balancing. +// +// Removes the specified certificate from the specified secure listener. +// +// You can't remove the default certificate for a listener. To replace the default +// certificate, call ModifyListener. +// +// To list the certificates for your listener, use DescribeListenerCertificates. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Elastic Load Balancing's +// API operation RemoveListenerCertificates for usage and error information. +// +// Returned Error Codes: +// * ErrCodeListenerNotFoundException "ListenerNotFound" +// The specified listener does not exist. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermitted" +// This operation is not allowed. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates +func (c *ELBV2) RemoveListenerCertificates(input *RemoveListenerCertificatesInput) (*RemoveListenerCertificatesOutput, error) { + req, out := c.RemoveListenerCertificatesRequest(input) + return out, req.Send() +} + +// RemoveListenerCertificatesWithContext is the same as RemoveListenerCertificates with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveListenerCertificates for details on how to use this API operation. +// +// 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 *ELBV2) RemoveListenerCertificatesWithContext(ctx aws.Context, input *RemoveListenerCertificatesInput, opts ...request.Option) (*RemoveListenerCertificatesOutput, error) { + req, out := c.RemoveListenerCertificatesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the @@ -2582,7 +2900,7 @@ func (c *ELBV2) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, // RemoveTags API operation for Elastic Load Balancing. // -// Removes the specified tags from the specified resource. +// Removes the specified tags from the specified Elastic Load Balancing resource. // // To list the current tags for your resources, use DescribeTags. // @@ -2676,7 +2994,9 @@ func (c *ELBV2) SetIpAddressTypeRequest(input *SetIpAddressTypeInput) (req *requ // SetIpAddressType API operation for Elastic Load Balancing. // // Sets the type of IP addresses used by the subnets of the specified Application -// Load Balancer. +// Load Balancer or Network Load Balancer. +// +// Note that Network Load Balancers must use ipv4. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2850,9 +3170,11 @@ func (c *ELBV2) SetSecurityGroupsRequest(input *SetSecurityGroupsInput) (req *re // SetSecurityGroups API operation for Elastic Load Balancing. // -// Associates the specified security groups with the specified load balancer. -// The specified security groups override the previously associated security -// groups. +// Associates the specified security groups with the specified Application Load +// Balancer. The specified security groups override the previously associated +// security groups. +// +// Note that you can't specify a security group for a Network Load Balancer. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2938,7 +3260,10 @@ func (c *ELBV2) SetSubnetsRequest(input *SetSubnetsInput) (req *request.Request, // SetSubnets API operation for Elastic Load Balancing. // // Enables the Availability Zone for the specified subnets for the specified -// load balancer. The specified subnets replace the previously enabled subnets. +// Application Load Balancer. The specified subnets replace the previously enabled +// subnets. +// +// Note that you can't change the subnets for a Network Load Balancer. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2960,6 +3285,12 @@ func (c *ELBV2) SetSubnetsRequest(input *SetSubnetsInput) (req *request.Request, // * ErrCodeInvalidSubnetException "InvalidSubnet" // The specified subnet is out of available addresses. // +// * ErrCodeAllocationIdNotFoundException "AllocationIdNotFound" +// The specified allocation ID does not exist. +// +// * ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported" +// The specified Availability Zone is not supported. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets func (c *ELBV2) SetSubnets(input *SetSubnetsInput) (*SetSubnetsOutput, error) { req, out := c.SetSubnetsRequest(input) @@ -3036,6 +3367,83 @@ func (s *Action) SetType(v string) *Action { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificatesInput +type AddListenerCertificatesInput struct { + _ struct{} `type:"structure"` + + // The certificate to add. You can specify one certificate per call. + // + // Certificates is a required field + Certificates []*Certificate `type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the listener. + // + // ListenerArn is a required field + ListenerArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AddListenerCertificatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddListenerCertificatesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddListenerCertificatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddListenerCertificatesInput"} + if s.Certificates == nil { + invalidParams.Add(request.NewErrParamRequired("Certificates")) + } + if s.ListenerArn == nil { + invalidParams.Add(request.NewErrParamRequired("ListenerArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificates sets the Certificates field's value. +func (s *AddListenerCertificatesInput) SetCertificates(v []*Certificate) *AddListenerCertificatesInput { + s.Certificates = v + return s +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *AddListenerCertificatesInput) SetListenerArn(v string) *AddListenerCertificatesInput { + s.ListenerArn = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificatesOutput +type AddListenerCertificatesOutput struct { + _ struct{} `type:"structure"` + + // Information about the certificates. + Certificates []*Certificate `type:"list"` +} + +// String returns the string representation +func (s AddListenerCertificatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddListenerCertificatesOutput) GoString() string { + return s.String() +} + +// SetCertificates sets the Certificates field's value. +func (s *AddListenerCertificatesOutput) SetCertificates(v []*Certificate) *AddListenerCertificatesOutput { + s.Certificates = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTagsInput type AddTagsInput struct { _ struct{} `type:"structure"` @@ -3122,6 +3530,9 @@ func (s AddTagsOutput) GoString() string { type AvailabilityZone struct { _ struct{} `type:"structure"` + // [Network Load Balancers] The static IP address. + LoadBalancerAddresses []*LoadBalancerAddress `type:"list"` + // The ID of the subnet. SubnetId *string `type:"string"` @@ -3139,6 +3550,12 @@ func (s AvailabilityZone) GoString() string { return s.String() } +// SetLoadBalancerAddresses sets the LoadBalancerAddresses field's value. +func (s *AvailabilityZone) SetLoadBalancerAddresses(v []*LoadBalancerAddress) *AvailabilityZone { + s.LoadBalancerAddresses = v + return s +} + // SetSubnetId sets the SubnetId field's value. func (s *AvailabilityZone) SetSubnetId(v string) *AvailabilityZone { s.SubnetId = &v @@ -3151,13 +3568,16 @@ func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { return s } -// Information about an SSL server certificate deployed on a load balancer. +// Information about an SSL server certificate. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/Certificate type Certificate struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the certificate. CertificateArn *string `type:"string"` + + // Indicates whether the certificate is the default certificate. + IsDefault *bool `type:"boolean"` } // String returns the string representation @@ -3176,6 +3596,12 @@ func (s *Certificate) SetCertificateArn(v string) *Certificate { return s } +// SetIsDefault sets the IsDefault field's value. +func (s *Certificate) SetIsDefault(v bool) *Certificate { + s.IsDefault = &v + return s +} + // Information about a cipher used in a policy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/Cipher type Cipher struct { @@ -3214,11 +3640,13 @@ func (s *Cipher) SetPriority(v int64) *Cipher { type CreateListenerInput struct { _ struct{} `type:"structure"` - // The SSL server certificate. You must provide exactly one certificate if the - // protocol is HTTPS. + // [HTTPS listeners] The SSL server certificate. You must provide exactly one + // certificate. Certificates []*Certificate `type:"list"` - // The default action for the listener. + // The default action for the listener. For Application Load Balancers, the + // protocol of the specified target group must be HTTP or HTTPS. For Network + // Load Balancers, the protocol of the specified target group must be TCP. // // DefaultActions is a required field DefaultActions []*Action `type:"list" required:"true"` @@ -3233,13 +3661,15 @@ type CreateListenerInput struct { // Port is a required field Port *int64 `min:"1" type:"integer" required:"true"` - // The protocol for connections from clients to the load balancer. + // The protocol for connections from clients to the load balancer. For Application + // Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load + // Balancers, the supported protocol is TCP. // // Protocol is a required field Protocol *string `type:"string" required:"true" enum:"ProtocolEnum"` - // The security policy that defines which ciphers and protocols are supported. - // The default is the current predefined security policy. + // [HTTPS listeners] The security policy that defines which ciphers and protocols + // are supported. The default is the current predefined security policy. SslPolicy *string `type:"string"` } @@ -3352,9 +3782,10 @@ func (s *CreateListenerOutput) SetListeners(v []*Listener) *CreateListenerOutput type CreateLoadBalancerInput struct { _ struct{} `type:"structure"` - // The type of IP addresses used by the subnets for your load balancer. The - // possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and - // IPv6 addresses). Internal load balancers must use ipv4. + // [Application Load Balancers] The type of IP addresses used by the subnets + // for your load balancer. The possible values are ipv4 (for IPv4 addresses) + // and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must + // use ipv4. IpAddressType *string `type:"string" enum:"IpAddressType"` // The name of the load balancer. @@ -3379,18 +3810,37 @@ type CreateLoadBalancerInput struct { // The default is an Internet-facing load balancer. Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"` - // The IDs of the security groups to assign to the load balancer. + // [Application Load Balancers] The IDs of the security groups to assign to + // the load balancer. SecurityGroups []*string `type:"list"` // The IDs of the subnets to attach to the load balancer. You can specify only - // one subnet per Availability Zone. You must specify subnets from at least - // two Availability Zones. + // one subnet per Availability Zone. You must specify either subnets or subnet + // mappings. // - // Subnets is a required field - Subnets []*string `type:"list" required:"true"` + // [Application Load Balancers] You must specify subnets from at least two Availability + // Zones. You cannot specify Elastic IP addresses for your subnets. + // + // [Network Load Balancers] You can specify subnets from one or more Availability + // Zones. You can specify one Elastic IP address per subnet. + SubnetMappings []*SubnetMapping `type:"list"` + + // The IDs of the subnets to attach to the load balancer. You can specify only + // one subnet per Availability Zone. You must specify either subnets or subnet + // mappings. + // + // [Application Load Balancers] You must specify subnets from at least two Availability + // Zones. + // + // [Network Load Balancers] You can specify subnets from one or more Availability + // Zones. + Subnets []*string `type:"list"` // One or more tags to assign to the load balancer. Tags []*Tag `min:"1" type:"list"` + + // The type of load balancer to create. The default is application. + Type *string `type:"string" enum:"LoadBalancerTypeEnum"` } // String returns the string representation @@ -3409,9 +3859,6 @@ func (s *CreateLoadBalancerInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } @@ -3456,6 +3903,12 @@ func (s *CreateLoadBalancerInput) SetSecurityGroups(v []*string) *CreateLoadBala return s } +// SetSubnetMappings sets the SubnetMappings field's value. +func (s *CreateLoadBalancerInput) SetSubnetMappings(v []*SubnetMapping) *CreateLoadBalancerInput { + s.SubnetMappings = v + return s +} + // SetSubnets sets the Subnets field's value. func (s *CreateLoadBalancerInput) SetSubnets(v []*string) *CreateLoadBalancerInput { s.Subnets = v @@ -3468,6 +3921,12 @@ func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput { return s } +// SetType sets the Type field's value. +func (s *CreateLoadBalancerInput) SetType(v string) *CreateLoadBalancerInput { + s.Type = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancerOutput type CreateLoadBalancerOutput struct { _ struct{} `type:"structure"` @@ -3501,7 +3960,7 @@ type CreateRuleInput struct { // Actions is a required field Actions []*Action `type:"list" required:"true"` - // A condition. Each condition specifies a field name and a single value. + // The conditions. Each condition specifies a field name and a single value. // // If the field name is host-header, you can specify a single host name (for // example, my.example.com). A host name is case insensitive, can be up to 128 @@ -3644,32 +4103,40 @@ type CreateTargetGroupInput struct { _ struct{} `type:"structure"` // The approximate amount of time, in seconds, between health checks of an individual - // target. The default is 30 seconds. + // target. For Application Load Balancers, the range is 5 to 300 seconds. For + // Network Load Balancers, the supported values are 10 or 30 seconds. The default + // is 30 seconds. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` - // The ping path that is the destination on the targets for health checks. The - // default is /. + // [HTTP/HTTPS health checks] The ping path that is the destination on the targets + // for health checks. The default is /. HealthCheckPath *string `min:"1" type:"string"` // The port the load balancer uses when performing health checks on targets. - // The default is traffic-port, which indicates the port on which each target - // receives traffic from the load balancer. + // The default is traffic-port, which is the port on which each target receives + // traffic from the load balancer. HealthCheckPort *string `type:"string"` // The protocol the load balancer uses when performing health checks on targets. - // The default is the HTTP protocol. + // The TCP protocol is supported only if the protocol of the target group is + // TCP. For Application Load Balancers, the default is HTTP. For Network Load + // Balancers, the default is TCP. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` // The amount of time, in seconds, during which no response from a target means - // a failed health check. The default is 5 seconds. + // a failed health check. For Application Load Balancers, the range is 2 to + // 60 seconds and the default is 5 seconds. For Network Load Balancers, this + // is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health + // checks. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` // The number of consecutive health checks successes required before considering - // an unhealthy target healthy. The default is 5. + // an unhealthy target healthy. For Application Load Balancers, the default + // is 5. For Network Load Balancers, the default is 3. HealthyThresholdCount *int64 `min:"2" type:"integer"` - // The HTTP codes to use when checking for a successful response from a target. - // The default is 200. + // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful + // response from a target. Matcher *Matcher `type:"structure"` // The name of the target group. @@ -3687,7 +4154,9 @@ type CreateTargetGroupInput struct { // Port is a required field Port *int64 `min:"1" type:"integer" required:"true"` - // The protocol to use for routing traffic to the targets. + // The protocol to use for routing traffic to the targets. For Application Load + // Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, + // the supported protocol is TCP. // // Protocol is a required field Protocol *string `type:"string" required:"true" enum:"ProtocolEnum"` @@ -3705,7 +4174,9 @@ type CreateTargetGroupInput struct { TargetType *string `type:"string" enum:"TargetTypeEnum"` // The number of consecutive health check failures required before considering - // a target unhealthy. The default is 2. + // a target unhealthy. For Application Load Balancers, the default is 2. For + // Network Load Balancers, this value must be the same as the healthy threshold + // count. UnhealthyThresholdCount *int64 `min:"2" type:"integer"` // The identifier of the virtual private cloud (VPC). @@ -4247,6 +4718,101 @@ func (s *DescribeAccountLimitsOutput) SetNextMarker(v string) *DescribeAccountLi return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificatesInput +type DescribeListenerCertificatesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Names (ARN) of the listener. + // + // ListenerArn is a required field + ListenerArn *string `type:"string" required:"true"` + + // The marker for the next set of results. (You received this marker from a + // previous call.) + Marker *string `type:"string"` + + // The maximum number of results to return with this call. + PageSize *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s DescribeListenerCertificatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeListenerCertificatesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeListenerCertificatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeListenerCertificatesInput"} + if s.ListenerArn == nil { + invalidParams.Add(request.NewErrParamRequired("ListenerArn")) + } + if s.PageSize != nil && *s.PageSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *DescribeListenerCertificatesInput) SetListenerArn(v string) *DescribeListenerCertificatesInput { + s.ListenerArn = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeListenerCertificatesInput) SetMarker(v string) *DescribeListenerCertificatesInput { + s.Marker = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *DescribeListenerCertificatesInput) SetPageSize(v int64) *DescribeListenerCertificatesInput { + s.PageSize = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificatesOutput +type DescribeListenerCertificatesOutput struct { + _ struct{} `type:"structure"` + + // Information about the certificates. + Certificates []*Certificate `type:"list"` + + // The marker to use when requesting the next set of results. If there are no + // additional results, the string is empty. + NextMarker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeListenerCertificatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeListenerCertificatesOutput) GoString() string { + return s.String() +} + +// SetCertificates sets the Certificates field's value. +func (s *DescribeListenerCertificatesOutput) SetCertificates(v []*Certificate) *DescribeListenerCertificatesOutput { + s.Certificates = v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *DescribeListenerCertificatesOutput) SetNextMarker(v string) *DescribeListenerCertificatesOutput { + s.NextMarker = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenersInput type DescribeListenersInput struct { _ struct{} `type:"structure"` @@ -5028,11 +5594,19 @@ type Limit struct { // // * listeners-per-application-load-balancer // + // * listeners-per-network-load-balancer + // + // * network-load-balancers + // // * rules-per-application-load-balancer // // * target-groups // // * targets-per-application-load-balancer + // + // * targets-per-availability-zone-per-network-load-balancer + // + // * targets-per-network-load-balancer Name *string `type:"string"` } @@ -5273,6 +5847,40 @@ func (s *LoadBalancer) SetVpcId(v string) *LoadBalancer { return s } +// Information about a static IP address for a load balancer. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/LoadBalancerAddress +type LoadBalancerAddress struct { + _ struct{} `type:"structure"` + + // [Network Load Balancers] The allocation ID of the Elastic IP address. + AllocationId *string `type:"string"` + + // The static IP address. + IpAddress *string `type:"string"` +} + +// String returns the string representation +func (s LoadBalancerAddress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadBalancerAddress) GoString() string { + return s.String() +} + +// SetAllocationId sets the AllocationId field's value. +func (s *LoadBalancerAddress) SetAllocationId(v string) *LoadBalancerAddress { + s.AllocationId = &v + return s +} + +// SetIpAddress sets the IpAddress field's value. +func (s *LoadBalancerAddress) SetIpAddress(v string) *LoadBalancerAddress { + s.IpAddress = &v + return s +} + // Information about a load balancer attribute. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/LoadBalancerAttribute type LoadBalancerAttribute struct { @@ -5280,23 +5888,25 @@ type LoadBalancerAttribute struct { // The name of the attribute. // - // * access_logs.s3.enabled - Indicates whether access logs stored in Amazon - // S3 are enabled. The value is true or false. + // * access_logs.s3.enabled - [Application Load Balancers] Indicates whether + // access logs stored in Amazon S3 are enabled. The value is true or false. // - // * access_logs.s3.bucket - The name of the S3 bucket for the access logs. - // This attribute is required if access logs in Amazon S3 are enabled. The - // bucket must exist in the same region as the load balancer and have a bucket - // policy that grants Elastic Load Balancing permission to write to the bucket. + // * access_logs.s3.bucket - [Application Load Balancers] The name of the + // S3 bucket for the access logs. This attribute is required if access logs + // in Amazon S3 are enabled. The bucket must exist in the same region as + // the load balancer and have a bucket policy that grants Elastic Load Balancing + // permission to write to the bucket. // - // * access_logs.s3.prefix - The prefix for the location in the S3 bucket. - // If you don't specify a prefix, the access logs are stored in the root - // of the bucket. + // * access_logs.s3.prefix - [Application Load Balancers] The prefix for + // the location in the S3 bucket. If you don't specify a prefix, the access + // logs are stored in the root of the bucket. // // * deletion_protection.enabled - Indicates whether deletion protection // is enabled. The value is true or false. // - // * idle_timeout.timeout_seconds - The idle timeout value, in seconds. The - // valid range is 1-3600. The default is 60 seconds. + // * idle_timeout.timeout_seconds - [Application Load Balancers] The idle + // timeout value, in seconds. The valid range is 1-4000. The default is 60 + // seconds. Key *string `type:"string"` // The value of the attribute. @@ -5366,9 +5976,13 @@ func (s *LoadBalancerState) SetReason(v string) *LoadBalancerState { type Matcher struct { _ struct{} `type:"structure"` - // The HTTP codes. You can specify values between 200 and 499. The default value - // is 200. You can specify multiple values (for example, "200,202") or a range - // of values (for example, "200-299"). + // The HTTP codes. + // + // For Application Load Balancers, you can specify values between 200 and 499, + // and the default value is 200. You can specify multiple values (for example, + // "200,202") or a range of values (for example, "200-299"). + // + // For Network Load Balancers, this is 200 to 399. // // HttpCode is a required field HttpCode *string `type:"string" required:"true"` @@ -5407,10 +6021,12 @@ func (s *Matcher) SetHttpCode(v string) *Matcher { type ModifyListenerInput struct { _ struct{} `type:"structure"` - // The SSL server certificate. + // The default SSL server certificate. Certificates []*Certificate `type:"list"` - // The default actions. + // The default action. For Application Load Balancers, the protocol of the specified + // target group must be HTTP or HTTPS. For Network Load Balancers, the protocol + // of the specified target group must be TCP. DefaultActions []*Action `type:"list"` // The Amazon Resource Name (ARN) of the listener. @@ -5421,7 +6037,9 @@ type ModifyListenerInput struct { // The port for connections from clients to the load balancer. Port *int64 `min:"1" type:"integer"` - // The protocol for connections from clients to the load balancer. + // The protocol for connections from clients to the load balancer. Application + // Load Balancers support HTTP and HTTPS and Network Load Balancers support + // TCP. Protocol *string `type:"string" enum:"ProtocolEnum"` // The security policy that defines which protocols and ciphers are supported. @@ -5607,7 +6225,7 @@ func (s *ModifyLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttr type ModifyRuleInput struct { _ struct{} `type:"structure"` - // The actions. + // The actions. The target group must use the HTTP or HTTPS protocol. Actions []*Action `type:"list"` // The conditions. @@ -5776,27 +6394,32 @@ type ModifyTargetGroupInput struct { _ struct{} `type:"structure"` // The approximate amount of time, in seconds, between health checks of an individual - // target. + // target. For Application Load Balancers, the range is 5 to 300 seconds. For + // Network Load Balancers, the supported values are 10 or 30 seconds. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` - // The ping path that is the destination for the health check request. + // [HTTP/HTTPS health checks] The ping path that is the destination for the + // health check request. HealthCheckPath *string `min:"1" type:"string"` - // The port to use to connect with the target. + // The port the load balancer uses when performing health checks on targets. HealthCheckPort *string `type:"string"` - // The protocol to use to connect with the target. + // The protocol the load balancer uses when performing health checks on targets. + // The TCP protocol is supported only if the protocol of the target group is + // TCP. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` - // The amount of time, in seconds, during which no response means a failed health - // check. + // [HTTP/HTTPS health checks] The amount of time, in seconds, during which no + // response means a failed health check. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` // The number of consecutive health checks successes required before considering // an unhealthy target healthy. HealthyThresholdCount *int64 `min:"2" type:"integer"` - // The HTTP codes to use when checking for a successful response from a target. + // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful + // response from a target. Matcher *Matcher `type:"structure"` // The Amazon Resource Name (ARN) of the target group. @@ -5805,7 +6428,8 @@ type ModifyTargetGroupInput struct { TargetGroupArn *string `type:"string" required:"true"` // The number of consecutive health check failures required before considering - // the target unhealthy. + // the target unhealthy. For Network Load Balancers, this value must be the + // same as the healthy threshold count. UnhealthyThresholdCount *int64 `min:"2" type:"integer"` } @@ -5939,9 +6563,7 @@ type RegisterTargetsInput struct { // TargetGroupArn is a required field TargetGroupArn *string `type:"string" required:"true"` - // The targets. The default port for a target is the port for the target group. - // You can specify a port override. If a target is already registered, you can - // register it again using a different port. + // The targets. // // Targets is a required field Targets []*TargetDescription `type:"list" required:"true"` @@ -6010,6 +6632,74 @@ func (s RegisterTargetsOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificatesInput +type RemoveListenerCertificatesInput struct { + _ struct{} `type:"structure"` + + // The certificate to remove. You can specify one certificate per call. + // + // Certificates is a required field + Certificates []*Certificate `type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the listener. + // + // ListenerArn is a required field + ListenerArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveListenerCertificatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveListenerCertificatesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveListenerCertificatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveListenerCertificatesInput"} + if s.Certificates == nil { + invalidParams.Add(request.NewErrParamRequired("Certificates")) + } + if s.ListenerArn == nil { + invalidParams.Add(request.NewErrParamRequired("ListenerArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificates sets the Certificates field's value. +func (s *RemoveListenerCertificatesInput) SetCertificates(v []*Certificate) *RemoveListenerCertificatesInput { + s.Certificates = v + return s +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *RemoveListenerCertificatesInput) SetListenerArn(v string) *RemoveListenerCertificatesInput { + s.ListenerArn = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificatesOutput +type RemoveListenerCertificatesOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveListenerCertificatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveListenerCertificatesOutput) GoString() string { + return s.String() +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTagsInput type RemoveTagsInput struct { _ struct{} `type:"structure"` @@ -6486,8 +7176,16 @@ type SetSubnetsInput struct { // LoadBalancerArn is a required field LoadBalancerArn *string `type:"string" required:"true"` - // The IDs of the subnets. You must specify at least two subnets. You can add - // only one subnet per Availability Zone. + // The IDs of the subnets. You must specify subnets from at least two Availability + // Zones. You can specify only one subnet per Availability Zone. You must specify + // either subnets or subnet mappings. + // + // You cannot specify Elastic IP addresses for your subnets. + SubnetMappings []*SubnetMapping `type:"list"` + + // The IDs of the subnets. You must specify subnets from at least two Availability + // Zones. You can specify only one subnet per Availability Zone. You must specify + // either subnets or subnet mappings. // // Subnets is a required field Subnets []*string `type:"list" required:"true"` @@ -6525,6 +7223,12 @@ func (s *SetSubnetsInput) SetLoadBalancerArn(v string) *SetSubnetsInput { return s } +// SetSubnetMappings sets the SubnetMappings field's value. +func (s *SetSubnetsInput) SetSubnetMappings(v []*SubnetMapping) *SetSubnetsInput { + s.SubnetMappings = v + return s +} + // SetSubnets sets the Subnets field's value. func (s *SetSubnetsInput) SetSubnets(v []*string) *SetSubnetsInput { s.Subnets = v @@ -6598,6 +7302,40 @@ func (s *SslPolicy) SetSslProtocols(v []*string) *SslPolicy { return s } +// Information about a subnet mapping. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SubnetMapping +type SubnetMapping struct { + _ struct{} `type:"structure"` + + // [Network Load Balancers] The allocation ID of the Elastic IP address. + AllocationId *string `type:"string"` + + // The ID of the subnet. + SubnetId *string `type:"string"` +} + +// String returns the string representation +func (s SubnetMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubnetMapping) GoString() string { + return s.String() +} + +// SetAllocationId sets the AllocationId field's value. +func (s *SubnetMapping) SetAllocationId(v string) *SubnetMapping { + s.AllocationId = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *SubnetMapping) SetSubnetId(v string) *SubnetMapping { + s.SubnetId = &v + return s +} + // Information about a tag. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/Tag type Tag struct { @@ -6689,15 +7427,17 @@ func (s *TagDescription) SetTags(v []*Tag) *TagDescription { type TargetDescription struct { _ struct{} `type:"structure"` - // The Availability Zone where the IP address is to be registered. Specify all - // to register an IP address outside the target group VPC with all Availability - // Zones that are enabled for the load balancer. - // - // If the IP address is in a subnet of the VPC for the target group, the Availability - // Zone is automatically detected and this parameter is optional. + // An Availability Zone or all. This determines whether the target receives + // traffic from the load balancer nodes in the specified Availability Zone or + // from all enabled Availability Zones for the load balancer. // // This parameter is not supported if the target type of the target group is - // instance. + // instance. If the IP address is in a subnet of the VPC for the target group, + // the Availability Zone is automatically detected and this parameter is optional. + // If the IP address is outside the VPC, this parameter is required. + // + // With an Application Load Balancer, if the IP address is outside the VPC for + // the target group, the only supported value is all. AvailabilityZone *string `type:"string"` // The ID of the target. If the target type of the target group is instance, @@ -6924,17 +7664,17 @@ type TargetGroupAttribute struct { // from draining to unused. The range is 0-3600 seconds. The default value // is 300 seconds. // - // * stickiness.enabled - Indicates whether sticky sessions are enabled. - // The value is true or false. + // * stickiness.enabled - [Application Load Balancers] Indicates whether + // sticky sessions are enabled. The value is true or false. // - // * stickiness.type - The type of sticky sessions. The possible value is - // lb_cookie. + // * stickiness.type - [Application Load Balancers] The type of sticky sessions. + // The possible value is lb_cookie. // - // * stickiness.lb_cookie.duration_seconds - The time period, in seconds, - // during which requests from a client should be routed to the same target. - // After this time period expires, the load balancer-generated cookie is - // considered stale. The range is 1 second to 1 week (604800 seconds). The - // default value is 1 day (86400 seconds). + // * stickiness.lb_cookie.duration_seconds - [Application Load Balancers] + // The time period, in seconds, during which requests from a client should + // be routed to the same target. After this time period expires, the load + // balancer-generated cookie is considered stale. The range is 1 second to + // 1 week (604800 seconds). The default value is 1 day (86400 seconds). Key *string `type:"string"` // The value of the attribute. @@ -7007,6 +7747,9 @@ type TargetHealth struct { // or the target is in an Availability Zone that is not enabled for its load // balancer. // + // * Target.IpUnusable - The target IP address is reserved for use by a load + // balancer. + // // * Target.InvalidState - The target is in the stopped or terminated state. // // If the target state is draining, the reason code can be the following value: @@ -7118,6 +7861,9 @@ const ( // LoadBalancerStateEnumProvisioning is a LoadBalancerStateEnum enum value LoadBalancerStateEnumProvisioning = "provisioning" + // LoadBalancerStateEnumActiveImpaired is a LoadBalancerStateEnum enum value + LoadBalancerStateEnumActiveImpaired = "active_impaired" + // LoadBalancerStateEnumFailed is a LoadBalancerStateEnum enum value LoadBalancerStateEnumFailed = "failed" ) @@ -7125,6 +7871,9 @@ const ( const ( // LoadBalancerTypeEnumApplication is a LoadBalancerTypeEnum enum value LoadBalancerTypeEnumApplication = "application" + + // LoadBalancerTypeEnumNetwork is a LoadBalancerTypeEnum enum value + LoadBalancerTypeEnumNetwork = "network" ) const ( @@ -7133,6 +7882,9 @@ const ( // ProtocolEnumHttps is a ProtocolEnum enum value ProtocolEnumHttps = "HTTPS" + + // ProtocolEnumTcp is a ProtocolEnum enum value + ProtocolEnumTcp = "TCP" ) const ( @@ -7185,6 +7937,9 @@ const ( // TargetHealthStateEnumDraining is a TargetHealthStateEnum enum value TargetHealthStateEnumDraining = "draining" + + // TargetHealthStateEnumUnavailable is a TargetHealthStateEnum enum value + TargetHealthStateEnumUnavailable = "unavailable" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go index 96797ff8c..99a2ea81f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go @@ -14,22 +14,28 @@ // with health check settings to be used when checking the health status of // the targets. // -// Elastic Load Balancing supports two types of load balancers: Classic Load -// Balancers and Application Load Balancers. A Classic Load Balancer makes routing -// and load balancing decisions either at the transport layer (TCP/SSL) or the -// application layer (HTTP/HTTPS), and supports either EC2-Classic or a VPC. +// Elastic Load Balancing supports the following types of load balancers: Application +// Load Balancers, Network Load Balancers, and Classic Load Balancers. +// // An Application Load Balancer makes routing and load balancing decisions at -// the application layer (HTTP/HTTPS), supports path-based routing, and can -// route requests to one or more ports on each EC2 instance or container instance -// in your virtual private cloud (VPC). For more information, see the Elastic +// the application layer (HTTP/HTTPS). A Network Load Balancer makes routing +// and load balancing decisions at the transport layer (TCP). Both Application +// Load Balancers and Network Load Balancers can route requests to one or more +// ports on each EC2 instance or container instance in your virtual private +// cloud (VPC). +// +// A Classic Load Balancer makes routing and load balancing decisions either +// at the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS), and +// supports either EC2-Classic or a VPC. For more information, see the Elastic // Load Balancing User Guide (http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/). // // This reference covers the 2015-12-01 API, which supports Application Load -// Balancers. The 2012-06-01 API supports Classic Load Balancers. +// Balancers and Network Load Balancers. The 2012-06-01 API supports Classic +// Load Balancers. // // To get started, complete the following tasks: // -// Create an Application Load Balancer using CreateLoadBalancer. +// Create a load balancer using CreateLoadBalancer. // // Create a target group using CreateTargetGroup. // @@ -37,11 +43,8 @@ // // Create one or more listeners for your load balancer using CreateListener. // -// (Optional) Create one or more rules for content routing based on URL using -// CreateRule. -// -// To delete an Application Load Balancer and its related resources, complete -// the following tasks: +// To delete a load balancer and its related resources, complete the following +// tasks: // // Delete the load balancer using DeleteLoadBalancer. // @@ -57,7 +60,7 @@ // // Using the Client // -// To Elastic Load Balancing with the SDK use the New function to create +// To contact Elastic Load Balancing with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go index da661ba2c..88edc02e9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go @@ -4,6 +4,18 @@ package elbv2 const ( + // ErrCodeAllocationIdNotFoundException for service response error code + // "AllocationIdNotFound". + // + // The specified allocation ID does not exist. + ErrCodeAllocationIdNotFoundException = "AllocationIdNotFound" + + // ErrCodeAvailabilityZoneNotSupportedException for service response error code + // "AvailabilityZoneNotSupported". + // + // The specified Availability Zone is not supported. + ErrCodeAvailabilityZoneNotSupportedException = "AvailabilityZoneNotSupported" + // ErrCodeCertificateNotFoundException for service response error code // "CertificateNotFound". // @@ -74,8 +86,8 @@ const ( // ErrCodeInvalidTargetException for service response error code // "InvalidTarget". // - // The specified target does not exist or is not in the same VPC as the target - // group. + // The specified target does not exist, is not in the same VPC as the target + // group, or has an unsupported instance type. ErrCodeInvalidTargetException = "InvalidTarget" // ErrCodeListenerNotFoundException for service response error code @@ -141,7 +153,7 @@ const ( // ErrCodeTooManyCertificatesException for service response error code // "TooManyCertificates". // - // You've reached the limit on the number of certificates per listener. + // You've reached the limit on the number of certificates per load balancer. ErrCodeTooManyCertificatesException = "TooManyCertificates" // ErrCodeTooManyListenersException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/doc.go b/vendor/github.com/aws/aws-sdk-go/service/emr/doc.go index 1aa317969..772b2d093 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/doc.go @@ -15,7 +15,7 @@ // // Using the Client // -// To Amazon Elastic MapReduce with the SDK use the New function to create +// To contact Amazon Elastic MapReduce with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go index 6a6d27b8b..a183c051c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go @@ -14,7 +14,7 @@ // // Using the Client // -// To Amazon Kinesis Firehose with the SDK use the New function to create +// To contact Amazon Kinesis Firehose with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go index 08a610d2c..844805b42 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go @@ -40,7 +40,7 @@ // // Using the Client // -// To Amazon Glacier with the SDK use the New function to create +// To contact Amazon Glacier with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index db2eb744f..e667a099d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -384,6 +384,10 @@ func (c *IAM) AttachGroupPolicyRequest(input *AttachGroupPolicyInput) (req *requ // The request was rejected because an invalid or out-of-range value was supplied // for an input parameter. // +// * ErrCodePolicyNotAttachableException "PolicyNotAttachable" +// The request failed because AWS service role policies can only be attached +// to the service-linked role for that service. +// // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception // or failure. @@ -495,6 +499,10 @@ func (c *IAM) AttachRolePolicyRequest(input *AttachRolePolicyInput) (req *reques // the name of the service that depends on this service-linked role. You must // request the change through that service. // +// * ErrCodePolicyNotAttachableException "PolicyNotAttachable" +// The request failed because AWS service role policies can only be attached +// to the service-linked role for that service. +// // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception // or failure. @@ -596,6 +604,10 @@ func (c *IAM) AttachUserPolicyRequest(input *AttachUserPolicyInput) (req *reques // The request was rejected because an invalid or out-of-range value was supplied // for an input parameter. // +// * ErrCodePolicyNotAttachableException "PolicyNotAttachable" +// The request failed because AWS service role policies can only be attached +// to the service-linked role for that service. +// // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception // or failure. @@ -3752,6 +3764,113 @@ func (c *IAM) DeleteServerCertificateWithContext(ctx aws.Context, input *DeleteS return out, req.Send() } +const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole" + +// DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteServiceLinkedRole operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteServiceLinkedRole for more information on using the DeleteServiceLinkedRole +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteServiceLinkedRoleRequest method. +// req, resp := client.DeleteServiceLinkedRoleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRole +func (c *IAM) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput) (req *request.Request, output *DeleteServiceLinkedRoleOutput) { + op := &request.Operation{ + Name: opDeleteServiceLinkedRole, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteServiceLinkedRoleInput{} + } + + output = &DeleteServiceLinkedRoleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteServiceLinkedRole API operation for AWS Identity and Access Management. +// +// Submits a service-linked role deletion request and returns a DeletionTaskId, +// which you can use to check the status of the deletion. Before you call this +// operation, confirm that the role has no active sessions and that any resources +// used by the role in the linked service are deleted. If you call this operation +// more than once for the same service-linked role and an earlier deletion task +// is not complete, then the DeletionTaskId of the earlier request is returned. +// +// If you submit a deletion request for a service-linked role whose linked service +// is still accessing a resource, then the deletion task fails. If it fails, +// the GetServiceLinkedRoleDeletionStatus API operation returns the reason for +// the failure, including the resources that must be deleted. To delete the +// service-linked role, you must first remove those resources from the linked +// service and then submit the deletion request again. Resources are specific +// to the service that is linked to the role. For more information about removing +// resources from a service, see the AWS documentation (http://docs.aws.amazon.com/) +// for your service. +// +// For more information about service-linked roles, see Roles Terms and Concepts: +// AWS Service-Linked Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role) +// in the IAM User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Identity and Access Management's +// API operation DeleteServiceLinkedRole for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error message describes the limit exceeded. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRole +func (c *IAM) DeleteServiceLinkedRole(input *DeleteServiceLinkedRoleInput) (*DeleteServiceLinkedRoleOutput, error) { + req, out := c.DeleteServiceLinkedRoleRequest(input) + return out, req.Send() +} + +// DeleteServiceLinkedRoleWithContext is the same as DeleteServiceLinkedRole with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteServiceLinkedRole for details on how to use this API operation. +// +// 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 *IAM) DeleteServiceLinkedRoleWithContext(ctx aws.Context, input *DeleteServiceLinkedRoleInput, opts ...request.Option) (*DeleteServiceLinkedRoleOutput, error) { + req, out := c.DeleteServiceLinkedRoleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteServiceSpecificCredential = "DeleteServiceSpecificCredential" // DeleteServiceSpecificCredentialRequest generates a "aws/request.Request" representing the @@ -6569,6 +6688,98 @@ func (c *IAM) GetServerCertificateWithContext(ctx aws.Context, input *GetServerC return out, req.Send() } +const opGetServiceLinkedRoleDeletionStatus = "GetServiceLinkedRoleDeletionStatus" + +// GetServiceLinkedRoleDeletionStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetServiceLinkedRoleDeletionStatus operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetServiceLinkedRoleDeletionStatus for more information on using the GetServiceLinkedRoleDeletionStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetServiceLinkedRoleDeletionStatusRequest method. +// req, resp := client.GetServiceLinkedRoleDeletionStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatus +func (c *IAM) GetServiceLinkedRoleDeletionStatusRequest(input *GetServiceLinkedRoleDeletionStatusInput) (req *request.Request, output *GetServiceLinkedRoleDeletionStatusOutput) { + op := &request.Operation{ + Name: opGetServiceLinkedRoleDeletionStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetServiceLinkedRoleDeletionStatusInput{} + } + + output = &GetServiceLinkedRoleDeletionStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetServiceLinkedRoleDeletionStatus API operation for AWS Identity and Access Management. +// +// Retrieves the status of your service-linked role deletion. After you use +// the DeleteServiceLinkedRole API operation to submit a service-linked role +// for deletion, you can use the DeletionTaskId parameter in GetServiceLinkedRoleDeletionStatus +// to check the status of the deletion. If the deletion fails, this operation +// returns the reason that it failed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Identity and Access Management's +// API operation GetServiceLinkedRoleDeletionStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatus +func (c *IAM) GetServiceLinkedRoleDeletionStatus(input *GetServiceLinkedRoleDeletionStatusInput) (*GetServiceLinkedRoleDeletionStatusOutput, error) { + req, out := c.GetServiceLinkedRoleDeletionStatusRequest(input) + return out, req.Send() +} + +// GetServiceLinkedRoleDeletionStatusWithContext is the same as GetServiceLinkedRoleDeletionStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetServiceLinkedRoleDeletionStatus for details on how to use this API operation. +// +// 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 *IAM) GetServiceLinkedRoleDeletionStatusWithContext(ctx aws.Context, input *GetServiceLinkedRoleDeletionStatusInput, opts ...request.Option) (*GetServiceLinkedRoleDeletionStatusOutput, error) { + req, out := c.GetServiceLinkedRoleDeletionStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetUser = "GetUser" // GetUserRequest generates a "aws/request.Request" representing the @@ -11227,7 +11438,7 @@ func (c *IAM) SimulateCustomPolicyRequest(input *SimulateCustomPolicyInput) (req // // * ErrCodePolicyEvaluationException "PolicyEvaluation" // The request failed because a provided policy could not be successfully evaluated. -// An additional detail message indicates the source of the failure. +// An additional detailed message indicates the source of the failure. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulateCustomPolicy func (c *IAM) SimulateCustomPolicy(input *SimulateCustomPolicyInput) (*SimulatePolicyResponse, error) { @@ -11397,7 +11608,7 @@ func (c *IAM) SimulatePrincipalPolicyRequest(input *SimulatePrincipalPolicyInput // // * ErrCodePolicyEvaluationException "PolicyEvaluation" // The request failed because a provided policy could not be successfully evaluated. -// An additional detail message indicates the source of the failure. +// An additional detailed message indicates the source of the failure. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulatePrincipalPolicy func (c *IAM) SimulatePrincipalPolicy(input *SimulatePrincipalPolicyInput) (*SimulatePolicyResponse, error) { @@ -14612,7 +14823,7 @@ type CreatePolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -15751,7 +15962,7 @@ type DeleteGroupPolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -16212,7 +16423,7 @@ type DeleteRolePolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -16487,6 +16698,75 @@ func (s DeleteServerCertificateOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRoleRequest +type DeleteServiceLinkedRoleInput struct { + _ struct{} `type:"structure"` + + // The name of the service-linked role to be deleted. + // + // RoleName is a required field + RoleName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteServiceLinkedRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceLinkedRoleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteServiceLinkedRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteServiceLinkedRoleInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRoleName sets the RoleName field's value. +func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinkedRoleInput { + s.RoleName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRoleResponse +type DeleteServiceLinkedRoleOutput struct { + _ struct{} `type:"structure"` + + // The deletion task identifier that you can use to check the status of the + // deletion. This identifier is returned in the format task/aws-service-role///. + // + // DeletionTaskId is a required field + DeletionTaskId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteServiceLinkedRoleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceLinkedRoleOutput) GoString() string { + return s.String() +} + +// SetDeletionTaskId sets the DeletionTaskId field's value. +func (s *DeleteServiceLinkedRoleOutput) SetDeletionTaskId(v string) *DeleteServiceLinkedRoleOutput { + s.DeletionTaskId = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceSpecificCredentialRequest type DeleteServiceSpecificCredentialInput struct { _ struct{} `type:"structure"` @@ -16713,7 +16993,7 @@ type DeleteUserPolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -16850,6 +17130,48 @@ func (s DeleteVirtualMFADeviceOutput) GoString() string { return s.String() } +// The reason that the service-linked role deletion failed. +// +// This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus +// operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletionTaskFailureReasonType +type DeletionTaskFailureReasonType struct { + _ struct{} `type:"structure"` + + // A short description of the reason that the service-linked role deletion failed. + Reason *string `type:"string"` + + // A list of objects that contains details about the service-linked role deletion + // failure. If the service-linked role has active sessions or if any resources + // that were used by the role have not been deleted from the linked service, + // the role can't be deleted. This parameter includes a list of the resources + // that are associated with the role and the region in which the resources are + // being used. + RoleUsageList []*RoleUsageType `type:"list"` +} + +// String returns the string representation +func (s DeletionTaskFailureReasonType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletionTaskFailureReasonType) GoString() string { + return s.String() +} + +// SetReason sets the Reason field's value. +func (s *DeletionTaskFailureReasonType) SetReason(v string) *DeletionTaskFailureReasonType { + s.Reason = &v + return s +} + +// SetRoleUsageList sets the RoleUsageList field's value. +func (s *DeletionTaskFailureReasonType) SetRoleUsageList(v []*RoleUsageType) *DeletionTaskFailureReasonType { + s.RoleUsageList = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachGroupPolicyRequest type DetachGroupPolicyInput struct { _ struct{} `type:"structure"` @@ -18073,7 +18395,7 @@ type GetGroupPolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -18666,7 +18988,7 @@ type GetRolePolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -19045,6 +19367,84 @@ func (s *GetServerCertificateOutput) SetServerCertificate(v *ServerCertificate) return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatusRequest +type GetServiceLinkedRoleDeletionStatusInput struct { + _ struct{} `type:"structure"` + + // The deletion task identifier. This identifier is returned by the DeleteServiceLinkedRole + // operation in the format task/aws-service-role///. + // + // DeletionTaskId is a required field + DeletionTaskId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetServiceLinkedRoleDeletionStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceLinkedRoleDeletionStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetServiceLinkedRoleDeletionStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetServiceLinkedRoleDeletionStatusInput"} + if s.DeletionTaskId == nil { + invalidParams.Add(request.NewErrParamRequired("DeletionTaskId")) + } + if s.DeletionTaskId != nil && len(*s.DeletionTaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeletionTaskId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeletionTaskId sets the DeletionTaskId field's value. +func (s *GetServiceLinkedRoleDeletionStatusInput) SetDeletionTaskId(v string) *GetServiceLinkedRoleDeletionStatusInput { + s.DeletionTaskId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatusResponse +type GetServiceLinkedRoleDeletionStatusOutput struct { + _ struct{} `type:"structure"` + + // An object that contains details about the reason the deletion failed. + Reason *DeletionTaskFailureReasonType `type:"structure"` + + // The status of the deletion. + // + // Status is a required field + Status *string `type:"string" required:"true" enum:"DeletionTaskStatusType"` +} + +// String returns the string representation +func (s GetServiceLinkedRoleDeletionStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceLinkedRoleDeletionStatusOutput) GoString() string { + return s.String() +} + +// SetReason sets the Reason field's value. +func (s *GetServiceLinkedRoleDeletionStatusOutput) SetReason(v *DeletionTaskFailureReasonType) *GetServiceLinkedRoleDeletionStatusOutput { + s.Reason = v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetServiceLinkedRoleDeletionStatusOutput) SetStatus(v string) *GetServiceLinkedRoleDeletionStatusOutput { + s.Status = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUserRequest type GetUserInput struct { _ struct{} `type:"structure"` @@ -19122,7 +19522,7 @@ type GetUserPolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -20465,6 +20865,10 @@ type ListGroupPoliciesOutput struct { // A list of policy names. // + // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@-+ + // // PolicyNames is a required field PolicyNames []*string `type:"list" required:"true"` } @@ -23482,7 +23886,7 @@ type PutGroupPolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -23579,7 +23983,7 @@ type PutRolePolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -23685,7 +24089,7 @@ type PutUserPolicyInput struct { // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@- + // with no spaces. You can also include any of the following characters: =,.@-+ // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -24520,6 +24924,43 @@ func (s *RoleDetail) SetRolePolicyList(v []*PolicyDetail) *RoleDetail { return s } +// An object that contains details about how a service-linked role is used. +// +// This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus +// operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RoleUsageType +type RoleUsageType struct { + _ struct{} `type:"structure"` + + // The name of the region where the service-linked role is being used. + Region *string `min:"1" type:"string"` + + // The name of the resource that is using the service-linked role. + Resources []*string `type:"list"` +} + +// String returns the string representation +func (s RoleUsageType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RoleUsageType) GoString() string { + return s.String() +} + +// SetRegion sets the Region field's value. +func (s *RoleUsageType) SetRegion(v string) *RoleUsageType { + s.Region = &v + return s +} + +// SetResources sets the Resources field's value. +func (s *RoleUsageType) SetResources(v []*string) *RoleUsageType { + s.Resources = v + return s +} + // Contains the list of SAML providers for this account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SAMLProviderListEntry type SAMLProviderListEntry struct { @@ -27472,15 +27913,18 @@ type User struct { // a list of AWS websites that capture a user's last sign-in time, see the Credential // Reports (http://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) // topic in the Using IAM guide. If a password is used more than once in a five-minute - // span, only the first use is returned in this field. This field is null (not - // present) when: + // span, only the first use is returned in this field. If the field is null + // (no value) then it indicates that they never signed in with a password. This + // can be because: // - // * The user does not have a password + // * The user never had a password. // - // * The password exists but has never been used (at least not since IAM - // started tracking this information on October 20th, 2014 + // * A password exists but has not been used since IAM started tracking this + // information on October 20th, 2014. // - // * there is no sign-in data associated with the user + // A null does not mean that the user never had a password. Also, if the user + // does not currently have a password, but had one in the past, then this field + // contains the date and time the most recent password was used. // // This value is returned only in the GetUser and ListUsers actions. PasswordLastUsed *time.Time `type:"timestamp" timestampFormat:"iso8601"` @@ -27761,6 +28205,20 @@ const ( ContextKeyTypeEnumDateList = "dateList" ) +const ( + // DeletionTaskStatusTypeSucceeded is a DeletionTaskStatusType enum value + DeletionTaskStatusTypeSucceeded = "SUCCEEDED" + + // DeletionTaskStatusTypeInProgress is a DeletionTaskStatusType enum value + DeletionTaskStatusTypeInProgress = "IN_PROGRESS" + + // DeletionTaskStatusTypeFailed is a DeletionTaskStatusType enum value + DeletionTaskStatusTypeFailed = "FAILED" + + // DeletionTaskStatusTypeNotStarted is a DeletionTaskStatusType enum value + DeletionTaskStatusTypeNotStarted = "NOT_STARTED" +) + const ( // EntityTypeUser is a EntityType enum value EntityTypeUser = "User" diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go index a4900f7f4..d8766fbf6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go @@ -64,7 +64,7 @@ // // Using the Client // -// To AWS Identity and Access Management with the SDK use the New function to create +// To contact AWS Identity and Access Management with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go b/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go index 97ad363c8..470e19b37 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go @@ -144,9 +144,16 @@ const ( // "PolicyEvaluation". // // The request failed because a provided policy could not be successfully evaluated. - // An additional detail message indicates the source of the failure. + // An additional detailed message indicates the source of the failure. ErrCodePolicyEvaluationException = "PolicyEvaluation" + // ErrCodePolicyNotAttachableException for service response error code + // "PolicyNotAttachable". + // + // The request failed because AWS service role policies can only be attached + // to the service-linked role for that service. + ErrCodePolicyNotAttachableException = "PolicyNotAttachable" + // ErrCodeServiceFailureException for service response error code // "ServiceFailure". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go index 729ee506d..e87a644a6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go @@ -14,7 +14,7 @@ // // Using the Client // -// To Amazon Inspector with the SDK use the New function to create +// To contact Amazon Inspector with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go index db01ff3f3..92337e2e6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go @@ -17,7 +17,7 @@ // // Using the Client // -// To AWS IoT with the SDK use the New function to create +// To contact AWS IoT with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go index a9016f212..5e1706c20 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go @@ -13,7 +13,7 @@ // // Using the Client // -// To Amazon Kinesis with the SDK use the New function to create +// To contact Amazon Kinesis with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index ac1c5fda8..ce3fb35be 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go @@ -59,7 +59,8 @@ func (c *KMS) CancelKeyDeletionRequest(input *CancelKeyDeletionInput) (req *requ // // Cancels the deletion of a customer master key (CMK). When this operation // is successful, the CMK is set to the Disabled state. To enable a CMK, use -// EnableKey. +// EnableKey. You cannot perform this operation on a CMK in a different AWS +// account. // // For more information about scheduling and canceling deletion of a CMK, see // Deleting Customer Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) @@ -164,18 +165,29 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, // CreateAlias API operation for AWS Key Management Service. // -// Creates a display name for a customer master key. An alias can be used to -// identify a key and should be unique. The console enforces a one-to-one mapping -// between the alias and a key. An alias name can contain only alphanumeric -// characters, forward slashes (/), underscores (_), and dashes (-). An alias -// must start with the word "alias" followed by a forward slash (alias/). An -// alias that begins with "aws" after the forward slash (alias/aws...) is reserved -// by Amazon Web Services (AWS). +// Creates a display name for a customer master key (CMK). You can use an alias +// to identify a CMK in selected operations, such as Encrypt and GenerateDataKey. // -// The alias and the key it is mapped to must be in the same AWS account and -// the same region. +// Each CMK can have multiple aliases, but each alias points to only one CMK. +// The alias name must be unique in the AWS account and region. To simplify +// code that runs in multiple regions, use the same alias name, but point it +// to a different CMK in each region. // -// To map an alias to a different key, call UpdateAlias. +// Because an alias is not a property of a CMK, you can delete and change the +// aliases of a CMK without affecting the CMK. Also, aliases do not appear in +// the response from the DescribeKey operation. To get the aliases of all CMKs, +// use the ListAliases operation. +// +// An alias must start with the word alias followed by a forward slash (alias/). +// The alias name can contain only alphanumeric characters, forward slashes +// (/), underscores (_), and dashes (-). Alias names cannot begin with aws; +// that alias name prefix is reserved by Amazon Web Services (AWS). +// +// The alias and the CMK it is mapped to must be in the same AWS account and +// the same region. You cannot perform this operation on an alias in a different +// AWS account. +// +// To map an existing alias to a different CMK, call UpdateAlias. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -283,10 +295,13 @@ func (c *KMS) CreateGrantRequest(input *CreateGrantInput) (req *request.Request, // CreateGrant API operation for AWS Key Management Service. // -// Adds a grant to a key to specify who can use the key and under what conditions. -// Grants are alternate permission mechanisms to key policies. +// Adds a grant to a customer master key (CMK). The grant specifies who can +// use the CMK and under what conditions. When setting permissions, grants are +// an alternative to key policies. // -// For more information about grants, see Grants (http://docs.aws.amazon.com/kms/latest/developerguide/grants.html) +// To perform this operation on a CMK in a different AWS account, specify the +// key ARN in the value of the KeyId parameter. For more information about grants, +// see Grants (http://docs.aws.amazon.com/kms/latest/developerguide/grants.html) // in the AWS Key Management Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -397,7 +412,7 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // CreateKey API operation for AWS Key Management Service. // -// Creates a customer master key (CMK). +// Creates a customer master key (CMK) in the caller's AWS account. // // You can use a CMK to encrypt small amounts of data (4 KiB or less) directly, // but CMKs are more commonly used to encrypt data encryption keys (DEKs), which @@ -409,6 +424,8 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // * AWS Key Management Service Concepts (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html) // in the AWS Key Management Service Developer Guide // +// You cannot use this operation to create a CMK in a different AWS account. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -511,7 +528,7 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output // Decrypt API operation for AWS Key Management Service. // // Decrypts ciphertext. Ciphertext is plaintext that has been previously encrypted -// by using any of the following functions: +// by using any of the following operations: // // * GenerateDataKey // @@ -544,8 +561,9 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output // The request was rejected because the specified CMK is not enabled. // // * ErrCodeInvalidCiphertextException "InvalidCiphertextException" -// The request was rejected because the specified ciphertext has been corrupted -// or is otherwise invalid. +// The request was rejected because the specified ciphertext, or additional +// authenticated data incorporated into the ciphertext, such as the encryption +// context, is corrupted, missing, or otherwise invalid. // // * ErrCodeKeyUnavailableException "KeyUnavailableException" // The request was rejected because the specified CMK was not available. The @@ -638,7 +656,17 @@ func (c *KMS) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, // DeleteAlias API operation for AWS Key Management Service. // -// Deletes the specified alias. To map an alias to a different key, call UpdateAlias. +// Deletes the specified alias. You cannot perform this operation on an alias +// in a different AWS account. +// +// Because an alias is not a property of a CMK, you can delete and change the +// aliases of a CMK without affecting the CMK. Also, aliases do not appear in +// the response from the DescribeKey operation. To get the aliases of all CMKs, +// use the ListAliases operation. +// +// Each CMK can have multiple aliases. To change the alias of a CMK, use DeleteAlias +// to delete the current alias and CreateAlias to create a new alias. To associate +// an existing alias with a different customer master key (CMK), call UpdateAlias. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -736,10 +764,11 @@ func (c *KMS) DeleteImportedKeyMaterialRequest(input *DeleteImportedKeyMaterialI // DeleteImportedKeyMaterial API operation for AWS Key Management Service. // -// Deletes key material that you previously imported and makes the specified -// customer master key (CMK) unusable. For more information about importing -// key material into AWS KMS, see Importing Key Material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) -// in the AWS Key Management Service Developer Guide. +// Deletes key material that you previously imported. This operation makes the +// specified customer master key (CMK) unusable. For more information about +// importing key material into AWS KMS, see Importing Key Material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) +// in the AWS Key Management Service Developer Guide. You cannot perform this +// operation on a CMK in a different AWS account. // // When the specified CMK is in the PendingDeletion state, this operation does // not change the CMK's state. Otherwise, it changes the CMK's state to PendingImport. @@ -848,7 +877,10 @@ func (c *KMS) DescribeKeyRequest(input *DescribeKeyInput) (req *request.Request, // DescribeKey API operation for AWS Key Management Service. // -// Provides detailed information about the specified customer master key. +// Provides detailed information about the specified customer master key (CMK). +// +// To perform this operation on a CMK in a different AWS account, specify the +// key ARN or alias ARN in the value of the KeyId parameter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -942,9 +974,11 @@ func (c *KMS) DisableKeyRequest(input *DisableKeyInput) (req *request.Request, o // DisableKey API operation for AWS Key Management Service. // // Sets the state of a customer master key (CMK) to disabled, thereby preventing -// its use for cryptographic operations. For more information about how key -// state affects the use of a CMK, see How Key State Affects the Use of a Customer -// Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// its use for cryptographic operations. You cannot perform this operation on +// a CMK in a different AWS account. +// +// For more information about how key state affects the use of a CMK, see How +// Key State Affects the Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1046,7 +1080,9 @@ func (c *KMS) DisableKeyRotationRequest(input *DisableKeyRotationInput) (req *re // DisableKeyRotation API operation for AWS Key Management Service. // -// Disables rotation of the specified key. +// Disables automatic rotation of the key material for the specified customer +// master key (CMK). You cannot perform this operation on a CMK in a different +// AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1154,7 +1190,9 @@ func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, out // EnableKey API operation for AWS Key Management Service. // -// Marks a key as enabled, thereby permitting its use. +// Sets the state of a customer master key (CMK) to enabled, thereby permitting +// its use for cryptographic operations. You cannot perform this operation on +// a CMK in a different AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1260,7 +1298,9 @@ func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *requ // EnableKeyRotation API operation for AWS Key Management Service. // -// Enables rotation of the specified customer master key. +// Enables automatic rotation of the key material for the specified customer +// master key (CMK). You cannot perform this operation on a CMK in a different +// AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1366,26 +1406,29 @@ func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output // Encrypt API operation for AWS Key Management Service. // -// Encrypts plaintext into ciphertext by using a customer master key. The Encrypt -// function has two primary use cases: +// Encrypts plaintext into ciphertext by using a customer master key (CMK). +// The Encrypt operation has two primary use cases: // -// * You can encrypt up to 4 KB of arbitrary data such as an RSA key, a database -// password, or other sensitive customer information. +// * You can encrypt up to 4 kilobytes (4096 bytes) of arbitrary data such +// as an RSA key, a database password, or other sensitive information. // -// * If you are moving encrypted data from one region to another, you can -// use this API to encrypt in the new region the plaintext data key that -// was used to encrypt the data in the original region. This provides you -// with an encrypted copy of the data key that can be decrypted in the new -// region and used there to decrypt the encrypted data. +// * To move encrypted data from one AWS region to another, you can use this +// operation to encrypt in the new region the plaintext data key that was +// used to encrypt the data in the original region. This provides you with +// an encrypted copy of the data key that can be decrypted in the new region +// and used there to decrypt the encrypted data. +// +// To perform this operation on a CMK in a different AWS account, specify the +// key ARN or alias ARN in the value of the KeyId parameter. // // Unless you are moving encrypted data from one region to another, you don't -// use this function to encrypt a generated data key within a region. You retrieve -// data keys already encrypted by calling the GenerateDataKey or GenerateDataKeyWithoutPlaintext -// function. Data keys don't need to be encrypted again by calling Encrypt. +// use this operation to encrypt a generated data key within a region. To get +// data keys that are already encrypted, call the GenerateDataKey or GenerateDataKeyWithoutPlaintext +// operation. Data keys don't need to be encrypted again by calling Encrypt. // -// If you want to encrypt data locally in your application, you can use the -// GenerateDataKey function to return a plaintext data encryption key and a -// copy of the key encrypted under the customer master key (CMK) of your choosing. +// To encrypt data locally in your application, use the GenerateDataKey operation +// to return a plaintext data encryption key and a copy of the key encrypted +// under the CMK of your choosing. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1501,7 +1544,9 @@ func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request. // data key. You must also specify the length of the data key using either the // KeySpec or NumberOfBytes field. You must specify one field or the other, // but not both. For common key lengths (128-bit and 256-bit symmetric keys), -// we recommend that you use KeySpec. +// we recommend that you use KeySpec. To perform this operation on a CMK in +// a different AWS account, specify the key ARN or alias ARN in the value of +// the KeyId parameter. // // This operation returns a plaintext copy of the data key in the Plaintext // field of the response, and an encrypted copy of the data key in the CiphertextBlob @@ -1511,7 +1556,7 @@ func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request. // We recommend that you use the following pattern to encrypt data locally in // your application: // -// Use this operation (GenerateDataKey) to retrieve a data encryption key. +// Use this operation (GenerateDataKey) to get a data encryption key. // // Use the plaintext data encryption key (returned in the Plaintext field of // the response) to encrypt data locally, then erase the plaintext data key @@ -1650,6 +1695,9 @@ func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWitho // This operation is identical to GenerateDataKey but returns only the encrypted // copy of the data key. // +// To perform this operation on a CMK in a different AWS account, specify the +// key ARN or alias ARN in the value of the KeyId parameter. +// // This operation is useful in a system that has multiple components with different // degrees of trust. For example, consider a system that stores encrypted data // in containers. Each container stores the encrypted data and an encrypted @@ -1857,7 +1905,8 @@ func (c *KMS) GetKeyPolicyRequest(input *GetKeyPolicyInput) (req *request.Reques // GetKeyPolicy API operation for AWS Key Management Service. // -// Retrieves a policy attached to the specified key. +// Gets a key policy attached to the specified customer master key (CMK). You +// cannot perform this operation on a CMK in a different AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1956,8 +2005,11 @@ func (c *KMS) GetKeyRotationStatusRequest(input *GetKeyRotationStatusInput) (req // GetKeyRotationStatus API operation for AWS Key Management Service. // -// Retrieves a Boolean value that indicates whether key rotation is enabled -// for the specified key. +// Gets a Boolean value that indicates whether automatic rotation of the key +// material is enabled for the specified customer master key (CMK). +// +// To perform this operation on a CMK in a different AWS account, specify the +// key ARN in the value of the KeyId parameter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2068,14 +2120,15 @@ func (c *KMS) GetParametersForImportRequest(input *GetParametersForImportInput) // You must specify the key ID of the customer master key (CMK) into which you // will import key material. This CMK's Origin must be EXTERNAL. You must also // specify the wrapping algorithm and type of wrapping key (public key) that -// you will use to encrypt the key material. +// you will use to encrypt the key material. You cannot perform this operation +// on a CMK in a different AWS account. // // This operation returns a public key and an import token. Use the public key // to encrypt the key material. Store the import token to send with a subsequent // ImportKeyMaterial request. The public key and import token from the same -// response must be used together. These items are valid for 24 hours, after -// which they cannot be used for a subsequent ImportKeyMaterial request. To -// retrieve new ones, send another GetParametersForImport request. +// response must be used together. These items are valid for 24 hours. When +// they expire, they cannot be used for a subsequent ImportKeyMaterial request. +// To get new ones, send another GetParametersForImport request. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2178,27 +2231,42 @@ func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *requ // ImportKeyMaterial API operation for AWS Key Management Service. // -// Imports key material into an AWS KMS customer master key (CMK) from your -// existing key management infrastructure. For more information about importing -// key material into AWS KMS, see Importing Key Material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) +// Imports key material into an existing AWS KMS customer master key (CMK) that +// was created without key material. You cannot perform this operation on a +// CMK in a different AWS account. For more information about creating CMKs +// with no key material and then importing key material, see Importing Key Material +// (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) // in the AWS Key Management Service Developer Guide. // -// You must specify the key ID of the CMK to import the key material into. This -// CMK's Origin must be EXTERNAL. You must also send an import token and the -// encrypted key material. Send the import token that you received in the same -// GetParametersForImport response that contained the public key that you used -// to encrypt the key material. You must also specify whether the key material -// expires and if so, when. When the key material expires, AWS KMS deletes the -// key material and the CMK becomes unusable. To use the CMK again, you can -// reimport the same key material. If you set an expiration date, you can change -// it only by reimporting the same key material and specifying a new expiration -// date. +// Before using this operation, call GetParametersForImport. Its response includes +// a public key and an import token. Use the public key to encrypt the key material. +// Then, submit the import token from the same GetParametersForImport response. // -// When this operation is successful, the specified CMK's key state changes -// to Enabled, and you can use the CMK. +// When calling this operation, you must specify the following values: // -// After you successfully import key material into a CMK, you can reimport the -// same key material into that CMK, but you cannot import different key material. +// * The key ID or key ARN of a CMK with no key material. Its Origin must +// be EXTERNAL. +// +// To create a CMK with no key material, call CreateKey and set the value of +// its Origin parameter to EXTERNAL. To get the Origin of a CMK, call DescribeKey.) +// +// * The encrypted key material. To get the public key to encrypt the key +// material, call GetParametersForImport. +// +// * The import token that GetParametersForImport returned. This token and +// the public key used to encrypt the key material must have come from the +// same response. +// +// * Whether the key material expires and if so, when. If you set an expiration +// date, you can change it only by reimporting the same key material and +// specifying a new expiration date. If the key material expires, AWS KMS +// deletes the key material and the CMK becomes unusable. To use the CMK +// again, you must reimport the same key material. +// +// When this operation is successful, the CMK's key state changes from PendingImport +// to Enabled, and you can use the CMK. After you successfully import key material +// into a CMK, you can reimport the same key material into that CMK, but you +// cannot import different key material. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2236,8 +2304,9 @@ func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *requ // in the AWS Key Management Service Developer Guide. // // * ErrCodeInvalidCiphertextException "InvalidCiphertextException" -// The request was rejected because the specified ciphertext has been corrupted -// or is otherwise invalid. +// The request was rejected because the specified ciphertext, or additional +// authenticated data incorporated into the ciphertext, such as the encryption +// context, is corrupted, missing, or otherwise invalid. // // * ErrCodeIncorrectKeyMaterialException "IncorrectKeyMaterialException" // The request was rejected because the provided key material is invalid or @@ -2246,9 +2315,8 @@ func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *requ // // * ErrCodeExpiredImportTokenException "ExpiredImportTokenException" // The request was rejected because the provided import token is expired. Use -// GetParametersForImport to retrieve a new import token and public key, use -// the new public key to encrypt the key material, and then try the request -// again. +// GetParametersForImport to get a new import token and public key, use the +// new public key to encrypt the key material, and then try the request again. // // * ErrCodeInvalidImportTokenException "InvalidImportTokenException" // The request was rejected because the provided import token is invalid or @@ -2326,7 +2394,14 @@ func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, // ListAliases API operation for AWS Key Management Service. // -// Lists all of the key aliases in the account. +// Gets a list of all aliases in the caller's AWS account and region. You cannot +// list aliases in other accounts. For more information about aliases, see CreateAlias. +// +// The response might include several aliases that do not have a TargetKeyId +// field because they are not associated with a CMK. These are predefined aliases +// that are reserved for CMKs managed by AWS services. If an alias is not associated +// with a CMK, the alias does not count against the alias limit (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit) +// for your account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2470,7 +2545,10 @@ func (c *KMS) ListGrantsRequest(input *ListGrantsInput) (req *request.Request, o // ListGrants API operation for AWS Key Management Service. // -// List the grants for a specified key. +// Gets a list of all grants for the specified customer master key (CMK). +// +// To perform this operation on a CMK in a different AWS account, specify the +// key ARN in the value of the KeyId parameter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2629,7 +2707,10 @@ func (c *KMS) ListKeyPoliciesRequest(input *ListKeyPoliciesInput) (req *request. // ListKeyPolicies API operation for AWS Key Management Service. // -// Retrieves a list of policies attached to a key. +// Gets the names of the key policies that are attached to a customer master +// key (CMK). This operation is designed to get policy names that you can use +// in a GetKeyPolicy operation. However, the only valid policy name is default. +// You cannot perform this operation on a CMK in a different AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2784,7 +2865,8 @@ func (c *KMS) ListKeysRequest(input *ListKeysInput) (req *request.Request, outpu // ListKeys API operation for AWS Key Management Service. // -// Lists the customer master keys. +// Gets a list of all customer master keys (CMKs) in the caller's AWS account +// and region. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2924,6 +3006,8 @@ func (c *KMS) ListResourceTagsRequest(input *ListResourceTagsInput) (req *reques // // Returns a list of all tags for the specified customer master key (CMK). // +// You cannot perform this operation on a CMK in a different AWS account. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3114,7 +3198,8 @@ func (c *KMS) PutKeyPolicyRequest(input *PutKeyPolicyInput) (req *request.Reques // PutKeyPolicy API operation for AWS Key Management Service. // -// Attaches a key policy to the specified customer master key (CMK). +// Attaches a key policy to the specified customer master key (CMK). You cannot +// perform this operation on a CMK in a different AWS account. // // For more information about key policies, see Key Policies (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) // in the AWS Key Management Service Developer Guide. @@ -3234,6 +3319,8 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // decrypted and then reencrypted. You can also use this operation to change // the encryption context of a ciphertext. // +// You can reencrypt data using CMKs in different AWS accounts. +// // Unlike other operations, ReEncrypt is authorized twice, once as ReEncryptFrom // on the source CMK and once as ReEncryptTo on the destination CMK. We recommend // that you include the "kms:ReEncrypt*" permission in your key policies (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) @@ -3258,8 +3345,9 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // The request was rejected because the specified CMK is not enabled. // // * ErrCodeInvalidCiphertextException "InvalidCiphertextException" -// The request was rejected because the specified ciphertext has been corrupted -// or is otherwise invalid. +// The request was rejected because the specified ciphertext, or additional +// authenticated data incorporated into the ciphertext, such as the encryption +// context, is corrupted, missing, or otherwise invalid. // // * ErrCodeKeyUnavailableException "KeyUnavailableException" // The request was rejected because the specified CMK was not available. The @@ -3474,8 +3562,11 @@ func (c *KMS) RevokeGrantRequest(input *RevokeGrantInput) (req *request.Request, // RevokeGrant API operation for AWS Key Management Service. // -// Revokes a grant. You can revoke a grant to actively deny operations that -// depend on it. +// Revokes the specified grant for the specified customer master key (CMK). +// You can revoke a grant to actively deny operations that depend on it. +// +// To perform this operation on a CMK in a different AWS account, specify the +// key ARN in the value of the KeyId parameter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3586,6 +3677,8 @@ func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req * // and all AWS KMS data associated with it, including all aliases that refer // to it. // +// You cannot perform this operation on a CMK in a different AWS account. +// // Deleting a CMK is a destructive and potentially dangerous operation. When // a CMK is deleted, all data that was encrypted under the CMK is rendered unrecoverable. // To restrict the use of a CMK without deleting it, use DisableKey. @@ -3694,7 +3787,7 @@ func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, // TagResource API operation for AWS Key Management Service. // // Adds or overwrites one or more tags for the specified customer master key -// (CMK). +// (CMK). You cannot perform this operation on a CMK in a different AWS account. // // Each tag consists of a tag key and a tag value. Tag keys and tag values are // both required, but tag values can be empty (null) strings. @@ -3705,6 +3798,10 @@ func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, // value of Prod, it does not create a second tag. Instead, the original tag // is overwritten with the new tag value. // +// For information about the rules that apply to tag keys and tag values, see +// User-Defined Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) +// in the AWS Billing and Cost Management User Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3809,7 +3906,7 @@ func (c *KMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Requ // UntagResource API operation for AWS Key Management Service. // // Removes the specified tag or tags from the specified customer master key -// (CMK). +// (CMK). You cannot perform this operation on a CMK in a different AWS account. // // To remove a tag, you specify the tag key for each tag to remove. You do not // specify the tag value. To overwrite the tag value for an existing tag, use @@ -3913,19 +4010,26 @@ func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, // UpdateAlias API operation for AWS Key Management Service. // -// Updates an alias to map it to a different key. +// Associates an existing alias with a different customer master key (CMK). +// Each CMK can have multiple aliases, but the aliases must be unique within +// the account and region. You cannot perform this operation on an alias in +// a different AWS account. // -// An alias is not a property of a key. Therefore, an alias can be mapped to -// and unmapped from an existing key without changing the properties of the -// key. +// This operation works only on existing aliases. To change the alias of a CMK +// to a new value, use CreateAlias to create a new alias and DeleteAlias to +// delete the old alias. +// +// Because an alias is not a property of a CMK, you can create, update, and +// delete the aliases of a CMK without affecting the CMK. Also, aliases do not +// appear in the response from the DescribeKey operation. To get the aliases +// of all CMKs in the account, use the ListAliases operation. // // An alias name can contain only alphanumeric characters, forward slashes (/), -// underscores (_), and dashes (-). An alias must start with the word "alias" -// followed by a forward slash (alias/). An alias that begins with "aws" after -// the forward slash (alias/aws...) is reserved by Amazon Web Services (AWS). -// -// The alias and the key it is mapped to must be in the same AWS account and -// the same region. +// underscores (_), and dashes (-). An alias must start with the word alias +// followed by a forward slash (alias/). The alias name can contain only alphanumeric +// characters, forward slashes (/), underscores (_), and dashes (-). Alias names +// cannot begin with aws; that alias name prefix is reserved by Amazon Web Services +// (AWS). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4023,7 +4127,10 @@ func (c *KMS) UpdateKeyDescriptionRequest(input *UpdateKeyDescriptionInput) (req // UpdateKeyDescription API operation for AWS Key Management Service. // -// Updates the description of a customer master key (CMK). +// Updates the description of a customer master key (CMK). To see the decription +// of a CMK, use DescribeKey. +// +// You cannot perform this operation on a CMK in a different AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4128,15 +4235,15 @@ type CancelKeyDeletionInput struct { // The unique identifier for the customer master key (CMK) for which to cancel // deletion. // - // To specify this value, use the unique key ID or the Amazon Resource Name - // (ARN) of the CMK. Examples: + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // - // To obtain the unique key ID and key ARN for a given CMK, use ListKeys or - // DescribeKey. + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -4209,13 +4316,18 @@ type CreateAliasInput struct { // AliasName is a required field AliasName *string `min:"1" type:"string" required:"true"` - // An identifier of the key for which you are creating the alias. This value - // cannot be another alias but can be a globally unique identifier or a fully - // specified ARN to a key. + // Identifies the CMK for which you are creating the alias. This value cannot + // be an alias. // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // TargetKeyId is a required field TargetKeyId *string `min:"1" type:"string" required:"true"` @@ -4312,12 +4424,16 @@ type CreateGrantInput struct { // The unique identifier for the customer master key (CMK) that the grant applies // to. // - // To specify this value, use the globally unique key ID or the Amazon Resource - // Name (ARN) of the key. Examples: + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify + // a CMK in a different AWS account, you must use the key ARN. // - // * Globally unique key ID: 12345678-1234-1234-1234-123456789012 + // For example: // - // * Key ARN: arn:aws:kms:us-west-2:123456789012:key/12345678-1234-1234-1234-123456789012 + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -4337,7 +4453,9 @@ type CreateGrantInput struct { Name *string `min:"1" type:"string"` // A list of operations that the grant permits. - Operations []*string `type:"list"` + // + // Operations is a required field + Operations []*string `type:"list" required:"true"` // The principal that is given permission to retire the grant by using RetireGrant // operation. @@ -4379,6 +4497,9 @@ func (s *CreateGrantInput) Validate() error { if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } + if s.Operations == nil { + invalidParams.Add(request.NewErrParamRequired("Operations")) + } if s.RetiringPrincipal != nil && len(*s.RetiringPrincipal) < 1 { invalidParams.Add(request.NewErrParamMinLen("RetiringPrincipal", 1)) } @@ -4534,7 +4655,7 @@ type CreateKeyInput struct { // the CMK. For more information, see Default Key Policy (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) // in the AWS Key Management Service Developer Guide. // - // The policy size limit is 32 KiB (32768 bytes). + // The policy size limit is 32 kilobytes (32768 bytes). Policy *string `min:"1" type:"string"` // One or more tags. Each tag consists of a tag key and a tag value. Tag keys @@ -4713,8 +4834,8 @@ type DecryptOutput struct { // no errors are encountered during the operation. KeyId *string `min:"1" type:"string"` - // Decrypted plaintext data. This value may not be returned if the customer - // master key is not available or if you didn't have permission to use it. + // Decrypted plaintext data. When you use the HTTP API or the AWS CLI, the value + // is Base64-encoded. Otherwise, it is not encoded. // // Plaintext is automatically base64 encoded/decoded by the SDK. Plaintext []byte `min:"1" type:"blob"` @@ -4747,7 +4868,7 @@ type DeleteAliasInput struct { _ struct{} `type:"structure"` // The alias to be deleted. The name must start with the word "alias" followed - // by a forward slash (alias/). Aliases that begin with "alias/AWS" are reserved. + // by a forward slash (alias/). Aliases that begin with "alias/aws" are reserved. // // AliasName is a required field AliasName *string `min:"1" type:"string" required:"true"` @@ -4807,13 +4928,16 @@ type DeleteImportedKeyMaterialInput struct { // The identifier of the CMK whose key material to delete. The CMK's Origin // must be EXTERNAL. // - // A valid identifier is the unique key ID or the Amazon Resource Name (ARN) - // of the CMK. Examples: + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` } @@ -4875,17 +4999,24 @@ type DescribeKeyInput struct { // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` - // A unique identifier for the customer master key. This value can be a globally - // unique identifier, a fully specified ARN to either an alias or a key, or - // an alias name prefixed by "alias/". + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, + // or alias ARN. When using an alias name, prefix it with "alias/". To specify + // a CMK in a different AWS account, you must use the key ARN or alias ARN. // - // * Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName + // For example: // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // - // * Alias Name Example - alias/MyAliasName + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Alias name: alias/ExampleAlias + // + // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To + // get the alias name and alias ARN, use ListAliases. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -4957,13 +5088,17 @@ func (s *DescribeKeyOutput) SetKeyMetadata(v *KeyMetadata) *DescribeKeyOutput { type DisableKeyInput struct { _ struct{} `type:"structure"` - // A unique identifier for the CMK. + // A unique identifier for the customer master key (CMK). // - // Use the CMK's unique identifier or its Amazon Resource Name (ARN). For example: + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Unique ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: // - // * ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5020,12 +5155,17 @@ func (s DisableKeyOutput) GoString() string { type DisableKeyRotationInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key. This value can be a globally - // unique identifier or the fully specified ARN to a key. + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5082,12 +5222,17 @@ func (s DisableKeyRotationOutput) GoString() string { type EnableKeyInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key. This value can be a globally - // unique identifier or the fully specified ARN to a key. + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5144,12 +5289,17 @@ func (s EnableKeyOutput) GoString() string { type EnableKeyRotationInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key. This value can be a globally - // unique identifier or the fully specified ARN to a key. + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5218,17 +5368,24 @@ type EncryptInput struct { // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` - // A unique identifier for the customer master key. This value can be a globally - // unique identifier, a fully specified ARN to either an alias or a key, or - // an alias name prefixed by "alias/". + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, + // or alias ARN. When using an alias name, prefix it with "alias/". To specify + // a CMK in a different AWS account, you must use the key ARN or alias ARN. // - // * Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName + // For example: // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // - // * Alias Name Example - alias/MyAliasName + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Alias name: alias/ExampleAlias + // + // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To + // get the alias name and alias ARN, use ListAliases. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5301,8 +5458,8 @@ func (s *EncryptInput) SetPlaintext(v []byte) *EncryptInput { type EncryptOutput struct { _ struct{} `type:"structure"` - // The encrypted plaintext. If you are using the CLI, the value is Base64 encoded. - // Otherwise, it is not encoded. + // The encrypted plaintext. When you use the HTTP API or the AWS CLI, the value + // is Base64-encoded. Otherwise, it is not encoded. // // CiphertextBlob is automatically base64 encoded/decoded by the SDK. CiphertextBlob []byte `min:"1" type:"blob"` @@ -5352,18 +5509,23 @@ type GenerateDataKeyInput struct { // The identifier of the CMK under which to generate and encrypt the data encryption // key. // - // A valid identifier is the unique key ID or the Amazon Resource Name (ARN) - // of the CMK, or the alias name or ARN of an alias that refers to the CMK. - // Examples: + // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, + // or alias ARN. When using an alias name, prefix it with "alias/". To specify + // a CMK in a different AWS account, you must use the key ARN or alias ARN. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: // - // * CMK ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // // * Alias name: alias/ExampleAlias // // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To + // get the alias name and alias ARN, use ListAliases. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5441,7 +5603,8 @@ func (s *GenerateDataKeyInput) SetNumberOfBytes(v int64) *GenerateDataKeyInput { type GenerateDataKeyOutput struct { _ struct{} `type:"structure"` - // The encrypted data encryption key. + // The encrypted data encryption key. When you use the HTTP API or the AWS CLI, + // the value is Base64-encoded. Otherwise, it is not encoded. // // CiphertextBlob is automatically base64 encoded/decoded by the SDK. CiphertextBlob []byte `min:"1" type:"blob"` @@ -5450,8 +5613,9 @@ type GenerateDataKeyOutput struct { // and encrypted. KeyId *string `min:"1" type:"string"` - // The data encryption key. Use this data key for local encryption and decryption, - // then remove it from memory as soon as possible. + // The data encryption key. When you use the HTTP API or the AWS CLI, the value + // is Base64-encoded. Otherwise, it is not encoded. Use this data key for local + // encryption and decryption, then remove it from memory as soon as possible. // // Plaintext is automatically base64 encoded/decoded by the SDK. Plaintext []byte `min:"1" type:"blob"` @@ -5501,21 +5665,26 @@ type GenerateDataKeyWithoutPlaintextInput struct { // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` - // The identifier of the CMK under which to generate and encrypt the data encryption - // key. + // The identifier of the customer master key (CMK) under which to generate and + // encrypt the data encryption key. // - // A valid identifier is the unique key ID or the Amazon Resource Name (ARN) - // of the CMK, or the alias name or ARN of an alias that refers to the CMK. - // Examples: + // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, + // or alias ARN. When using an alias name, prefix it with "alias/". To specify + // a CMK in a different AWS account, you must use the key ARN or alias ARN. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: // - // * CMK ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // // * Alias name: alias/ExampleAlias // // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To + // get the alias name and alias ARN, use ListAliases. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5593,7 +5762,8 @@ func (s *GenerateDataKeyWithoutPlaintextInput) SetNumberOfBytes(v int64) *Genera type GenerateDataKeyWithoutPlaintextOutput struct { _ struct{} `type:"structure"` - // The encrypted data encryption key. + // The encrypted data encryption key. When you use the HTTP API or the AWS CLI, + // the value is Base64-encoded. Otherwise, it is not encoded. // // CiphertextBlob is automatically base64 encoded/decoded by the SDK. CiphertextBlob []byte `min:"1" type:"blob"` @@ -5666,7 +5836,8 @@ func (s *GenerateRandomInput) SetNumberOfBytes(v int64) *GenerateRandomInput { type GenerateRandomOutput struct { _ struct{} `type:"structure"` - // The random byte string. + // The random byte string. When you use the HTTP API or the AWS CLI, the value + // is Base64-encoded. Otherwise, it is not encoded. // // Plaintext is automatically base64 encoded/decoded by the SDK. Plaintext []byte `min:"1" type:"blob"` @@ -5692,18 +5863,23 @@ func (s *GenerateRandomOutput) SetPlaintext(v []byte) *GenerateRandomOutput { type GetKeyPolicyInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key. This value can be a globally - // unique identifier or the fully specified ARN to a key. + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // String that contains the name of the policy. Currently, this must be "default". - // Policy names can be discovered by calling ListKeyPolicies. + // Specifies the name of the policy. The only valid name is default. To get + // the names of key policies, use ListKeyPolicies. // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -5781,12 +5957,18 @@ func (s *GetKeyPolicyOutput) SetPolicy(v string) *GetKeyPolicyOutput { type GetKeyRotationStatusInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key. This value can be a globally - // unique identifier or the fully specified ARN to a key. + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify + // a CMK in a different AWS account, you must use the key ARN. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5855,13 +6037,16 @@ type GetParametersForImportInput struct { // The identifier of the CMK into which you will import key material. The CMK's // Origin must be EXTERNAL. // - // A valid identifier is the unique key ID or the Amazon Resource Name (ARN) - // of the CMK. Examples: + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -5945,7 +6130,7 @@ type GetParametersForImportOutput struct { // The time at which the import token and public key are no longer valid. After // this time, you cannot use them to make an ImportKeyMaterial request and you - // must send another GetParametersForImport request to retrieve new ones. + // must send another GetParametersForImport request to get new ones. ParametersValidTo *time.Time `type:"timestamp" timestampFormat:"unix"` // The public key to use to encrypt the key material before importing it with @@ -6172,13 +6357,16 @@ type ImportKeyMaterialInput struct { // The identifier of the CMK to import the key material into. The CMK's Origin // must be EXTERNAL. // - // A valid identifier is the unique key ID or the Amazon Resource Name (ARN) - // of the CMK. Examples: + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -6523,7 +6711,7 @@ func (s *ListAliasesInput) SetMarker(v string) *ListAliasesInput { type ListAliasesOutput struct { _ struct{} `type:"structure"` - // A list of key aliases in the user's account. + // A list of aliases. Aliases []*AliasListEntry `type:"list"` // When Truncated is true, this element is present and contains the value to @@ -6531,7 +6719,7 @@ type ListAliasesOutput struct { NextMarker *string `min:"1" type:"string"` // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To retrieve more items, + // value is true, the list in this response is truncated. To get more items, // pass the value of the NextMarker element in this response to the Marker parameter // in a subsequent request. Truncated *bool `type:"boolean"` @@ -6569,12 +6757,18 @@ func (s *ListAliasesOutput) SetTruncated(v bool) *ListAliasesOutput { type ListGrantsInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key. This value can be a globally - // unique identifier or the fully specified ARN to a key. + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify + // a CMK in a different AWS account, you must use the key ARN. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -6655,7 +6849,7 @@ type ListGrantsResponse struct { NextMarker *string `min:"1" type:"string"` // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To retrieve more items, + // value is true, the list in this response is truncated. To get more items, // pass the value of the NextMarker element in this response to the Marker parameter // in a subsequent request. Truncated *bool `type:"boolean"` @@ -6693,13 +6887,18 @@ func (s *ListGrantsResponse) SetTruncated(v bool) *ListGrantsResponse { type ListKeyPoliciesInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key (CMK). You can use the unique - // key ID or the Amazon Resource Name (ARN) of the CMK. Examples: + // A unique identifier for the customer master key (CMK). // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -6782,7 +6981,7 @@ type ListKeyPoliciesOutput struct { PolicyNames []*string `type:"list"` // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To retrieve more items, + // value is true, the list in this response is truncated. To get more items, // pass the value of the NextMarker element in this response to the Marker parameter // in a subsequent request. Truncated *bool `type:"boolean"` @@ -6876,7 +7075,7 @@ func (s *ListKeysInput) SetMarker(v string) *ListKeysInput { type ListKeysOutput struct { _ struct{} `type:"structure"` - // A list of keys. + // A list of customer master keys (CMKs). Keys []*KeyListEntry `type:"list"` // When Truncated is true, this element is present and contains the value to @@ -6884,7 +7083,7 @@ type ListKeysOutput struct { NextMarker *string `min:"1" type:"string"` // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To retrieve more items, + // value is true, the list in this response is truncated. To get more items, // pass the value of the NextMarker element in this response to the Marker parameter // in a subsequent request. Truncated *bool `type:"boolean"` @@ -6922,13 +7121,18 @@ func (s *ListKeysOutput) SetTruncated(v bool) *ListKeysOutput { type ListResourceTagsInput struct { _ struct{} `type:"structure"` - // A unique identifier for the CMK whose tags you are listing. You can use the - // unique key ID or the Amazon Resource Name (ARN) of the CMK. Examples: + // A unique identifier for the customer master key (CMK). // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -7013,7 +7217,7 @@ type ListResourceTagsOutput struct { Tags []*Tag `type:"list"` // A flag that indicates whether there are more items in the list. When this - // value is true, the list in this response is truncated. To retrieve more items, + // value is true, the list in this response is truncated. To get more items, // pass the value of the NextMarker element in this response to the Marker parameter // in a subsequent request. Truncated *bool `type:"boolean"` @@ -7145,13 +7349,17 @@ type PutKeyPolicyInput struct { // The default value is false. BypassPolicyLockoutSafetyCheck *bool `type:"boolean"` - // A unique identifier for the CMK. + // A unique identifier for the customer master key (CMK). // - // Use the CMK's unique identifier or its Amazon Resource Name (ARN). For example: + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Unique ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: // - // * ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -7175,14 +7383,12 @@ type PutKeyPolicyInput struct { // I make are not always immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) // in the IAM User Guide. // - // The policy size limit is 32 KiB (32768 bytes). + // The policy size limit is 32 kilobytes (32768 bytes). // // Policy is a required field Policy *string `min:"1" type:"string" required:"true"` - // The name of the key policy. - // - // This value must be default. + // The name of the key policy. The only valid value is default. // // PolicyName is a required field PolicyName *string `min:"1" type:"string" required:"true"` @@ -7279,17 +7485,24 @@ type ReEncryptInput struct { // Encryption context to use when the data is reencrypted. DestinationEncryptionContext map[string]*string `type:"map"` - // A unique identifier for the CMK to use to reencrypt the data. This value - // can be a globally unique identifier, a fully specified ARN to either an alias - // or a key, or an alias name prefixed by "alias/". + // A unique identifier for the CMK that is used to reencrypt the data. // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, + // or alias ARN. When using an alias name, prefix it with "alias/". To specify + // a CMK in a different AWS account, you must use the key ARN or alias ARN. // - // * Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName + // For example: // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // - // * Alias Name Example - alias/MyAliasName + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Alias name: alias/ExampleAlias + // + // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To + // get the alias name and alias ARN, use ListAliases. // // DestinationKeyId is a required field DestinationKeyId *string `min:"1" type:"string" required:"true"` @@ -7371,7 +7584,8 @@ func (s *ReEncryptInput) SetSourceEncryptionContext(v map[string]*string) *ReEnc type ReEncryptOutput struct { _ struct{} `type:"structure"` - // The reencrypted data. + // The reencrypted data. When you use the HTTP API or the AWS CLI, the value + // is Base64-encoded. Otherwise, it is not encoded. // // CiphertextBlob is automatically base64 encoded/decoded by the SDK. CiphertextBlob []byte `min:"1" type:"blob"` @@ -7424,9 +7638,9 @@ type RetireGrantInput struct { // Token that identifies the grant to be retired. GrantToken *string `min:"1" type:"string"` - // The Amazon Resource Name of the CMK associated with the grant. Example: + // The Amazon Resource Name (ARN) of the CMK associated with the grant. // - // * arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab + // For example: arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab KeyId *string `min:"1" type:"string"` } @@ -7502,12 +7716,17 @@ type RevokeGrantInput struct { GrantId *string `min:"1" type:"string" required:"true"` // A unique identifier for the customer master key associated with the grant. - // This value can be a globally unique identifier or the fully specified ARN - // to a key. // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify + // a CMK in a different AWS account, you must use the key ARN. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -7576,17 +7795,17 @@ func (s RevokeGrantOutput) GoString() string { type ScheduleKeyDeletionInput struct { _ struct{} `type:"structure"` - // The unique identifier for the customer master key (CMK) to delete. + // The unique identifier of the customer master key (CMK) to delete. // - // To specify this value, use the unique key ID or the Amazon Resource Name - // (ARN) of the CMK. Examples: + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // - // To obtain the unique key ID and key ARN for a given CMK, use ListKeys or - // DescribeKey. + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -7676,6 +7895,10 @@ func (s *ScheduleKeyDeletionOutput) SetKeyId(v string) *ScheduleKeyDeletionOutpu // A key-value pair. A tag consists of a tag key and a tag value. Tag keys and // tag values are both required, but tag values can be empty (null) strings. +// +// For information about the rules that apply to tag keys and tag values, see +// User-Defined Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) +// in the AWS Billing and Cost Management User Guide. // Please also see https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Tag type Tag struct { _ struct{} `type:"structure"` @@ -7736,13 +7959,18 @@ func (s *Tag) SetTagValue(v string) *Tag { type TagResourceInput struct { _ struct{} `type:"structure"` - // A unique identifier for the CMK you are tagging. You can use the unique key - // ID or the Amazon Resource Name (ARN) of the CMK. Examples: + // A unique identifier for the CMK you are tagging. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -7822,13 +8050,18 @@ func (s TagResourceOutput) GoString() string { type UntagResourceInput struct { _ struct{} `type:"structure"` - // A unique identifier for the CMK from which you are removing tags. You can - // use the unique key ID or the Amazon Resource Name (ARN) of the CMK. Examples: + // A unique identifier for the CMK from which you are removing tags. // - // * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab // // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` @@ -7905,16 +8138,19 @@ type UpdateAliasInput struct { // AliasName is a required field AliasName *string `min:"1" type:"string" required:"true"` - // Unique identifier of the customer master key to be mapped to the alias. This - // value can be a globally unique identifier or the fully specified ARN of a - // key. + // Unique identifier of the customer master key to be mapped to the alias. // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: // - // You can call ListAliases to verify that the alias is mapped to the correct - // TargetKeyId. + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // + // To verify that the alias is mapped to the correct CMK, use ListAliases. // // TargetKeyId is a required field TargetKeyId *string `min:"1" type:"string" required:"true"` @@ -7988,12 +8224,17 @@ type UpdateKeyDescriptionInput struct { // Description is a required field Description *string `type:"string" required:"true"` - // A unique identifier for the CMK. This value can be a globally unique identifier - // or the fully specified ARN to a key. + // A unique identifier for the customer master key (CMK). // - // * Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. // - // * Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go index 0b6a33ca9..3bab059f3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go @@ -82,7 +82,7 @@ // // Using the Client // -// To AWS Key Management Service with the SDK use the New function to create +// To contact AWS Key Management Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go index 0358c9443..d79e4321b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go @@ -28,9 +28,8 @@ const ( // "ExpiredImportTokenException". // // The request was rejected because the provided import token is expired. Use - // GetParametersForImport to retrieve a new import token and public key, use - // the new public key to encrypt the key material, and then try the request - // again. + // GetParametersForImport to get a new import token and public key, use the + // new public key to encrypt the key material, and then try the request again. ErrCodeExpiredImportTokenException = "ExpiredImportTokenException" // ErrCodeIncorrectKeyMaterialException for service response error code @@ -63,8 +62,9 @@ const ( // ErrCodeInvalidCiphertextException for service response error code // "InvalidCiphertextException". // - // The request was rejected because the specified ciphertext has been corrupted - // or is otherwise invalid. + // The request was rejected because the specified ciphertext, or additional + // authenticated data incorporated into the ciphertext, such as the encryption + // context, is corrupted, missing, or otherwise invalid. ErrCodeInvalidCiphertextException = "InvalidCiphertextException" // ErrCodeInvalidGrantIdException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index e9dd32dd5..9c4bc147a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -37,6 +37,8 @@ const opAddPermission = "AddPermission" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) { op := &request.Operation{ Name: opAddPermission, @@ -101,6 +103,7 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission func (c *Lambda) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) { req, out := c.AddPermissionRequest(input) return out, req.Send() @@ -146,6 +149,8 @@ const opCreateAlias = "CreateAlias" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *AliasConfiguration) { op := &request.Operation{ Name: opCreateAlias, @@ -197,6 +202,7 @@ func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Reque // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) { req, out := c.CreateAliasRequest(input) return out, req.Send() @@ -242,6 +248,8 @@ const opCreateEventSourceMapping = "CreateEventSourceMapping" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { op := &request.Operation{ Name: opCreateEventSourceMapping, @@ -313,6 +321,7 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // The resource (for example, a Lambda function or access policy statement) // specified in the request does not exist. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping func (c *Lambda) CreateEventSourceMapping(input *CreateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { req, out := c.CreateEventSourceMappingRequest(input) return out, req.Send() @@ -358,6 +367,8 @@ const opCreateFunction = "CreateFunction" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *FunctionConfiguration) { op := &request.Operation{ Name: opCreateFunction, @@ -417,6 +428,7 @@ func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction func (c *Lambda) CreateFunction(input *CreateFunctionInput) (*FunctionConfiguration, error) { req, out := c.CreateFunctionRequest(input) return out, req.Send() @@ -462,6 +474,8 @@ const opDeleteAlias = "DeleteAlias" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) { op := &request.Operation{ Name: opDeleteAlias, @@ -507,6 +521,7 @@ func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Reque // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { req, out := c.DeleteAliasRequest(input) return out, req.Send() @@ -552,6 +567,8 @@ const opDeleteEventSourceMapping = "DeleteEventSourceMapping" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { op := &request.Operation{ Name: opDeleteEventSourceMapping, @@ -600,6 +617,7 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { req, out := c.DeleteEventSourceMappingRequest(input) return out, req.Send() @@ -645,6 +663,8 @@ const opDeleteFunction = "DeleteFunction" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) { op := &request.Operation{ Name: opDeleteFunction, @@ -706,6 +726,7 @@ func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction func (c *Lambda) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) { req, out := c.DeleteFunctionRequest(input) return out, req.Send() @@ -751,6 +772,8 @@ const opGetAccountSettings = "GetAccountSettings" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req *request.Request, output *GetAccountSettingsOutput) { op := &request.Operation{ Name: opGetAccountSettings, @@ -790,6 +813,7 @@ func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings func (c *Lambda) GetAccountSettings(input *GetAccountSettingsInput) (*GetAccountSettingsOutput, error) { req, out := c.GetAccountSettingsRequest(input) return out, req.Send() @@ -835,6 +859,8 @@ const opGetAlias = "GetAlias" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, output *AliasConfiguration) { op := &request.Operation{ Name: opGetAlias, @@ -883,6 +909,7 @@ func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, ou // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) { req, out := c.GetAliasRequest(input) return out, req.Send() @@ -928,6 +955,8 @@ const opGetEventSourceMapping = "GetEventSourceMapping" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { op := &request.Operation{ Name: opGetEventSourceMapping, @@ -975,6 +1004,7 @@ func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { req, out := c.GetEventSourceMappingRequest(input) return out, req.Send() @@ -1020,6 +1050,8 @@ const opGetFunction = "GetFunction" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) { op := &request.Operation{ Name: opGetFunction, @@ -1076,6 +1108,7 @@ func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Reque // will also get this exception if you have selected a deprecated runtime, such // as Node v0.10.42. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction func (c *Lambda) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) { req, out := c.GetFunctionRequest(input) return out, req.Send() @@ -1121,6 +1154,8 @@ const opGetFunctionConfiguration = "GetFunctionConfiguration" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) { op := &request.Operation{ Name: opGetFunctionConfiguration, @@ -1177,6 +1212,7 @@ func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfiguration // will also get this exception if you have selected a deprecated runtime, such // as Node v0.10.42. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration func (c *Lambda) GetFunctionConfiguration(input *GetFunctionConfigurationInput) (*FunctionConfiguration, error) { req, out := c.GetFunctionConfigurationRequest(input) return out, req.Send() @@ -1222,6 +1258,8 @@ const opGetPolicy = "GetPolicy" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { op := &request.Operation{ Name: opGetPolicy, @@ -1273,6 +1311,7 @@ func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, // will also get this exception if you have selected a deprecated runtime, such // as Node v0.10.42. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { req, out := c.GetPolicyRequest(input) return out, req.Send() @@ -1318,6 +1357,8 @@ const opInvoke = "Invoke" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output *InvokeOutput) { op := &request.Operation{ Name: opInvoke, @@ -1431,6 +1472,7 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // * ErrCodeInvalidRuntimeException "InvalidRuntimeException" // The runtime or runtime version specified is not supported. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke func (c *Lambda) Invoke(input *InvokeInput) (*InvokeOutput, error) { req, out := c.InvokeRequest(input) return out, req.Send() @@ -1476,6 +1518,8 @@ const opInvokeAsync = "InvokeAsync" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Request, output *InvokeAsyncOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, InvokeAsync, has been deprecated") @@ -1526,6 +1570,7 @@ func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Reque // * ErrCodeInvalidRuntimeException "InvalidRuntimeException" // The runtime or runtime version specified is not supported. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error) { req, out := c.InvokeAsyncRequest(input) return out, req.Send() @@ -1571,6 +1616,8 @@ const opListAliases = "ListAliases" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) { op := &request.Operation{ Name: opListAliases, @@ -1620,6 +1667,7 @@ func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Reque // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { req, out := c.ListAliasesRequest(input) return out, req.Send() @@ -1665,6 +1713,8 @@ const opListEventSourceMappings = "ListEventSourceMappings" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsInput) (req *request.Request, output *ListEventSourceMappingsOutput) { op := &request.Operation{ Name: opListEventSourceMappings, @@ -1727,6 +1777,7 @@ func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsIn // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) { req, out := c.ListEventSourceMappingsRequest(input) return out, req.Send() @@ -1822,6 +1873,8 @@ const opListFunctions = "ListFunctions" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) { op := &request.Operation{ Name: opListFunctions, @@ -1876,6 +1929,7 @@ func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.R // will also get this exception if you have selected a deprecated runtime, such // as Node v0.10.42. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions func (c *Lambda) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) { req, out := c.ListFunctionsRequest(input) return out, req.Send() @@ -1971,6 +2025,8 @@ const opListTags = "ListTags" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { op := &request.Operation{ Name: opListTags, @@ -2016,6 +2072,7 @@ func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, ou // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { req, out := c.ListTagsRequest(input) return out, req.Send() @@ -2061,6 +2118,8 @@ const opListVersionsByFunction = "ListVersionsByFunction" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInput) (req *request.Request, output *ListVersionsByFunctionOutput) { op := &request.Operation{ Name: opListVersionsByFunction, @@ -2106,6 +2165,7 @@ func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInpu // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) { req, out := c.ListVersionsByFunctionRequest(input) return out, req.Send() @@ -2151,6 +2211,8 @@ const opPublishVersion = "PublishVersion" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request.Request, output *FunctionConfiguration) { op := &request.Operation{ Name: opPublishVersion, @@ -2202,6 +2264,7 @@ func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) { req, out := c.PublishVersionRequest(input) return out, req.Send() @@ -2247,6 +2310,8 @@ const opRemovePermission = "RemovePermission" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { op := &request.Operation{ Name: opRemovePermission, @@ -2305,6 +2370,7 @@ func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *req // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { req, out := c.RemovePermissionRequest(input) return out, req.Send() @@ -2350,6 +2416,8 @@ const opTagResource = "TagResource" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ Name: opTagResource, @@ -2398,6 +2466,7 @@ func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Reque // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) return out, req.Send() @@ -2443,6 +2512,8 @@ const opUntagResource = "UntagResource" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ Name: opUntagResource, @@ -2490,6 +2561,7 @@ func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.R // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) return out, req.Send() @@ -2535,6 +2607,8 @@ const opUpdateAlias = "UpdateAlias" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *AliasConfiguration) { op := &request.Operation{ Name: opUpdateAlias, @@ -2583,6 +2657,7 @@ func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Reque // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) { req, out := c.UpdateAliasRequest(input) return out, req.Send() @@ -2628,6 +2703,8 @@ const opUpdateEventSourceMapping = "UpdateEventSourceMapping" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { op := &request.Operation{ Name: opUpdateEventSourceMapping, @@ -2691,6 +2768,7 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { req, out := c.UpdateEventSourceMappingRequest(input) return out, req.Send() @@ -2736,6 +2814,8 @@ const opUpdateFunctionCode = "UpdateFunctionCode" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req *request.Request, output *FunctionConfiguration) { op := &request.Operation{ Name: opUpdateFunctionCode, @@ -2791,6 +2871,7 @@ func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) { req, out := c.UpdateFunctionCodeRequest(input) return out, req.Send() @@ -2836,6 +2917,8 @@ const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration" // if err == nil { // resp is now filled // fmt.Println(resp) // } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) { op := &request.Operation{ Name: opUpdateFunctionConfiguration, @@ -2893,6 +2976,7 @@ func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigu // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. // +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) { req, out := c.UpdateFunctionConfigurationRequest(input) return out, req.Send() @@ -2916,6 +3000,7 @@ func (c *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input * // Provides limits of code size and concurrency associated with the current // account and region. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AccountLimit type AccountLimit struct { _ struct{} `type:"structure"` @@ -2975,6 +3060,7 @@ func (s *AccountLimit) SetTotalCodeSize(v int64) *AccountLimit { // Provides code size usage and function count associated with the current account // and region. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AccountUsage type AccountUsage struct { _ struct{} `type:"structure"` @@ -3007,6 +3093,7 @@ func (s *AccountUsage) SetTotalCodeSize(v int64) *AccountUsage { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermissionRequest type AddPermissionInput struct { _ struct{} `type:"structure"` @@ -3177,6 +3264,7 @@ func (s *AddPermissionInput) SetStatementId(v string) *AddPermissionInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermissionResponse type AddPermissionOutput struct { _ struct{} `type:"structure"` @@ -3203,6 +3291,7 @@ func (s *AddPermissionOutput) SetStatement(v string) *AddPermissionOutput { } // Provides configuration information about a Lambda function version alias. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AliasConfiguration type AliasConfiguration struct { _ struct{} `type:"structure"` @@ -3255,6 +3344,7 @@ func (s *AliasConfiguration) SetName(v string) *AliasConfiguration { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAliasRequest type CreateAliasInput struct { _ struct{} `type:"structure"` @@ -3341,6 +3431,7 @@ func (s *CreateAliasInput) SetName(v string) *CreateAliasInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMappingRequest type CreateEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -3468,6 +3559,7 @@ func (s *CreateEventSourceMappingInput) SetStartingPositionTimestamp(v time.Time return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunctionRequest type CreateFunctionInput struct { _ struct{} `type:"structure"` @@ -3705,6 +3797,7 @@ func (s *CreateFunctionInput) SetVpcConfig(v *VpcConfig) *CreateFunctionInput { // The parent object that contains the target ARN (Amazon Resource Name) of // an Amazon SQS queue or Amazon SNS topic. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeadLetterConfig type DeadLetterConfig struct { _ struct{} `type:"structure"` @@ -3729,6 +3822,7 @@ func (s *DeadLetterConfig) SetTargetArn(v string) *DeadLetterConfig { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAliasRequest type DeleteAliasInput struct { _ struct{} `type:"structure"` @@ -3790,6 +3884,7 @@ func (s *DeleteAliasInput) SetName(v string) *DeleteAliasInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAliasOutput type DeleteAliasOutput struct { _ struct{} `type:"structure"` } @@ -3804,6 +3899,7 @@ func (s DeleteAliasOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMappingRequest type DeleteEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -3842,6 +3938,7 @@ func (s *DeleteEventSourceMappingInput) SetUUID(v string) *DeleteEventSourceMapp return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionRequest type DeleteFunctionInput struct { _ struct{} `type:"structure"` @@ -3916,6 +4013,7 @@ func (s *DeleteFunctionInput) SetQualifier(v string) *DeleteFunctionInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionOutput type DeleteFunctionOutput struct { _ struct{} `type:"structure"` } @@ -3931,6 +4029,7 @@ func (s DeleteFunctionOutput) GoString() string { } // The parent object that contains your environment's configuration settings. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Environment type Environment struct { _ struct{} `type:"structure"` @@ -3956,6 +4055,7 @@ func (s *Environment) SetVariables(v map[string]*string) *Environment { // The parent object that contains error information associated with your configuration // settings. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EnvironmentError type EnvironmentError struct { _ struct{} `type:"structure"` @@ -3990,6 +4090,7 @@ func (s *EnvironmentError) SetMessage(v string) *EnvironmentError { // The parent object returned that contains your environment's configuration // settings or any error information associated with your configuration settings. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EnvironmentResponse type EnvironmentResponse struct { _ struct{} `type:"structure"` @@ -4025,6 +4126,7 @@ func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentRes } // Describes mapping between an Amazon Kinesis stream and a Lambda function. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EventSourceMappingConfiguration type EventSourceMappingConfiguration struct { _ struct{} `type:"structure"` @@ -4117,6 +4219,7 @@ func (s *EventSourceMappingConfiguration) SetUUID(v string) *EventSourceMappingC } // The code for the Lambda function. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionCode type FunctionCode struct { _ struct{} `type:"structure"` @@ -4196,6 +4299,7 @@ func (s *FunctionCode) SetZipFile(v []byte) *FunctionCode { } // The object for the Lambda function location. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionCodeLocation type FunctionCodeLocation struct { _ struct{} `type:"structure"` @@ -4230,6 +4334,7 @@ func (s *FunctionCodeLocation) SetRepositoryType(v string) *FunctionCodeLocation } // A complex type that describes function metadata. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionConfiguration type FunctionConfiguration struct { _ struct{} `type:"structure"` @@ -4418,6 +4523,7 @@ func (s *FunctionConfiguration) SetVpcConfig(v *VpcConfigResponse) *FunctionConf return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettingsRequest type GetAccountSettingsInput struct { _ struct{} `type:"structure"` } @@ -4432,6 +4538,7 @@ func (s GetAccountSettingsInput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettingsResponse type GetAccountSettingsOutput struct { _ struct{} `type:"structure"` @@ -4466,6 +4573,7 @@ func (s *GetAccountSettingsOutput) SetAccountUsage(v *AccountUsage) *GetAccountS return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAliasRequest type GetAliasInput struct { _ struct{} `type:"structure"` @@ -4528,6 +4636,7 @@ func (s *GetAliasInput) SetName(v string) *GetAliasInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMappingRequest type GetEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -4566,6 +4675,7 @@ func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInp return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfigurationRequest type GetFunctionConfigurationInput struct { _ struct{} `type:"structure"` @@ -4633,6 +4743,7 @@ func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfi return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionRequest type GetFunctionInput struct { _ struct{} `type:"structure"` @@ -4699,6 +4810,7 @@ func (s *GetFunctionInput) SetQualifier(v string) *GetFunctionInput { } // This response contains the object for the Lambda function location (see FunctionCodeLocation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionResponse type GetFunctionOutput struct { _ struct{} `type:"structure"` @@ -4740,6 +4852,7 @@ func (s *GetFunctionOutput) SetTags(v map[string]*string) *GetFunctionOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicyRequest type GetPolicyInput struct { _ struct{} `type:"structure"` @@ -4805,6 +4918,7 @@ func (s *GetPolicyInput) SetQualifier(v string) *GetPolicyInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicyResponse type GetPolicyOutput struct { _ struct{} `type:"structure"` @@ -4830,6 +4944,7 @@ func (s *GetPolicyOutput) SetPolicy(v string) *GetPolicyOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsyncRequest type InvokeAsyncInput struct { _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"` @@ -4888,6 +5003,7 @@ func (s *InvokeAsyncInput) SetInvokeArgs(v io.ReadSeeker) *InvokeAsyncInput { } // Upon success, it returns empty response. Otherwise, throws an exception. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsyncResponse type InvokeAsyncOutput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -4911,6 +5027,7 @@ func (s *InvokeAsyncOutput) SetStatus(v int64) *InvokeAsyncOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvocationRequest type InvokeInput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -5029,6 +5146,7 @@ func (s *InvokeInput) SetQualifier(v string) *InvokeInput { } // Upon success, returns an empty response. Otherwise, throws an exception. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvocationResponse type InvokeOutput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -5094,6 +5212,7 @@ func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliasesRequest type ListAliasesInput struct { _ struct{} `type:"structure"` @@ -5174,6 +5293,7 @@ func (s *ListAliasesInput) SetMaxItems(v int64) *ListAliasesInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliasesResponse type ListAliasesOutput struct { _ struct{} `type:"structure"` @@ -5206,6 +5326,7 @@ func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappingsRequest type ListEventSourceMappingsInput struct { _ struct{} `type:"structure"` @@ -5286,6 +5407,7 @@ func (s *ListEventSourceMappingsInput) SetMaxItems(v int64) *ListEventSourceMapp } // Contains a list of event sources (see EventSourceMappingConfiguration) +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappingsResponse type ListEventSourceMappingsOutput struct { _ struct{} `type:"structure"` @@ -5318,6 +5440,7 @@ func (s *ListEventSourceMappingsOutput) SetNextMarker(v string) *ListEventSource return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctionsRequest type ListFunctionsInput struct { _ struct{} `type:"structure"` @@ -5399,6 +5522,7 @@ func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput { } // Contains a list of AWS Lambda function configurations (see FunctionConfiguration. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctionsResponse type ListFunctionsOutput struct { _ struct{} `type:"structure"` @@ -5431,6 +5555,7 @@ func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTagsRequest type ListTagsInput struct { _ struct{} `type:"structure"` @@ -5469,6 +5594,7 @@ func (s *ListTagsInput) SetResource(v string) *ListTagsInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTagsResponse type ListTagsOutput struct { _ struct{} `type:"structure"` @@ -5492,6 +5618,7 @@ func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunctionRequest type ListVersionsByFunctionInput struct { _ struct{} `type:"structure"` @@ -5561,6 +5688,7 @@ func (s *ListVersionsByFunctionInput) SetMaxItems(v int64) *ListVersionsByFuncti return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunctionResponse type ListVersionsByFunctionOutput struct { _ struct{} `type:"structure"` @@ -5593,6 +5721,7 @@ func (s *ListVersionsByFunctionOutput) SetVersions(v []*FunctionConfiguration) * return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersionRequest type PublishVersionInput struct { _ struct{} `type:"structure"` @@ -5661,6 +5790,7 @@ func (s *PublishVersionInput) SetFunctionName(v string) *PublishVersionInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermissionRequest type RemovePermissionInput struct { _ struct{} `type:"structure"` @@ -5740,6 +5870,7 @@ func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermissionOutput type RemovePermissionOutput struct { _ struct{} `type:"structure"` } @@ -5754,6 +5885,7 @@ func (s RemovePermissionOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResourceRequest type TagResourceInput struct { _ struct{} `type:"structure"` @@ -5806,6 +5938,7 @@ func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResourceOutput type TagResourceOutput struct { _ struct{} `type:"structure"` } @@ -5821,6 +5954,7 @@ func (s TagResourceOutput) GoString() string { } // The parent object that contains your function's tracing settings. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TracingConfig type TracingConfig struct { _ struct{} `type:"structure"` @@ -5849,6 +5983,7 @@ func (s *TracingConfig) SetMode(v string) *TracingConfig { } // Parent object of the tracing information associated with your Lambda function. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TracingConfigResponse type TracingConfigResponse struct { _ struct{} `type:"structure"` @@ -5872,6 +6007,7 @@ func (s *TracingConfigResponse) SetMode(v string) *TracingConfigResponse { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResourceRequest type UntagResourceInput struct { _ struct{} `type:"structure"` @@ -5924,6 +6060,7 @@ func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResourceOutput type UntagResourceOutput struct { _ struct{} `type:"structure"` } @@ -5938,6 +6075,7 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAliasRequest type UpdateAliasInput struct { _ struct{} `type:"structure"` @@ -6020,6 +6158,7 @@ func (s *UpdateAliasInput) SetName(v string) *UpdateAliasInput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMappingRequest type UpdateEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -6107,6 +6246,7 @@ func (s *UpdateEventSourceMappingInput) SetUUID(v string) *UpdateEventSourceMapp return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCodeRequest type UpdateFunctionCodeInput struct { _ struct{} `type:"structure"` @@ -6232,6 +6372,7 @@ func (s *UpdateFunctionCodeInput) SetZipFile(v []byte) *UpdateFunctionCodeInput return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfigurationRequest type UpdateFunctionConfigurationInput struct { _ struct{} `type:"structure"` @@ -6418,6 +6559,7 @@ func (s *UpdateFunctionConfigurationInput) SetVpcConfig(v *VpcConfig) *UpdateFun // identifying the list of security group IDs and subnet IDs. These must belong // to the same VPC. You must provide at least one security group and one subnet // ID. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/VpcConfig type VpcConfig struct { _ struct{} `type:"structure"` @@ -6451,6 +6593,7 @@ func (s *VpcConfig) SetSubnetIds(v []*string) *VpcConfig { } // VPC configuration associated with your Lambda function. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/VpcConfigResponse type VpcConfigResponse struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go index 7e3c3de31..58946ac33 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go @@ -11,12 +11,14 @@ // about how the service works, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html) // in the AWS Lambda Developer Guide. // +// See https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31 for more information on this service. +// // See lambda package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/lambda/ // // Using the Client // -// To AWS Lambda with the SDK use the New function to create +// To contact AWS Lambda with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 57abd6ff6..c42af7038 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -114,6 +114,111 @@ func (c *Lightsail) AllocateStaticIpWithContext(ctx aws.Context, input *Allocate return out, req.Send() } +const opAttachDisk = "AttachDisk" + +// AttachDiskRequest generates a "aws/request.Request" representing the +// client's request for the AttachDisk operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AttachDisk for more information on using the AttachDisk +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AttachDiskRequest method. +// req, resp := client.AttachDiskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachDisk +func (c *Lightsail) AttachDiskRequest(input *AttachDiskInput) (req *request.Request, output *AttachDiskOutput) { + op := &request.Operation{ + Name: opAttachDisk, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AttachDiskInput{} + } + + output = &AttachDiskOutput{} + req = c.newRequest(op, input, output) + return +} + +// AttachDisk API operation for Amazon Lightsail. +// +// Attaches a block storage disk to a running or stopped Lightsail instance +// and exposes it to the instance with the specified disk name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation AttachDisk for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachDisk +func (c *Lightsail) AttachDisk(input *AttachDiskInput) (*AttachDiskOutput, error) { + req, out := c.AttachDiskRequest(input) + return out, req.Send() +} + +// AttachDiskWithContext is the same as AttachDisk with the addition of +// the ability to pass a context and additional request options. +// +// See AttachDisk for details on how to use this API operation. +// +// 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 *Lightsail) AttachDiskWithContext(ctx aws.Context, input *AttachDiskInput, opts ...request.Option) (*AttachDiskOutput, error) { + req, out := c.AttachDiskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAttachStaticIp = "AttachStaticIp" // AttachStaticIpRequest generates a "aws/request.Request" representing the @@ -322,6 +427,337 @@ func (c *Lightsail) CloseInstancePublicPortsWithContext(ctx aws.Context, input * return out, req.Send() } +const opCreateDisk = "CreateDisk" + +// CreateDiskRequest generates a "aws/request.Request" representing the +// client's request for the CreateDisk operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDisk for more information on using the CreateDisk +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDiskRequest method. +// req, resp := client.CreateDiskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDisk +func (c *Lightsail) CreateDiskRequest(input *CreateDiskInput) (req *request.Request, output *CreateDiskOutput) { + op := &request.Operation{ + Name: opCreateDisk, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDiskInput{} + } + + output = &CreateDiskOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDisk API operation for Amazon Lightsail. +// +// Creates a block storage disk that can be attached to a Lightsail instance +// in the same Availability Zone (e.g., us-east-2a). The disk is created in +// the regional endpoint that you send the HTTP request to. For more information, +// see Regions and Availability Zones in Lightsail (https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation CreateDisk for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDisk +func (c *Lightsail) CreateDisk(input *CreateDiskInput) (*CreateDiskOutput, error) { + req, out := c.CreateDiskRequest(input) + return out, req.Send() +} + +// CreateDiskWithContext is the same as CreateDisk with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDisk for details on how to use this API operation. +// +// 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 *Lightsail) CreateDiskWithContext(ctx aws.Context, input *CreateDiskInput, opts ...request.Option) (*CreateDiskOutput, error) { + req, out := c.CreateDiskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDiskFromSnapshot = "CreateDiskFromSnapshot" + +// CreateDiskFromSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateDiskFromSnapshot operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDiskFromSnapshot for more information on using the CreateDiskFromSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDiskFromSnapshotRequest method. +// req, resp := client.CreateDiskFromSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskFromSnapshot +func (c *Lightsail) CreateDiskFromSnapshotRequest(input *CreateDiskFromSnapshotInput) (req *request.Request, output *CreateDiskFromSnapshotOutput) { + op := &request.Operation{ + Name: opCreateDiskFromSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDiskFromSnapshotInput{} + } + + output = &CreateDiskFromSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDiskFromSnapshot API operation for Amazon Lightsail. +// +// Creates a block storage disk from a disk snapshot that can be attached to +// a Lightsail instance in the same Availability Zone (e.g., us-east-2a). The +// disk is created in the regional endpoint that you send the HTTP request to. +// For more information, see Regions and Availability Zones in Lightsail (https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation CreateDiskFromSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskFromSnapshot +func (c *Lightsail) CreateDiskFromSnapshot(input *CreateDiskFromSnapshotInput) (*CreateDiskFromSnapshotOutput, error) { + req, out := c.CreateDiskFromSnapshotRequest(input) + return out, req.Send() +} + +// CreateDiskFromSnapshotWithContext is the same as CreateDiskFromSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDiskFromSnapshot for details on how to use this API operation. +// +// 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 *Lightsail) CreateDiskFromSnapshotWithContext(ctx aws.Context, input *CreateDiskFromSnapshotInput, opts ...request.Option) (*CreateDiskFromSnapshotOutput, error) { + req, out := c.CreateDiskFromSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDiskSnapshot = "CreateDiskSnapshot" + +// CreateDiskSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateDiskSnapshot operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDiskSnapshot for more information on using the CreateDiskSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDiskSnapshotRequest method. +// req, resp := client.CreateDiskSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskSnapshot +func (c *Lightsail) CreateDiskSnapshotRequest(input *CreateDiskSnapshotInput) (req *request.Request, output *CreateDiskSnapshotOutput) { + op := &request.Operation{ + Name: opCreateDiskSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDiskSnapshotInput{} + } + + output = &CreateDiskSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDiskSnapshot API operation for Amazon Lightsail. +// +// Creates a snapshot of a block storage disk. You can use snapshots for backups, +// to make copies of disks, and to save data before shutting down a Lightsail +// instance. +// +// You can take a snapshot of an attached disk that is in use; however, snapshots +// only capture data that has been written to your disk at the time the snapshot +// command is issued. This may exclude any data that has been cached by any +// applications or the operating system. If you can pause any file systems on +// the disk long enough to take a snapshot, your snapshot should be complete. +// Nevertheless, if you cannot pause all file writes to the disk, you should +// unmount the disk from within the Lightsail instance, issue the create disk +// snapshot command, and then remount the disk to ensure a consistent and complete +// snapshot. You may remount and use your disk while the snapshot status is +// pending. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation CreateDiskSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskSnapshot +func (c *Lightsail) CreateDiskSnapshot(input *CreateDiskSnapshotInput) (*CreateDiskSnapshotOutput, error) { + req, out := c.CreateDiskSnapshotRequest(input) + return out, req.Send() +} + +// CreateDiskSnapshotWithContext is the same as CreateDiskSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDiskSnapshot for details on how to use this API operation. +// +// 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 *Lightsail) CreateDiskSnapshotWithContext(ctx aws.Context, input *CreateDiskSnapshotInput, opts ...request.Option) (*CreateDiskSnapshotOutput, error) { + req, out := c.CreateDiskSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the @@ -949,6 +1385,224 @@ func (c *Lightsail) CreateKeyPairWithContext(ctx aws.Context, input *CreateKeyPa return out, req.Send() } +const opDeleteDisk = "DeleteDisk" + +// DeleteDiskRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDisk operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDisk for more information on using the DeleteDisk +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDiskRequest method. +// req, resp := client.DeleteDiskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDisk +func (c *Lightsail) DeleteDiskRequest(input *DeleteDiskInput) (req *request.Request, output *DeleteDiskOutput) { + op := &request.Operation{ + Name: opDeleteDisk, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDiskInput{} + } + + output = &DeleteDiskOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDisk API operation for Amazon Lightsail. +// +// Deletes the specified block storage disk. The disk must be in the available +// state (not attached to a Lightsail instance). +// +// The disk may remain in the deleting state for several minutes. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation DeleteDisk for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDisk +func (c *Lightsail) DeleteDisk(input *DeleteDiskInput) (*DeleteDiskOutput, error) { + req, out := c.DeleteDiskRequest(input) + return out, req.Send() +} + +// DeleteDiskWithContext is the same as DeleteDisk with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDisk for details on how to use this API operation. +// +// 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 *Lightsail) DeleteDiskWithContext(ctx aws.Context, input *DeleteDiskInput, opts ...request.Option) (*DeleteDiskOutput, error) { + req, out := c.DeleteDiskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDiskSnapshot = "DeleteDiskSnapshot" + +// DeleteDiskSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDiskSnapshot operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDiskSnapshot for more information on using the DeleteDiskSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDiskSnapshotRequest method. +// req, resp := client.DeleteDiskSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshot +func (c *Lightsail) DeleteDiskSnapshotRequest(input *DeleteDiskSnapshotInput) (req *request.Request, output *DeleteDiskSnapshotOutput) { + op := &request.Operation{ + Name: opDeleteDiskSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDiskSnapshotInput{} + } + + output = &DeleteDiskSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDiskSnapshot API operation for Amazon Lightsail. +// +// Deletes the specified disk snapshot. +// +// When you make periodic snapshots of a disk, the snapshots are incremental, +// and only the blocks on the device that have changed since your last snapshot +// are saved in the new snapshot. When you delete a snapshot, only the data +// not needed for any other snapshot is removed. So regardless of which prior +// snapshots have been deleted, all active snapshots will have access to all +// the information needed to restore the disk. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation DeleteDiskSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshot +func (c *Lightsail) DeleteDiskSnapshot(input *DeleteDiskSnapshotInput) (*DeleteDiskSnapshotOutput, error) { + req, out := c.DeleteDiskSnapshotRequest(input) + return out, req.Send() +} + +// DeleteDiskSnapshotWithContext is the same as DeleteDiskSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDiskSnapshot for details on how to use this API operation. +// +// 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 *Lightsail) DeleteDiskSnapshotWithContext(ctx aws.Context, input *DeleteDiskSnapshotInput, opts ...request.Option) (*DeleteDiskSnapshotOutput, error) { + req, out := c.DeleteDiskSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteDomain = "DeleteDomain" // DeleteDomainRequest generates a "aws/request.Request" representing the @@ -1469,6 +2123,112 @@ func (c *Lightsail) DeleteKeyPairWithContext(ctx aws.Context, input *DeleteKeyPa return out, req.Send() } +const opDetachDisk = "DetachDisk" + +// DetachDiskRequest generates a "aws/request.Request" representing the +// client's request for the DetachDisk operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DetachDisk for more information on using the DetachDisk +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DetachDiskRequest method. +// req, resp := client.DetachDiskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDisk +func (c *Lightsail) DetachDiskRequest(input *DetachDiskInput) (req *request.Request, output *DetachDiskOutput) { + op := &request.Operation{ + Name: opDetachDisk, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DetachDiskInput{} + } + + output = &DetachDiskOutput{} + req = c.newRequest(op, input, output) + return +} + +// DetachDisk API operation for Amazon Lightsail. +// +// Detaches a stopped block storage disk from a Lightsail instance. Make sure +// to unmount any file systems on the device within your operating system before +// stopping the instance and detaching the disk. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation DetachDisk for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDisk +func (c *Lightsail) DetachDisk(input *DetachDiskInput) (*DetachDiskOutput, error) { + req, out := c.DetachDiskRequest(input) + return out, req.Send() +} + +// DetachDiskWithContext is the same as DetachDisk with the addition of +// the ability to pass a context and additional request options. +// +// See DetachDisk for details on how to use this API operation. +// +// 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 *Lightsail) DetachDiskWithContext(ctx aws.Context, input *DetachDiskInput, opts ...request.Option) (*DetachDiskOutput, error) { + req, out := c.DetachDiskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDetachStaticIp = "DetachStaticIp" // DetachStaticIpRequest generates a "aws/request.Request" representing the @@ -1993,6 +2753,432 @@ func (c *Lightsail) GetBundlesWithContext(ctx aws.Context, input *GetBundlesInpu return out, req.Send() } +const opGetDisk = "GetDisk" + +// GetDiskRequest generates a "aws/request.Request" representing the +// client's request for the GetDisk operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDisk for more information on using the GetDisk +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDiskRequest method. +// req, resp := client.GetDiskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisk +func (c *Lightsail) GetDiskRequest(input *GetDiskInput) (req *request.Request, output *GetDiskOutput) { + op := &request.Operation{ + Name: opGetDisk, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDiskInput{} + } + + output = &GetDiskOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDisk API operation for Amazon Lightsail. +// +// Returns information about a specific block storage disk. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation GetDisk for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisk +func (c *Lightsail) GetDisk(input *GetDiskInput) (*GetDiskOutput, error) { + req, out := c.GetDiskRequest(input) + return out, req.Send() +} + +// GetDiskWithContext is the same as GetDisk with the addition of +// the ability to pass a context and additional request options. +// +// See GetDisk for details on how to use this API operation. +// +// 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 *Lightsail) GetDiskWithContext(ctx aws.Context, input *GetDiskInput, opts ...request.Option) (*GetDiskOutput, error) { + req, out := c.GetDiskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDiskSnapshot = "GetDiskSnapshot" + +// GetDiskSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the GetDiskSnapshot operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDiskSnapshot for more information on using the GetDiskSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDiskSnapshotRequest method. +// req, resp := client.GetDiskSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshot +func (c *Lightsail) GetDiskSnapshotRequest(input *GetDiskSnapshotInput) (req *request.Request, output *GetDiskSnapshotOutput) { + op := &request.Operation{ + Name: opGetDiskSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDiskSnapshotInput{} + } + + output = &GetDiskSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDiskSnapshot API operation for Amazon Lightsail. +// +// Returns information about a specific block storage disk snapshot. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation GetDiskSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshot +func (c *Lightsail) GetDiskSnapshot(input *GetDiskSnapshotInput) (*GetDiskSnapshotOutput, error) { + req, out := c.GetDiskSnapshotRequest(input) + return out, req.Send() +} + +// GetDiskSnapshotWithContext is the same as GetDiskSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See GetDiskSnapshot for details on how to use this API operation. +// +// 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 *Lightsail) GetDiskSnapshotWithContext(ctx aws.Context, input *GetDiskSnapshotInput, opts ...request.Option) (*GetDiskSnapshotOutput, error) { + req, out := c.GetDiskSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDiskSnapshots = "GetDiskSnapshots" + +// GetDiskSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the GetDiskSnapshots operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDiskSnapshots for more information on using the GetDiskSnapshots +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDiskSnapshotsRequest method. +// req, resp := client.GetDiskSnapshotsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshots +func (c *Lightsail) GetDiskSnapshotsRequest(input *GetDiskSnapshotsInput) (req *request.Request, output *GetDiskSnapshotsOutput) { + op := &request.Operation{ + Name: opGetDiskSnapshots, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDiskSnapshotsInput{} + } + + output = &GetDiskSnapshotsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDiskSnapshots API operation for Amazon Lightsail. +// +// Returns information about all block storage disk snapshots in your AWS account +// and region. +// +// If you are describing a long list of disk snapshots, you can paginate the +// output to make the list more manageable. You can use the pageToken and nextPageToken +// values to retrieve the next items in the list. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation GetDiskSnapshots for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshots +func (c *Lightsail) GetDiskSnapshots(input *GetDiskSnapshotsInput) (*GetDiskSnapshotsOutput, error) { + req, out := c.GetDiskSnapshotsRequest(input) + return out, req.Send() +} + +// GetDiskSnapshotsWithContext is the same as GetDiskSnapshots with the addition of +// the ability to pass a context and additional request options. +// +// See GetDiskSnapshots for details on how to use this API operation. +// +// 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 *Lightsail) GetDiskSnapshotsWithContext(ctx aws.Context, input *GetDiskSnapshotsInput, opts ...request.Option) (*GetDiskSnapshotsOutput, error) { + req, out := c.GetDiskSnapshotsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDisks = "GetDisks" + +// GetDisksRequest generates a "aws/request.Request" representing the +// client's request for the GetDisks operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDisks for more information on using the GetDisks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDisksRequest method. +// req, resp := client.GetDisksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisks +func (c *Lightsail) GetDisksRequest(input *GetDisksInput) (req *request.Request, output *GetDisksOutput) { + op := &request.Operation{ + Name: opGetDisks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDisksInput{} + } + + output = &GetDisksOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDisks API operation for Amazon Lightsail. +// +// Returns information about all block storage disks in your AWS account and +// region. +// +// If you are describing a long list of disks, you can paginate the output to +// make the list more manageable. You can use the pageToken and nextPageToken +// values to retrieve the next items in the list. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation GetDisks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your Region configuration to us-east-1 to create, view, or edit +// these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisks +func (c *Lightsail) GetDisks(input *GetDisksInput) (*GetDisksOutput, error) { + req, out := c.GetDisksRequest(input) + return out, req.Send() +} + +// GetDisksWithContext is the same as GetDisks with the addition of +// the ability to pass a context and additional request options. +// +// See GetDisks for details on how to use this API operation. +// +// 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 *Lightsail) GetDisksWithContext(ctx aws.Context, input *GetDisksInput, opts ...request.Option) (*GetDisksOutput, error) { + req, out := c.GetDisksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetDomain = "GetDomain" // GetDomainRequest generates a "aws/request.Request" representing the @@ -5089,6 +6275,98 @@ func (s *AllocateStaticIpOutput) SetOperations(v []*Operation) *AllocateStaticIp return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachDiskRequest +type AttachDiskInput struct { + _ struct{} `type:"structure"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The disk path to expose to the instance (e.g., /dev/xvdf). + // + // DiskPath is a required field + DiskPath *string `locationName:"diskPath" type:"string" required:"true"` + + // The name of the Lightsail instance where you want to utilize the storage + // disk. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskPath == nil { + invalidParams.Add(request.NewErrParamRequired("DiskPath")) + } + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *AttachDiskInput) SetDiskName(v string) *AttachDiskInput { + s.DiskName = &v + return s +} + +// SetDiskPath sets the DiskPath field's value. +func (s *AttachDiskInput) SetDiskPath(v string) *AttachDiskInput { + s.DiskPath = &v + return s +} + +// SetInstanceName sets the InstanceName field's value. +func (s *AttachDiskInput) SetInstanceName(v string) *AttachDiskInput { + s.InstanceName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachDiskResult +type AttachDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operation. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachDiskOutput) SetOperations(v []*Operation) *AttachDiskOutput { + s.Operations = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/AttachStaticIpRequest type AttachStaticIpInput struct { _ struct{} `type:"structure"` @@ -5174,7 +6452,7 @@ type AvailabilityZone struct { // The state of the Availability Zone. State *string `locationName:"state" type:"string"` - // The name of the Availability Zone. The format is us-east-1a (case-sensitive). + // The name of the Availability Zone. The format is us-east-2a (case-sensitive). ZoneName *string `locationName:"zoneName" type:"string"` } @@ -5222,13 +6500,19 @@ type Blueprint struct { // The end-user license agreement URL for the image or blueprint. LicenseUrl *string `locationName:"licenseUrl" type:"string"` - // The minimum machine size required to run this blueprint. 0 indicates that - // the blueprint runs on all instances. + // The minimum bundle power required to run this blueprint. For example, you + // need a bundle with a power value of 500 or more to create an instance that + // uses a blueprint with a minimum power value of 500. 0 indicates that the + // blueprint runs on all instance sizes. MinPower *int64 `locationName:"minPower" type:"integer"` // The friendly name of the blueprint (e.g., Amazon Linux). Name *string `locationName:"name" type:"string"` + // The operating system platform (either Linux/Unix-based or Windows Server-based) + // of the blueprint. + Platform *string `locationName:"platform" type:"string" enum:"InstancePlatform"` + // The product URL to learn more about the image or blueprint. ProductUrl *string `locationName:"productUrl" type:"string"` @@ -5295,6 +6579,12 @@ func (s *Blueprint) SetName(v string) *Blueprint { return s } +// SetPlatform sets the Platform field's value. +func (s *Blueprint) SetPlatform(v string) *Blueprint { + s.Platform = &v + return s +} + // SetProductUrl sets the ProductUrl field's value. func (s *Blueprint) SetProductUrl(v string) *Blueprint { s.ProductUrl = &v @@ -5343,7 +6633,11 @@ type Bundle struct { // A friendly name for the bundle (e.g., Micro). Name *string `locationName:"name" type:"string"` - // The power of the bundle (e.g., 500). + // A numeric value that represents the power of the bundle (e.g., 500). You + // can use the bundle's power value in conjunction with a blueprint's minimum + // power value to determine whether the blueprint will run on the bundle. For + // example, you need a bundle with a power value of 500 or more to create an + // instance that uses a blueprint with a minimum power value of 500. Power *int64 `locationName:"power" type:"integer"` // The price in US dollars (e.g., 5.0). @@ -5352,6 +6646,12 @@ type Bundle struct { // The amount of RAM in GB (e.g., 2.0). RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` + // The operating system platform (Linux/Unix-based or Windows Server-based) + // that the bundle supports. You can only launch a WINDOWS bundle on a blueprint + // that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX + // bundle. + SupportedPlatforms []*string `locationName:"supportedPlatforms" type:"list"` + // The data transfer rate per month in GB (e.g., 2000). TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` } @@ -5420,6 +6720,12 @@ func (s *Bundle) SetRamSizeInGb(v float64) *Bundle { return s } +// SetSupportedPlatforms sets the SupportedPlatforms field's value. +func (s *Bundle) SetSupportedPlatforms(v []*string) *Bundle { + s.SupportedPlatforms = v + return s +} + // SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. func (s *Bundle) SetTransferPerMonthInGb(v int64) *Bundle { s.TransferPerMonthInGb = &v @@ -5503,6 +6809,291 @@ func (s *CloseInstancePublicPortsOutput) SetOperation(v *Operation) *CloseInstan return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskFromSnapshotRequest +type CreateDiskFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone where you want to create the disk (e.g., us-east-2a). + // Choose the same Availability Zone as the Lightsail instance where you want + // to create the disk. + // + // Use the GetRegions operation to list the Availability Zones where Lightsail + // is currently available. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The name of the disk snapshot (e.g., my-snapshot) from which to create the + // new storage disk. + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + + // The size of the disk in GB (e.g., 32). + // + // SizeInGb is a required field + SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` +} + +// String returns the string representation +func (s CreateDiskFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskFromSnapshotInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + if s.SizeInGb == nil { + invalidParams.Add(request.NewErrParamRequired("SizeInGb")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDiskFromSnapshotInput) SetAvailabilityZone(v string) *CreateDiskFromSnapshotInput { + s.AvailabilityZone = &v + return s +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskFromSnapshotInput) SetDiskName(v string) *CreateDiskFromSnapshotInput { + s.DiskName = &v + return s +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *CreateDiskFromSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskFromSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *CreateDiskFromSnapshotInput) SetSizeInGb(v int64) *CreateDiskFromSnapshotInput { + s.SizeInGb = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskFromSnapshotResult +type CreateDiskFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskFromSnapshotOutput) SetOperations(v []*Operation) *CreateDiskFromSnapshotOutput { + s.Operations = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskRequest +type CreateDiskInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone where you want to create the disk (e.g., us-east-2a). + // Choose the same Availability Zone as the Lightsail instance where you want + // to create the disk. + // + // Use the GetRegions operation to list the Availability Zones where Lightsail + // is currently available. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The size of the disk in GB (e.g., 32). + // + // SizeInGb is a required field + SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` +} + +// String returns the string representation +func (s CreateDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.SizeInGb == nil { + invalidParams.Add(request.NewErrParamRequired("SizeInGb")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDiskInput) SetAvailabilityZone(v string) *CreateDiskInput { + s.AvailabilityZone = &v + return s +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskInput) SetDiskName(v string) *CreateDiskInput { + s.DiskName = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *CreateDiskInput) SetSizeInGb(v int64) *CreateDiskInput { + s.SizeInGb = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskResult +type CreateDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskOutput) SetOperations(v []*Operation) *CreateDiskOutput { + s.Operations = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskSnapshotRequest +type CreateDiskSnapshotInput struct { + _ struct{} `type:"structure"` + + // The unique name of the source disk (e.g., my-source-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The name of the destination disk snapshot (e.g., my-disk-snapshot) based + // on the source disk. + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateDiskSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskSnapshotInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskSnapshotInput) SetDiskName(v string) *CreateDiskSnapshotInput { + s.DiskName = &v + return s +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *CreateDiskSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskSnapshotResult +type CreateDiskSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskSnapshotOutput) SetOperations(v []*Operation) *CreateDiskSnapshotOutput { + s.Operations = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDomainEntryRequest type CreateDomainEntryInput struct { _ struct{} `type:"structure"` @@ -5733,8 +7324,11 @@ func (s *CreateInstanceSnapshotOutput) SetOperations(v []*Operation) *CreateInst type CreateInstancesFromSnapshotInput struct { _ struct{} `type:"structure"` + // An object containing information about one or more disk mappings. + AttachedDiskMapping map[string][]*DiskMap `locationName:"attachedDiskMapping" type:"map"` + // The Availability Zone where you want to create your instances. Use the following - // formatting: us-east-1a (case sensitive). You can get a list of availability + // formatting: us-east-2a (case sensitive). You can get a list of availability // zones by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) // operation. Be sure to add the include availability zones parameter to your // request. @@ -5805,6 +7399,12 @@ func (s *CreateInstancesFromSnapshotInput) Validate() error { return nil } +// SetAttachedDiskMapping sets the AttachedDiskMapping field's value. +func (s *CreateInstancesFromSnapshotInput) SetAttachedDiskMapping(v map[string][]*DiskMap) *CreateInstancesFromSnapshotInput { + s.AttachedDiskMapping = v + return s +} + // SetAvailabilityZone sets the AvailabilityZone field's value. func (s *CreateInstancesFromSnapshotInput) SetAvailabilityZone(v string) *CreateInstancesFromSnapshotInput { s.AvailabilityZone = &v @@ -5871,7 +7471,7 @@ type CreateInstancesInput struct { _ struct{} `type:"structure"` // The Availability Zone in which to create your instance. Use the following - // format: us-east-1a (case sensitive). You can get a list of availability zones + // format: us-east-2a (case sensitive). You can get a list of availability zones // by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) // operation. Be sure to add the include availability zones parameter to your // request. @@ -5913,7 +7513,7 @@ type CreateInstancesInput struct { // Depending on the machine image you choose, the command to get software on // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide - // (http://lightsail.aws.amazon.com/ls/docs/getting-started/articles/pre-installed-apps). + // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). UserData *string `locationName:"userData" type:"string"` } @@ -6108,6 +7708,132 @@ func (s *CreateKeyPairOutput) SetPublicKeyBase64(v string) *CreateKeyPairOutput return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskRequest +type DeleteDiskInput struct { + _ struct{} `type:"structure"` + + // The unique name of the disk you want to delete (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *DeleteDiskInput) SetDiskName(v string) *DeleteDiskInput { + s.DiskName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskResult +type DeleteDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteDiskOutput) SetOperations(v []*Operation) *DeleteDiskOutput { + s.Operations = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshotRequest +type DeleteDiskSnapshotInput struct { + _ struct{} `type:"structure"` + + // The name of the disk snapshot you want to delete (e.g., my-disk-snapshot). + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDiskSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDiskSnapshotInput"} + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *DeleteDiskSnapshotInput) SetDiskSnapshotName(v string) *DeleteDiskSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshotResult +type DeleteDiskSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteDiskSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteDiskSnapshotOutput) SetOperations(v []*Operation) *DeleteDiskSnapshotOutput { + s.Operations = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomainEntryRequest type DeleteDomainEntryInput struct { _ struct{} `type:"structure"` @@ -6442,6 +8168,70 @@ func (s *DeleteKeyPairOutput) SetOperation(v *Operation) *DeleteKeyPairOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDiskRequest +type DetachDiskInput struct { + _ struct{} `type:"structure"` + + // The unique name of the disk you want to detach from your instance (e.g., + // my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetachDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *DetachDiskInput) SetDiskName(v string) *DetachDiskInput { + s.DiskName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDiskResult +type DetachDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DetachDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DetachDiskOutput) SetOperations(v []*Operation) *DetachDiskOutput { + s.Operations = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachStaticIpRequest type DetachStaticIpInput struct { _ struct{} `type:"structure"` @@ -6506,7 +8296,7 @@ func (s *DetachStaticIpOutput) SetOperations(v []*Operation) *DetachStaticIpOutp return s } -// Describes the hard disk (an SSD). +// Describes a system disk or an block storage disk. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/Disk type Disk struct { _ struct{} `type:"structure"` @@ -6517,14 +8307,21 @@ type Disk struct { // The resources to which the disk is attached. AttachedTo *string `locationName:"attachedTo" type:"string"` - // The attachment state of the disk. - AttachmentState *string `locationName:"attachmentState" type:"string"` + // (Deprecated) The attachment state of the disk. + // + // In releases prior to November 9, 2017, this parameter returned attached for + // system disks in the API response. It is now deprecated, but still included + // in the response. Use isAttached instead. + AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` // The date when the disk was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` - // The number of GB in use by the disk. - GbInUse *int64 `locationName:"gbInUse" type:"integer"` + // (Deprecated) The number of GB in use by the disk. + // + // In releases prior to November 9, 2017, this parameter was not included in + // the API response. It is now deprecated. + GbInUse *int64 `locationName:"gbInUse" deprecated:"true" type:"integer"` // The input/output operations per second (IOPS) of the disk. Iops *int64 `locationName:"iops" type:"integer"` @@ -6536,21 +8333,24 @@ type Disk struct { // system loaded on it). IsSystemDisk *bool `locationName:"isSystemDisk" type:"boolean"` - // The region and Availability Zone where the disk is located. + // The AWS Region and Availability Zone where the disk is located. Location *ResourceLocation `locationName:"location" type:"structure"` - // The name of the disk. + // The unique name of the disk. Name *string `locationName:"name" type:"string"` // The disk path. Path *string `locationName:"path" type:"string"` - // The resource type of the disk. + // The Lightsail resource type (e.g., Disk). ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The size of the disk in GB. SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + // Describes the status of the disk. + State *string `locationName:"state" type:"string" enum:"DiskState"` + // The support code. Include this code in your email to support when you have // questions about an instance or another resource in Lightsail. This code enables // our support team to look up your Lightsail information more easily. @@ -6645,12 +8445,170 @@ func (s *Disk) SetSizeInGb(v int64) *Disk { return s } +// SetState sets the State field's value. +func (s *Disk) SetState(v string) *Disk { + s.State = &v + return s +} + // SetSupportCode sets the SupportCode field's value. func (s *Disk) SetSupportCode(v string) *Disk { s.SupportCode = &v return s } +// Describes a block storage disk mapping. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DiskMap +type DiskMap struct { + _ struct{} `type:"structure"` + + // The new disk name (e.g., my-new-disk). + NewDiskName *string `locationName:"newDiskName" type:"string"` + + // The original disk path exposed to the instance (for example, /dev/sdh). + OriginalDiskPath *string `locationName:"originalDiskPath" type:"string"` +} + +// String returns the string representation +func (s DiskMap) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiskMap) GoString() string { + return s.String() +} + +// SetNewDiskName sets the NewDiskName field's value. +func (s *DiskMap) SetNewDiskName(v string) *DiskMap { + s.NewDiskName = &v + return s +} + +// SetOriginalDiskPath sets the OriginalDiskPath field's value. +func (s *DiskMap) SetOriginalDiskPath(v string) *DiskMap { + s.OriginalDiskPath = &v + return s +} + +// Describes a block storage disk snapshot. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DiskSnapshot +type DiskSnapshot struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the disk snapshot. + Arn *string `locationName:"arn" type:"string"` + + // The date when the disk snapshot was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + + // The Amazon Resource Name (ARN) of the source disk from which you are creating + // the disk snapshot. + FromDiskArn *string `locationName:"fromDiskArn" type:"string"` + + // The unique name of the source disk from which you are creating the disk snapshot. + FromDiskName *string `locationName:"fromDiskName" type:"string"` + + // The AWS Region and Availability Zone where the disk snapshot was created. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the disk snapshot (e.g., my-disk-snapshot). + Name *string `locationName:"name" type:"string"` + + // The progress of the disk snapshot operation. + Progress *string `locationName:"progress" type:"string"` + + // The Lightsail resource type (e.g., DiskSnapshot). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The size of the disk in GB. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + + // The status of the disk snapshot operation. + State *string `locationName:"state" type:"string" enum:"DiskSnapshotState"` + + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` +} + +// String returns the string representation +func (s DiskSnapshot) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiskSnapshot) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DiskSnapshot) SetArn(v string) *DiskSnapshot { + s.Arn = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *DiskSnapshot) SetCreatedAt(v time.Time) *DiskSnapshot { + s.CreatedAt = &v + return s +} + +// SetFromDiskArn sets the FromDiskArn field's value. +func (s *DiskSnapshot) SetFromDiskArn(v string) *DiskSnapshot { + s.FromDiskArn = &v + return s +} + +// SetFromDiskName sets the FromDiskName field's value. +func (s *DiskSnapshot) SetFromDiskName(v string) *DiskSnapshot { + s.FromDiskName = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *DiskSnapshot) SetLocation(v *ResourceLocation) *DiskSnapshot { + s.Location = v + return s +} + +// SetName sets the Name field's value. +func (s *DiskSnapshot) SetName(v string) *DiskSnapshot { + s.Name = &v + return s +} + +// SetProgress sets the Progress field's value. +func (s *DiskSnapshot) SetProgress(v string) *DiskSnapshot { + s.Progress = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *DiskSnapshot) SetResourceType(v string) *DiskSnapshot { + s.ResourceType = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *DiskSnapshot) SetSizeInGb(v int64) *DiskSnapshot { + s.SizeInGb = &v + return s +} + +// SetState sets the State field's value. +func (s *DiskSnapshot) SetState(v string) *DiskSnapshot { + s.State = &v + return s +} + +// SetSupportCode sets the SupportCode field's value. +func (s *DiskSnapshot) SetSupportCode(v string) *DiskSnapshot { + s.SupportCode = &v + return s +} + // Describes a domain where you are storing recordsets in Lightsail. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/Domain type Domain struct { @@ -7038,6 +8996,250 @@ func (s *GetBundlesOutput) SetNextPageToken(v string) *GetBundlesOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskRequest +type GetDiskInput struct { + _ struct{} `type:"structure"` + + // The name of the disk (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *GetDiskInput) SetDiskName(v string) *GetDiskInput { + s.DiskName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskResult +type GetDiskOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about the disk. + Disk *Disk `locationName:"disk" type:"structure"` +} + +// String returns the string representation +func (s GetDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskOutput) GoString() string { + return s.String() +} + +// SetDisk sets the Disk field's value. +func (s *GetDiskOutput) SetDisk(v *Disk) *GetDiskOutput { + s.Disk = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshotRequest +type GetDiskSnapshotInput struct { + _ struct{} `type:"structure"` + + // The name of the disk snapshot (e.g., my-disk-snapshot). + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDiskSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDiskSnapshotInput"} + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *GetDiskSnapshotInput) SetDiskSnapshotName(v string) *GetDiskSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshotResult +type GetDiskSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about the disk snapshot. + DiskSnapshot *DiskSnapshot `locationName:"diskSnapshot" type:"structure"` +} + +// String returns the string representation +func (s GetDiskSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskSnapshotOutput) GoString() string { + return s.String() +} + +// SetDiskSnapshot sets the DiskSnapshot field's value. +func (s *GetDiskSnapshotOutput) SetDiskSnapshot(v *DiskSnapshot) *GetDiskSnapshotOutput { + s.DiskSnapshot = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshotsRequest +type GetDiskSnapshotsInput struct { + _ struct{} `type:"structure"` + + // A token used for advancing to the next page of results from your GetDiskSnapshots + // request. + PageToken *string `locationName:"pageToken" type:"string"` +} + +// String returns the string representation +func (s GetDiskSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskSnapshotsInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetDiskSnapshotsInput) SetPageToken(v string) *GetDiskSnapshotsInput { + s.PageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshotsResult +type GetDiskSnapshotsOutput struct { + _ struct{} `type:"structure"` + + // An array of objects containing information about all block storage disk snapshots. + DiskSnapshots []*DiskSnapshot `locationName:"diskSnapshots" type:"list"` + + // A token used for advancing to the next page of results from your GetDiskSnapshots + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s GetDiskSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskSnapshotsOutput) GoString() string { + return s.String() +} + +// SetDiskSnapshots sets the DiskSnapshots field's value. +func (s *GetDiskSnapshotsOutput) SetDiskSnapshots(v []*DiskSnapshot) *GetDiskSnapshotsOutput { + s.DiskSnapshots = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetDiskSnapshotsOutput) SetNextPageToken(v string) *GetDiskSnapshotsOutput { + s.NextPageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisksRequest +type GetDisksInput struct { + _ struct{} `type:"structure"` + + // A token used for advancing to the next page of results from your GetDisks + // request. + PageToken *string `locationName:"pageToken" type:"string"` +} + +// String returns the string representation +func (s GetDisksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDisksInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetDisksInput) SetPageToken(v string) *GetDisksInput { + s.PageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisksResult +type GetDisksOutput struct { + _ struct{} `type:"structure"` + + // An array of objects containing information about all block storage disks. + Disks []*Disk `locationName:"disks" type:"list"` + + // A token used for advancing to the next page of results from your GetDisks + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s GetDisksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDisksOutput) GoString() string { + return s.String() +} + +// SetDisks sets the Disks field's value. +func (s *GetDisksOutput) SetDisks(v []*Disk) *GetDisksOutput { + s.Disks = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetDisksOutput) SetNextPageToken(v string) *GetDisksOutput { + s.NextPageToken = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomainRequest type GetDomainInput struct { _ struct{} `type:"structure"` @@ -8115,7 +10317,7 @@ type GetRegionsInput struct { // A Boolean value indicating whether to also include Availability Zones in // your get regions request. Availability Zones are indicated with a letter: - // e.g., us-east-1a. + // e.g., us-east-2a. IncludeAvailabilityZones *bool `locationName:"includeAvailabilityZones" type:"boolean"` } @@ -8366,7 +10568,7 @@ func (s *ImportKeyPairOutput) SetOperation(v *Operation) *ImportKeyPairOutput { type Instance struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-1:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). + // The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). Arn *string `locationName:"arn" type:"string"` // The blueprint ID (e.g., os_amlinux_2016_03). @@ -8394,7 +10596,7 @@ type Instance struct { // The region name and availability zone where the instance is located. Location *ResourceLocation `locationName:"location" type:"structure"` - // The name the user gave the instance (e.g., Amazon_Linux-1GB-Virginia-1). + // The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1). Name *string `locationName:"name" type:"string"` // Information about the public ports and monthly data transfer rates for the @@ -8562,9 +10764,26 @@ type InstanceAccessDetails struct { // The public IP address of the Amazon Lightsail instance. IpAddress *string `locationName:"ipAddress" type:"string"` - // For RDP access, the temporary password of the Amazon EC2 instance. + // For RDP access, the password for your Amazon Lightsail instance. Password + // will be an empty string if the password for your new instance is not ready + // yet. When you create an instance, it can take up to 15 minutes for the instance + // to be ready. + // + // If you create an instance using any key pair other than the default (LightsailDefaultKeyPair), + // password will always be an empty string. + // + // If you change the Administrator password on the instance, Lightsail will + // continue to return the original password value. When accessing the instance + // using RDP, you need to manually enter the Administrator password after changing + // it from the default. Password *string `locationName:"password" type:"string"` + // For a Windows Server-based instance, an object with the data you can use + // to retrieve your password. This is only needed if password is empty and the + // instance is not new (and therefore the password is not ready yet). When you + // create an instance, it can take up to 15 minutes for the instance to be ready. + PasswordData *PasswordData `locationName:"passwordData" type:"structure"` + // For SSH access, the temporary private key. For OpenSSH clients (e.g., command // line SSH), you should save this value to tempkey). PrivateKey *string `locationName:"privateKey" type:"string"` @@ -8616,6 +10835,12 @@ func (s *InstanceAccessDetails) SetPassword(v string) *InstanceAccessDetails { return s } +// SetPasswordData sets the PasswordData field's value. +func (s *InstanceAccessDetails) SetPasswordData(v *PasswordData) *InstanceAccessDetails { + s.PasswordData = v + return s +} + // SetPrivateKey sets the PrivateKey field's value. func (s *InstanceAccessDetails) SetPrivateKey(v string) *InstanceAccessDetails { s.PrivateKey = &v @@ -8882,12 +11107,15 @@ func (s *InstancePortState) SetToPort(v int64) *InstancePortState { type InstanceSnapshot struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-1:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). + // The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). Arn *string `locationName:"arn" type:"string"` // The timestamp when the snapshot was created (e.g., 1479907467.024). CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + // An array of disk objects containing information about all block storage disks. + FromAttachedDisks []*Disk `locationName:"fromAttachedDisks" type:"list"` + // The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). // A blueprint is a virtual private server (or instance) image used to create // instances quickly. @@ -8897,7 +11125,7 @@ type InstanceSnapshot struct { FromBundleId *string `locationName:"fromBundleId" type:"string"` // The Amazon Resource Name (ARN) of the instance from which the snapshot was - // created (e.g., arn:aws:lightsail:us-east-1:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). + // created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). FromInstanceArn *string `locationName:"fromInstanceArn" type:"string"` // The instance from which the snapshot was created. @@ -8949,6 +11177,12 @@ func (s *InstanceSnapshot) SetCreatedAt(v time.Time) *InstanceSnapshot { return s } +// SetFromAttachedDisks sets the FromAttachedDisks field's value. +func (s *InstanceSnapshot) SetFromAttachedDisks(v []*Disk) *InstanceSnapshot { + s.FromAttachedDisks = v + return s +} + // SetFromBlueprintId sets the FromBlueprintId field's value. func (s *InstanceSnapshot) SetFromBlueprintId(v string) *InstanceSnapshot { s.FromBlueprintId = &v @@ -9093,7 +11327,7 @@ func (s *IsVpcPeeredOutput) SetIsPeered(v bool) *IsVpcPeeredOutput { type KeyPair struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-1:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). + // The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). Arn *string `locationName:"arn" type:"string"` // The timestamp when the key pair was created (e.g., 1479816991.349). @@ -9374,7 +11608,7 @@ type Operation struct { // The region and Availability Zone. Location *ResourceLocation `locationName:"location" type:"structure"` - // Details about the operation (e.g., Debian-1GB-Virginia-1). + // Details about the operation (e.g., Debian-1GB-Ohio-1). OperationDetails *string `locationName:"operationDetails" type:"string"` // The type of operation. @@ -9475,6 +11709,59 @@ func (s *Operation) SetStatusChangedAt(v time.Time) *Operation { return s } +// The password data for the Windows Server-based instance, including the ciphertext +// and the key pair name. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PasswordData +type PasswordData struct { + _ struct{} `type:"structure"` + + // The encrypted password. Ciphertext will be an empty string if access to your + // new instance is not ready yet. When you create an instance, it can take up + // to 15 minutes for the instance to be ready. + // + // If you use the default key pair (LightsailDefaultKeyPair), the decrypted + // password will be available in the password field. + // + // If you are using a custom key pair, you need to use your own means of decryption. + // + // If you change the Administrator password on the instance, Lightsail will + // continue to return the original ciphertext value. When accessing the instance + // using RDP, you need to manually enter the Administrator password after changing + // it from the default. + Ciphertext *string `locationName:"ciphertext" type:"string"` + + // The name of the key pair that you used when creating your instance. If no + // key pair name was specified when creating the instance, Lightsail uses the + // default key pair (LightsailDefaultKeyPair). + // + // If you are using a custom key pair, you need to use your own means of decrypting + // your password using the ciphertext. Lightsail creates the ciphertext by encrypting + // your password with the public key part of this key pair. + KeyPairName *string `locationName:"keyPairName" type:"string"` +} + +// String returns the string representation +func (s PasswordData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PasswordData) GoString() string { + return s.String() +} + +// SetCiphertext sets the Ciphertext field's value. +func (s *PasswordData) SetCiphertext(v string) *PasswordData { + s.Ciphertext = &v + return s +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *PasswordData) SetKeyPairName(v string) *PasswordData { + s.KeyPairName = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpcRequest type PeerVpcInput struct { _ struct{} `type:"structure"` @@ -9703,7 +11990,7 @@ func (s *RebootInstanceOutput) SetOperations(v []*Operation) *RebootInstanceOutp type Region struct { _ struct{} `type:"structure"` - // The Availability Zones. Follows the format us-east-1a (case-sensitive). + // The Availability Zones. Follows the format us-east-2a (case-sensitive). AvailabilityZones []*AvailabilityZone `locationName:"availabilityZones" type:"list"` // The continent code (e.g., NA, meaning North America). @@ -9713,10 +12000,10 @@ type Region struct { // users in the eastern United States and eastern Canada). Description *string `locationName:"description" type:"string"` - // The display name (e.g., Virginia). + // The display name (e.g., Ohio). DisplayName *string `locationName:"displayName" type:"string"` - // The region name (e.g., us-east-1). + // The region name (e.g., us-east-2). Name *string `locationName:"name" type:"string" enum:"RegionName"` } @@ -9828,7 +12115,7 @@ func (s *ReleaseStaticIpOutput) SetOperations(v []*Operation) *ReleaseStaticIpOu type ResourceLocation struct { _ struct{} `type:"structure"` - // The Availability Zone. Follows the format us-east-1a (case-sensitive). + // The Availability Zone. Follows the format us-east-2a (case-sensitive). AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The AWS Region name. @@ -9925,10 +12212,10 @@ func (s *StartInstanceOutput) SetOperations(v []*Operation) *StartInstanceOutput type StaticIp struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-1:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE). + // The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-2:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE). Arn *string `locationName:"arn" type:"string"` - // The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Virginia-1). + // The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Ohio-1). AttachedTo *string `locationName:"attachedTo" type:"string"` // The timestamp when the static IP was created (e.g., 1479735304.222). @@ -9943,7 +12230,7 @@ type StaticIp struct { // The region and Availability Zone where the static IP was created. Location *ResourceLocation `locationName:"location" type:"structure"` - // The name of the static IP (e.g., StaticIP-Virginia-EXAMPLE). + // The name of the static IP (e.g., StaticIP-Ohio-EXAMPLE). Name *string `locationName:"name" type:"string"` // The resource type (usually StaticIp). @@ -10023,6 +12310,14 @@ func (s *StaticIp) SetSupportCode(v string) *StaticIp { type StopInstanceInput struct { _ struct{} `type:"structure"` + // When set to True, forces a Lightsail instance that is stuck in a stopping + // state to stop. + // + // Only use the force parameter if your instance is stuck in the stopping state. + // In any other state, your instance should stop normally without adding this + // parameter to your API request. + Force *bool `locationName:"force" type:"boolean"` + // The name of the instance (a virtual private server) to stop. // // InstanceName is a required field @@ -10052,6 +12347,12 @@ func (s *StopInstanceInput) Validate() error { return nil } +// SetForce sets the Force field's value. +func (s *StopInstanceInput) SetForce(v bool) *StopInstanceInput { + s.Force = &v + return s +} + // SetInstanceName sets the InstanceName field's value. func (s *StopInstanceInput) SetInstanceName(v string) *StopInstanceInput { s.InstanceName = &v @@ -10214,6 +12515,37 @@ const ( BlueprintTypeApp = "app" ) +const ( + // DiskSnapshotStatePending is a DiskSnapshotState enum value + DiskSnapshotStatePending = "pending" + + // DiskSnapshotStateCompleted is a DiskSnapshotState enum value + DiskSnapshotStateCompleted = "completed" + + // DiskSnapshotStateError is a DiskSnapshotState enum value + DiskSnapshotStateError = "error" + + // DiskSnapshotStateUnknown is a DiskSnapshotState enum value + DiskSnapshotStateUnknown = "unknown" +) + +const ( + // DiskStatePending is a DiskState enum value + DiskStatePending = "pending" + + // DiskStateError is a DiskState enum value + DiskStateError = "error" + + // DiskStateAvailable is a DiskState enum value + DiskStateAvailable = "available" + + // DiskStateInUse is a DiskState enum value + DiskStateInUse = "in-use" + + // DiskStateUnknown is a DiskState enum value + DiskStateUnknown = "unknown" +) + const ( // InstanceAccessProtocolSsh is a InstanceAccessProtocol enum value InstanceAccessProtocolSsh = "ssh" @@ -10242,6 +12574,14 @@ const ( InstanceMetricNameStatusCheckFailedSystem = "StatusCheckFailed_System" ) +const ( + // InstancePlatformLinuxUnix is a InstancePlatform enum value + InstancePlatformLinuxUnix = "LINUX_UNIX" + + // InstancePlatformWindows is a InstancePlatform enum value + InstancePlatformWindows = "WINDOWS" +) + const ( // InstanceSnapshotStatePending is a InstanceSnapshotState enum value InstanceSnapshotStatePending = "pending" @@ -10435,6 +12775,27 @@ const ( // OperationTypeCreateInstancesFromSnapshot is a OperationType enum value OperationTypeCreateInstancesFromSnapshot = "CreateInstancesFromSnapshot" + + // OperationTypeCreateDisk is a OperationType enum value + OperationTypeCreateDisk = "CreateDisk" + + // OperationTypeDeleteDisk is a OperationType enum value + OperationTypeDeleteDisk = "DeleteDisk" + + // OperationTypeAttachDisk is a OperationType enum value + OperationTypeAttachDisk = "AttachDisk" + + // OperationTypeDetachDisk is a OperationType enum value + OperationTypeDetachDisk = "DetachDisk" + + // OperationTypeCreateDiskSnapshot is a OperationType enum value + OperationTypeCreateDiskSnapshot = "CreateDiskSnapshot" + + // OperationTypeDeleteDiskSnapshot is a OperationType enum value + OperationTypeDeleteDiskSnapshot = "DeleteDiskSnapshot" + + // OperationTypeCreateDiskFromSnapshot is a OperationType enum value + OperationTypeCreateDiskFromSnapshot = "CreateDiskFromSnapshot" ) const ( @@ -10506,4 +12867,10 @@ const ( // ResourceTypePeeredVpc is a ResourceType enum value ResourceTypePeeredVpc = "PeeredVpc" + + // ResourceTypeDisk is a ResourceType enum value + ResourceTypeDisk = "Disk" + + // ResourceTypeDiskSnapshot is a ResourceType enum value + ResourceTypeDiskSnapshot = "DiskSnapshot" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go index a07989bc2..9c52815bb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go @@ -24,7 +24,7 @@ // // Using the Client // -// To Amazon Lightsail with the SDK use the New function to create +// To contact Amazon Lightsail with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go index 534193a11..1808249f1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go @@ -81,7 +81,7 @@ // // Using the Client // -// To AWS OpsWorks with the SDK use the New function to create +// To contact AWS OpsWorks with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 459af9746..787706aae 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -609,10 +609,10 @@ func (c *RDS) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (r // // * PreSignedUrl - A URL that contains a Signature Version 4 signed request // for the CopyDBClusterSnapshot action to be called in the source AWS Region -// where the DB cluster snapshot will be copied from. The pre-signed URL -// must be a valid request for the CopyDBClusterSnapshot API action that -// can be executed in the source AWS Region that contains the encrypted DB -// cluster snapshot to be copied. +// where the DB cluster snapshot is copied from. The pre-signed URL must +// be a valid request for the CopyDBClusterSnapshot API action that can be +// executed in the source AWS Region that contains the encrypted DB cluster +// snapshot to be copied. // // The pre-signed URL request must contain the following parameter values: // @@ -2037,12 +2037,12 @@ func (c *RDS) CreateEventSubscriptionRequest(input *CreateEventSubscriptionInput // mydbinstance2 and EventCategories = Availability, Backup. // // If you specify both the SourceType and SourceIds, such as SourceType = db-instance -// and SourceIdentifier = myDBInstance1, you will be notified of all the db-instance +// and SourceIdentifier = myDBInstance1, you are notified of all the db-instance // events for the specified source. If you specify a SourceType but do not specify -// a SourceIdentifier, you will receive notice of the events for that source -// type for all your RDS sources. If you do not specify either the SourceType -// nor the SourceIdentifier, you will be notified of events generated from all -// RDS sources belonging to your customer account. +// a SourceIdentifier, you receive notice of the events for that source type +// for all your RDS sources. If you do not specify either the SourceType nor +// the SourceIdentifier, you are notified of events generated from all RDS sources +// belonging to your customer account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2510,7 +2510,7 @@ func (c *RDS) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *reques // the SkipFinalSnapshot parameter is set to true. // // If the specified DB instance is part of an Amazon Aurora DB cluster, you -// cannot delete the DB instance if the following are true: +// cannot delete the DB instance if both of the following conditions are true: // // * The DB cluster is a Read Replica of another Amazon Aurora DB cluster. // @@ -6214,6 +6214,90 @@ func (c *RDS) DescribeSourceRegionsWithContext(ctx aws.Context, input *DescribeS return out, req.Send() } +const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModifications" + +// DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeValidDBInstanceModifications operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeValidDBInstanceModifications for more information on using the DescribeValidDBInstanceModifications +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeValidDBInstanceModificationsRequest method. +// req, resp := client.DescribeValidDBInstanceModificationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications +func (c *RDS) DescribeValidDBInstanceModificationsRequest(input *DescribeValidDBInstanceModificationsInput) (req *request.Request, output *DescribeValidDBInstanceModificationsOutput) { + op := &request.Operation{ + Name: opDescribeValidDBInstanceModifications, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeValidDBInstanceModificationsInput{} + } + + output = &DescribeValidDBInstanceModificationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeValidDBInstanceModifications API operation for Amazon Relational Database Service. +// +// You can call DescribeValidDBInstanceModifications to learn what modifications +// you can make to your DB instance. You can use this information when you call +// ModifyDBInstance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation DescribeValidDBInstanceModifications for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications +func (c *RDS) DescribeValidDBInstanceModifications(input *DescribeValidDBInstanceModificationsInput) (*DescribeValidDBInstanceModificationsOutput, error) { + req, out := c.DescribeValidDBInstanceModificationsRequest(input) + return out, req.Send() +} + +// DescribeValidDBInstanceModificationsWithContext is the same as DescribeValidDBInstanceModifications with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeValidDBInstanceModifications for details on how to use this API operation. +// +// 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 *RDS) DescribeValidDBInstanceModificationsWithContext(ctx aws.Context, input *DescribeValidDBInstanceModificationsInput, opts ...request.Option) (*DescribeValidDBInstanceModificationsOutput, error) { + req, out := c.DescribeValidDBInstanceModificationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDownloadDBLogFilePortion = "DownloadDBLogFilePortion" // DownloadDBLogFilePortionRequest generates a "aws/request.Request" representing the @@ -6907,7 +6991,8 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // // Modifies settings for a DB instance. You can change one or more database // configuration parameters by specifying these parameters and the new values -// in the request. +// in the request. To learn what modifications you can make to your DB instance, +// call DescribeValidDBInstanceModifications before you call ModifyDBInstance. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7140,11 +7225,9 @@ func (c *RDS) ModifyDBSnapshotRequest(input *ModifyDBSnapshotInput) (req *reques // ModifyDBSnapshot API operation for Amazon Relational Database Service. // // Updates a manual DB snapshot, which can be encrypted or not encrypted, with -// a new engine version. You can update the engine version to either a new major -// or minor engine version. +// a new engine version. // -// Amazon RDS supports upgrading a MySQL DB snapshot from MySQL 5.1 to MySQL -// 5.5. +// Amazon RDS supports upgrading DB snapshots for MySQL and Oracle. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7863,8 +7946,8 @@ func (c *RDS) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *reques // group that were pending. Rebooting a DB instance results in a momentary outage // of the instance, during which the DB instance status is set to rebooting. // If the RDS instance is configured for MultiAZ, it is possible that the reboot -// will be conducted through a failover. An Amazon RDS event is created when -// the reboot is completed. +// is conducted through a failover. An Amazon RDS event is created when the +// reboot is completed. // // If your DB instance is deployed in multiple Availability Zones, you can force // a failover from one AZ to the other during the reboot. You might force a @@ -8531,10 +8614,15 @@ func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSna // RestoreDBClusterFromSnapshot API operation for Amazon Relational Database Service. // -// Creates a new DB cluster from a DB cluster snapshot. The target DB cluster -// is created from the source DB cluster restore point with the same configuration -// as the original source DB cluster, except that the new DB cluster is created -// with the default security group. +// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. +// +// If a DB snapshot is specified, the target DB cluster is created from the +// source DB snapshot with a default configuration and default security group. +// +// If a DB cluster snapshot is specified, the target DB cluster is created from +// the source DB cluster restore point with the same configuration as the original +// source DB cluster, except that the new DB cluster is created with the default +// security group. // // For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) // in the Amazon RDS User Guide. @@ -9505,9 +9593,7 @@ func (s AddRoleToDBClusterOutput) GoString() string { type AddSourceIdentifierToSubscriptionInput struct { _ struct{} `type:"structure"` - // The identifier of the event source to be added. An identifier must begin - // with a letter and must contain only ASCII letters, digits, and hyphens; it - // cannot end with a hyphen or contain two consecutive hyphens. + // The identifier of the event source to be added. // // Constraints: // @@ -9600,7 +9686,7 @@ func (s *AddSourceIdentifierToSubscriptionOutput) SetEventSubscription(v *EventS type AddTagsToResourceInput struct { _ struct{} `type:"structure"` - // The Amazon RDS resource the tags will be added to. This value is an Amazon + // The Amazon RDS resource that the tags are added to. This value is an Amazon // Resource Name (ARN). For information about creating an ARN, see Constructing // an RDS Amazon Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). // @@ -10058,7 +10144,7 @@ type CopyDBClusterParameterGroupInput struct { // // * Cannot be null, empty, or blank // - // * Must contain from 1 to 255 alphanumeric characters or hyphens + // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // @@ -10225,12 +10311,6 @@ type CopyDBClusterSnapshotInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // // * Must specify a valid system snapshot in the "available" state. // // * If the source snapshot is in the same AWS Region as the copy, specify @@ -10258,7 +10338,7 @@ type CopyDBClusterSnapshotInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // * Must contain from 1 to 63 letters, numbers, or hyphens. // // * First character must be a letter. // @@ -10407,7 +10487,7 @@ type CopyDBParameterGroupInput struct { // // * Cannot be null, empty, or blank // - // * Must contain from 1 to 255 alphanumeric characters or hyphens + // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // @@ -10555,9 +10635,9 @@ type CopyDBSnapshotInput struct { // DB snapshot to be copied. The presigned URL request must contain the following // parameter values: // - // * DestinationRegion - The AWS Region that the encrypted DB snapshot will - // be copied to. This AWS Region is the same one where the CopyDBSnapshot - // action is called that contains this presigned URL. + // * DestinationRegion - The AWS Region that the encrypted DB snapshot is + // copied to. This AWS Region is the same one where the CopyDBSnapshot action + // is called that contains this presigned URL. // // For example, if you copy an encrypted DB snapshot from the us-west-2 region // to the us-east-1 region, then you call the CopyDBSnapshot action in the @@ -10622,7 +10702,7 @@ type CopyDBSnapshotInput struct { // // * Cannot be null, empty, or blank // - // * Must contain from 1 to 255 alphanumeric characters or hyphens + // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // @@ -10779,7 +10859,7 @@ type CopyOptionGroupInput struct { // // * Cannot be null, empty, or blank // - // * Must contain from 1 to 255 alphanumeric characters or hyphens + // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // @@ -10894,7 +10974,7 @@ type CreateDBClusterInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // * Must contain from 1 to 63 letters, numbers, or hyphens. // // * First character must be a letter. // @@ -10906,21 +10986,17 @@ type CreateDBClusterInput struct { DBClusterIdentifier *string `type:"string" required:"true"` // The name of the DB cluster parameter group to associate with this DB cluster. - // If this argument is omitted, default.aurora5.6 will be used. + // If this argument is omitted, default.aurora5.6 is used. // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the name of an existing DBClusterParameterGroup. DBClusterParameterGroupName *string `type:"string"` // A DB subnet group to associate with this DB cluster. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -10960,10 +11036,17 @@ type CreateDBClusterInput struct { // the KMS encryption key used to encrypt the new DB cluster, then you can use // the KMS key alias instead of the ARN for the KMS encryption key. // - // If the StorageEncrypted parameter is true, and you do not specify a value - // for the KmsKeyId parameter, then Amazon RDS will use your default encryption - // key. AWS KMS creates the default encryption key for your AWS account. Your - // AWS account has a different default encryption key for each AWS Region. + // If an encryption key is not specified in KmsKeyId: + // + // * If ReplicationSourceIdentifier identifies an encrypted source, then + // Amazon RDS will use the encryption key used to encrypt the source. Otherwise, + // Amazon RDS will use your default encryption key. + // + // * If the StorageEncrypted parameter is true and ReplicationSourceIdentifier + // is not specified, then Amazon RDS will use your default encryption key. + // + // AWS KMS creates the default encryption key for your AWS account. Your AWS + // account has a different default encryption key for each AWS Region. // // If you create a Read Replica of an encrypted DB cluster in another AWS Region, // you must set KmsKeyId to a KMS key ID that is valid in the destination AWS @@ -10980,7 +11063,7 @@ type CreateDBClusterInput struct { // // Constraints: // - // * Must be 1 to 16 alphanumeric characters. + // * Must be 1 to 16 letters or numbers. // // * First character must be a letter. // @@ -11000,9 +11083,9 @@ type CreateDBClusterInput struct { Port *int64 `type:"integer"` // A URL that contains a Signature Version 4 signed request for the CreateDBCluster - // action to be called in the source AWS Region where the DB cluster will be - // replicated from. You only need to specify PreSignedUrl when you are performing - // cross-region replication from an encrypted DB cluster. + // action to be called in the source AWS Region where the DB cluster is replicated + // from. You only need to specify PreSignedUrl when you are performing cross-region + // replication from an encrypted DB cluster. // // The pre-signed URL must be a valid request for the CreateDBCluster API action // that can be executed in the source AWS Region that contains the encrypted @@ -11299,11 +11382,7 @@ type CreateDBClusterParameterGroupInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the name of an existing DBClusterParameterGroup. // // This value is stored as a lowercase string. // @@ -11418,11 +11497,7 @@ type CreateDBClusterSnapshotInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Must match the identifier of an existing DBCluster. // // Example: my-cluster1 // @@ -11434,7 +11509,7 @@ type CreateDBClusterSnapshotInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // * Must contain from 1 to 63 letters, numbers, or hyphens. // // * First character must be a letter. // @@ -11602,15 +11677,14 @@ type CreateDBInstanceInput struct { // Web and Express editions: Must be an integer from 20 to 1024. AllocatedStorage *int64 `type:"integer"` - // Indicates that minor engine upgrades will be applied automatically to the - // DB instance during the maintenance window. + // Indicates that minor engine upgrades are applied automatically to the DB + // instance during the maintenance window. // // Default: true AutoMinorVersionUpgrade *bool `type:"boolean"` - // The EC2 Availability Zone that the database instance will be created in. - // For information on regions and Availability Zones, see Regions and Availability - // Zones (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). + // The EC2 Availability Zone that the database instance is created in. For information + // on regions and Availability Zones, see Regions and Availability Zones (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). // // Default: A random, system-chosen Availability Zone in the endpoint's AWS // Region. @@ -11660,15 +11734,11 @@ type CreateDBInstanceInput struct { // Type: String DBClusterIdentifier *string `type:"string"` - // The compute and memory capacity of the DB instance. Note that not all instance - // classes are available in all regions for all DB engines. - // - // Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge - // | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large - // | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge - // | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge - // | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium - // | db.t2.large + // The compute and memory capacity of the DB instance, for example, db.m4.large. + // Not all DB instance classes are available in all regions, or for all database + // engines. For the full list of DB instance classes, and availability for your + // engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. // // DBInstanceClass is a required field DBInstanceClass *string `type:"string" required:"true"` @@ -11677,7 +11747,7 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // * Must contain from 1 to 63 letters, numbers, or hyphens. // // * First character must be a letter. // @@ -11700,7 +11770,7 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must contain 1 to 64 alphanumeric characters + // * Must contain 1 to 64 letters or numbers. // // * Cannot be a word reserved by the specified database engine // @@ -11711,7 +11781,7 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must contain 1 to 64 alphanumeric characters + // * Must contain 1 to 64 letters or numbers. // // * Cannot be a word reserved by the specified database engine // @@ -11723,7 +11793,7 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must contain 1 to 63 alphanumeric characters + // * Must contain 1 to 63 letters, numbers, or underscores. // // * Must begin with a letter or an underscore. Subsequent characters can // be letters, underscores, or digits (0-9). @@ -11754,18 +11824,18 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must contain 1 to 64 alphanumeric characters + // * Must contain 1 to 64 letters or numbers. // // * Cannot be a word reserved by the specified database engine DBName *string `type:"string"` // The name of the DB parameter group to associate with this DB instance. If // this argument is omitted, the default DBParameterGroup for the specified - // engine will be used. + // engine is used. // // Constraints: // - // * Must be 1 to 255 alphanumeric characters + // * Must be 1 to 255 letters, numbers, or hyphens. // // * First character must be a letter // @@ -11808,6 +11878,9 @@ type CreateDBInstanceInput struct { // Default: false EnableIAMDatabaseAuthentication *bool `type:"boolean"` + // True to enable Performance Insights for the DB instance; otherwise false. + EnablePerformanceInsights *bool `type:"boolean"` + // The name of the database engine to be used for this instance. // // Not every database engine is available for every AWS Region. @@ -11908,12 +11981,16 @@ type CreateDBInstanceInput struct { // // MySQL // - // 5.7.17 (supported in all AWS regions) + // 5.7.19 (supported in all AWS regions) + // + // * 5.7.17 (supported in all AWS regions) // // * 5.7.16 (supported in all AWS regions) // // * 5.7.11 (supported in all AWS regions) // + // * 5.6.37 (supported in all AWS regions) + // // * 5.6.35 (supported in all AWS regions) // // * 5.6.34 (supported in all AWS regions) @@ -11922,6 +11999,8 @@ type CreateDBInstanceInput struct { // // * 5.6.27 (supported in all regions except us-east-2, ca-central-1, eu-west-2) // + // 5.5.57(supported in all AWS regions) + // // 5.5.54(supported in all AWS regions) // // 5.5.53(supported in all AWS regions) @@ -11930,6 +12009,8 @@ type CreateDBInstanceInput struct { // // Oracle 12c // + // 12.1.0.2.v9(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1) + // // 12.1.0.2.v8(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1) // // 12.1.0.2.v7(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1) @@ -11948,6 +12029,8 @@ type CreateDBInstanceInput struct { // // Oracle 11g // + // 11.2.0.4.v13(supported for EE, SE1, and SE, in all AWS regions) + // // 11.2.0.4.v12(supported for EE, SE1, and SE, in all AWS regions) // // 11.2.0.4.v11(supported for EE, SE1, and SE, in all AWS regions) @@ -11972,13 +12055,13 @@ type CreateDBInstanceInput struct { // // PostgreSQL // - // Version 9.6.x: 9.6.1 | 9.6.2 + // Version 9.6.x: 9.6.5 | 9.6.3 | 9.6.2 | 9.6.1 // - // Version 9.5.x:9.5.6 | 9.5.4 | 9.5.2 + // Version 9.5.x: 9.5.9 | 9.5.7 | 9.5.6 | 9.5.4 | 9.5.2 // - // Version 9.4.x:9.4.11 | 9.4.9 | 9.4.7 + // Version 9.4.x: 9.4.14 | 9.4.12 | 9.4.11 | 9.4.9 | 9.4.7 // - // Version 9.3.x:9.3.16 | 9.3.14 | 9.3.12 + // Version 9.3.x: 9.3.19 | 9.3.17 | 9.3.16 | 9.3.14 | 9.3.12 EngineVersion *string `type:"string"` // The amount of Provisioned IOPS (input/output operations per second) to be @@ -12053,7 +12136,9 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must be 1 to 16 alphanumeric characters. + // * Required for MariaDB. + // + // * Must be 1 to 16 letters or numbers. // // * Cannot be a reserved word for the chosen database engine. // @@ -12061,9 +12146,11 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must be 1 to 128 alphanumeric characters. + // * Required for SQL Server. // - // * First character must be a letter. + // * Must be 1 to 128 letters or numbers. + // + // * The first character must be a letter. // // * Cannot be a reserved word for the chosen database engine. // @@ -12071,7 +12158,9 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must be 1 to 16 alphanumeric characters. + // * Required for MySQL. + // + // * Must be 1 to 16 letters or numbers. // // * First character must be a letter. // @@ -12081,7 +12170,9 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must be 1 to 30 alphanumeric characters. + // * Required for Oracle. + // + // * Must be 1 to 30 letters or numbers. // // * First character must be a letter. // @@ -12091,7 +12182,9 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Must be 1 to 63 alphanumeric characters. + // * Required for PostgreSQL. + // + // * Must be 1 to 63 letters or numbers. // // * First character must be a letter. // @@ -12129,6 +12222,11 @@ type CreateDBInstanceInput struct { // from a DB instance once it is associated with a DB instance OptionGroupName *string `type:"string"` + // The KMS key identifier for encryption of Performance Insights data. The KMS + // key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS + // key alias for the KMS encryption key. + PerformanceInsightsKMSKeyId *string `type:"string"` + // The port number on which the database accepts connections. // // MySQL @@ -12239,9 +12337,9 @@ type CreateDBInstanceInput struct { // * VPC: false // // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance will be publicly accessible. If a - // specific DB subnet group has been specified as part of the request and the - // PubliclyAccessible value has not been set, the DB instance will be private. + // value has not been set, the DB instance is publicly accessible. If a specific + // DB subnet group has been specified as part of the request and the PubliclyAccessible + // value has not been set, the DB instance is private. PubliclyAccessible *bool `type:"boolean"` // Specifies whether the DB instance is encrypted. @@ -12413,6 +12511,12 @@ func (s *CreateDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *Crea return s } +// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. +func (s *CreateDBInstanceInput) SetEnablePerformanceInsights(v bool) *CreateDBInstanceInput { + s.EnablePerformanceInsights = &v + return s +} + // SetEngine sets the Engine field's value. func (s *CreateDBInstanceInput) SetEngine(v string) *CreateDBInstanceInput { s.Engine = &v @@ -12479,6 +12583,12 @@ func (s *CreateDBInstanceInput) SetOptionGroupName(v string) *CreateDBInstanceIn return s } +// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. +func (s *CreateDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *CreateDBInstanceInput { + s.PerformanceInsightsKMSKeyId = &v + return s +} + // SetPort sets the Port field's value. func (s *CreateDBInstanceInput) SetPort(v int64) *CreateDBInstanceInput { s.Port = &v @@ -12591,13 +12701,13 @@ func (s *CreateDBInstanceOutput) SetDBInstance(v *DBInstance) *CreateDBInstanceO type CreateDBInstanceReadReplicaInput struct { _ struct{} `type:"structure"` - // Indicates that minor engine upgrades will be applied automatically to the - // Read Replica during the maintenance window. + // Indicates that minor engine upgrades are applied automatically to the Read + // Replica during the maintenance window. // // Default: Inherits from the source DB instance AutoMinorVersionUpgrade *bool `type:"boolean"` - // The Amazon EC2 Availability Zone that the Read Replica will be created in. + // The Amazon EC2 Availability Zone that the Read Replica is created in. // // Default: A random, system-chosen Availability Zone in the endpoint's AWS // Region. @@ -12609,14 +12719,11 @@ type CreateDBInstanceReadReplicaInput struct { // otherwise false. The default is false. CopyTagsToSnapshot *bool `type:"boolean"` - // The compute and memory capacity of the Read Replica. Note that not all instance - // classes are available in all regions for all DB engines. - // - // Valid Values: db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge - // |db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge - // | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge - // | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge - // | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large + // The compute and memory capacity of the Read Replica, for example, db.m4.large. + // Not all DB instance classes are available in all regions, or for all database + // engines. For the full list of DB instance classes, and availability for your + // engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. // // Default: Inherits from the source DB instance. DBInstanceClass *string `type:"string"` @@ -12628,30 +12735,29 @@ type CreateDBInstanceReadReplicaInput struct { // DBInstanceIdentifier is a required field DBInstanceIdentifier *string `type:"string" required:"true"` - // Specifies a DB subnet group for the DB instance. The new DB instance will - // be created in the VPC associated with the DB subnet group. If no DB subnet - // group is specified, then the new DB instance is not created in a VPC. + // Specifies a DB subnet group for the DB instance. The new DB instance is created + // in the VPC associated with the DB subnet group. If no DB subnet group is + // specified, then the new DB instance is not created in a VPC. // // Constraints: // // * Can only be specified if the source DB instance identifier specifies // a DB instance in another AWS Region. // + // * If supplied, must match the name of an existing DBSubnetGroup. + // // * The specified DB subnet group must be in the same AWS Region in which // the operation is running. // // * All Read Replicas in one AWS Region that are created from the same source // DB instance must either:> // - // Specify DB subnet groups from the same VPC. All these Read Replicas will - // be created in the same VPC. + // Specify DB subnet groups from the same VPC. All these Read Replicas are created + // in the same VPC. // - // Not specify a DB subnet group. All these Read Replicas will be created outside + // Not specify a DB subnet group. All these Read Replicas are created outside // of any VPC. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. - // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -12672,6 +12778,9 @@ type CreateDBInstanceReadReplicaInput struct { // Default: false EnableIAMDatabaseAuthentication *bool `type:"boolean"` + // True to enable Performance Insights for the read replica; otherwise false. + EnablePerformanceInsights *bool `type:"boolean"` + // The amount of Provisioned IOPS (input/output operations per second) to be // initially allocated for the DB instance. Iops *int64 `type:"integer"` @@ -12712,10 +12821,15 @@ type CreateDBInstanceReadReplicaInput struct { // a MonitoringRoleArn value. MonitoringRoleArn *string `type:"string"` - // The option group the DB instance will be associated with. If omitted, the - // default option group for the engine specified will be used. + // The option group the DB instance is associated with. If omitted, the default + // option group for the engine specified is used. OptionGroupName *string `type:"string"` + // The KMS key identifier for encryption of Performance Insights data. The KMS + // key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS + // key alias for the KMS encryption key. + PerformanceInsightsKMSKeyId *string `type:"string"` + // The port number that the DB instance uses for connections. // // Default: Inherits from the source DB instance @@ -12736,8 +12850,8 @@ type CreateDBInstanceReadReplicaInput struct { // encrypted source DB instance. The presigned URL request must contain the // following parameter values: // - // * DestinationRegion - The AWS Region that the encrypted Read Replica will - // be created in. This AWS Region is the same one where the CreateDBInstanceReadReplica + // * DestinationRegion - The AWS Region that the encrypted Read Replica is + // created in. This AWS Region is the same one where the CreateDBInstanceReadReplica // action is called that contains this presigned URL. // // For example, if you create an encrypted DB instance in the us-west-1 region, @@ -12779,9 +12893,9 @@ type CreateDBInstanceReadReplicaInput struct { // * VPC:false // // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance will be publicly accessible. If a - // specific DB subnet group has been specified as part of the request and the - // PubliclyAccessible value has not been set, the DB instance will be private. + // value has not been set, the DB instance is publicly accessible. If a specific + // DB subnet group has been specified as part of the request and the PubliclyAccessible + // value has not been set, the DB instance is private. PubliclyAccessible *bool `type:"boolean"` // The identifier of the DB instance that will act as the source for the Read @@ -12904,6 +13018,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetEnableIAMDatabaseAuthentication(v return s } +// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. +func (s *CreateDBInstanceReadReplicaInput) SetEnablePerformanceInsights(v bool) *CreateDBInstanceReadReplicaInput { + s.EnablePerformanceInsights = &v + return s +} + // SetIops sets the Iops field's value. func (s *CreateDBInstanceReadReplicaInput) SetIops(v int64) *CreateDBInstanceReadReplicaInput { s.Iops = &v @@ -12934,6 +13054,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetOptionGroupName(v string) *CreateD return s } +// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. +func (s *CreateDBInstanceReadReplicaInput) SetPerformanceInsightsKMSKeyId(v string) *CreateDBInstanceReadReplicaInput { + s.PerformanceInsightsKMSKeyId = &v + return s +} + // SetPort sets the Port field's value. func (s *CreateDBInstanceReadReplicaInput) SetPort(v int64) *CreateDBInstanceReadReplicaInput { s.Port = &v @@ -13028,7 +13154,7 @@ type CreateDBParameterGroupInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters + // * Must be 1 to 255 letters, numbers, or hyphens. // // * First character must be a letter // @@ -13142,7 +13268,7 @@ type CreateDBSecurityGroupInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters + // * Must be 1 to 255 letters, numbers, or hyphens. // // * First character must be a letter // @@ -13242,15 +13368,11 @@ func (s *CreateDBSecurityGroupOutput) SetDBSecurityGroup(v *DBSecurityGroup) *Cr type CreateDBSnapshotInput struct { _ struct{} `type:"structure"` - // The DB instance identifier. This is the unique key that identifies a DB instance. + // The identifier of the DB instance that you want to create the snapshot of. // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing DBInstance. // // DBInstanceIdentifier is a required field DBInstanceIdentifier *string `type:"string" required:"true"` @@ -13261,7 +13383,7 @@ type CreateDBSnapshotInput struct { // // * Cannot be null, empty, or blank // - // * Must contain from 1 to 255 alphanumeric characters or hyphens + // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // @@ -13361,8 +13483,8 @@ type CreateDBSubnetGroupInput struct { // The name for the DB subnet group. This value is stored as a lowercase string. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: Must contain no more than 255 letters, numbers, periods, underscores, + // spaces, or hyphens. Must not be default. // // Example: mySubnetgroup // @@ -13488,7 +13610,7 @@ type CreateEventSubscriptionInput struct { // SnsTopicArn is a required field SnsTopicArn *string `type:"string" required:"true"` - // The list of identifiers of the event sources for which events will be returned. + // The list of identifiers of the event sources for which events are returned. // If not specified, then all sources are included in the response. An identifier // must begin with a letter and must contain only ASCII letters, digits, and // hyphens; it cannot end with a hyphen or contain two consecutive hyphens. @@ -13510,10 +13632,9 @@ type CreateEventSubscriptionInput struct { // supplied. SourceIds []*string `locationNameList:"SourceId" type:"list"` - // The type of source that will be generating the events. For example, if you - // want to be notified of events generated by a DB instance, you would set this - // parameter to db-instance. if this value is not specified, all events are - // returned. + // The type of source that is generating the events. For example, if you want + // to be notified of events generated by a DB instance, you would set this parameter + // to db-instance. if this value is not specified, all events are returned. // // Valid values: db-instance | db-cluster | db-parameter-group | db-security-group // | db-snapshot | db-cluster-snapshot @@ -13648,7 +13769,7 @@ type CreateOptionGroupInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters or hyphens + // * Must be 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // @@ -13887,9 +14008,9 @@ type DBCluster struct { // multiple Aurora Replicas in your DB cluster. // // If a failover occurs, and the Aurora Replica that you are connected to is - // promoted to be the primary instance, your connection will be dropped. To - // continue sending your read workload to other Aurora Replicas in the cluster, - // you can then reconnect to the reader endpoint. + // promoted to be the primary instance, your connection is dropped. To continue + // sending your read workload to other Aurora Replicas in the cluster, you can + // then reconnect to the reader endpoint. ReaderEndpoint *string `type:"string"` // Contains the identifier of the source DB cluster if this DB cluster is a @@ -14283,7 +14404,7 @@ type DBClusterParameterGroupNameMessage struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters + // * Must be 1 to 255 letters or numbers. // // * First character must be a letter // @@ -14919,6 +15040,14 @@ type DBInstance struct { // included when changes are pending. Specific changes are identified by subelements. PendingModifiedValues *PendingModifiedValues `type:"structure"` + // True if Performance Insights is enabled for the DB instance; otherwise false. + PerformanceInsightsEnabled *bool `type:"boolean"` + + // The KMS key identifier for encryption of Performance Insights data. The KMS + // key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS + // key alias for the KMS encryption key. + PerformanceInsightsKMSKeyId *string `type:"string"` + // Specifies the daily time range during which automated backups are created // if automated backups are enabled, as determined by the BackupRetentionPeriod. PreferredBackupWindow *string `type:"string"` @@ -14945,9 +15074,9 @@ type DBInstance struct { // * VPC:false // // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance will be publicly accessible. If a - // specific DB subnet group has been specified as part of the request and the - // PubliclyAccessible value has not been set, the DB instance will be private. + // value has not been set, the DB instance is publicly accessible. If a specific + // DB subnet group has been specified as part of the request and the PubliclyAccessible + // value has not been set, the DB instance is private. PubliclyAccessible *bool `type:"boolean"` // Contains one or more identifiers of Aurora DB clusters that are Read Replicas @@ -14967,7 +15096,7 @@ type DBInstance struct { SecondaryAvailabilityZone *string `type:"string"` // The status of a Read Replica. If the instance is not a Read Replica, this - // will be blank. + // is blank. StatusInfos []*DBInstanceStatusInfo `locationNameList:"DBInstanceStatusInfo" type:"list"` // Specifies whether the DB instance is encrypted. @@ -15210,6 +15339,18 @@ func (s *DBInstance) SetPendingModifiedValues(v *PendingModifiedValues) *DBInsta return s } +// SetPerformanceInsightsEnabled sets the PerformanceInsightsEnabled field's value. +func (s *DBInstance) SetPerformanceInsightsEnabled(v bool) *DBInstance { + s.PerformanceInsightsEnabled = &v + return s +} + +// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. +func (s *DBInstance) SetPerformanceInsightsKMSKeyId(v string) *DBInstance { + s.PerformanceInsightsKMSKeyId = &v + return s +} + // SetPreferredBackupWindow sets the PreferredBackupWindow field's value. func (s *DBInstance) SetPreferredBackupWindow(v string) *DBInstance { s.PreferredBackupWindow = &v @@ -16054,11 +16195,7 @@ type DeleteDBClusterInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match an existing DBClusterIdentifier. // // DBClusterIdentifier is a required field DBClusterIdentifier *string `type:"string" required:"true"` @@ -16071,7 +16208,7 @@ type DeleteDBClusterInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters + // * Must be 1 to 255 letters, numbers, or hyphens. // // * First character must be a letter // @@ -16312,11 +16449,7 @@ type DeleteDBInstanceInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the name of an existing DB instance. // // DBInstanceIdentifier is a required field DBInstanceIdentifier *string `type:"string" required:"true"` @@ -16329,7 +16462,7 @@ type DeleteDBInstanceInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters + // * Must be 1 to 255 letters or numbers. // // * First character must be a letter // @@ -16504,7 +16637,7 @@ type DeleteDBSecurityGroupInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters + // * Must be 1 to 255 letters, numbers, or hyphens. // // * First character must be a letter // @@ -16642,8 +16775,8 @@ type DeleteDBSubnetGroupInput struct { // // Constraints: // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. // // Example: mySubnetgroup // @@ -16866,11 +16999,7 @@ type DescribeCertificatesInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match an existing CertificateIdentifier. CertificateIdentifier *string `type:"string"` // This parameter is not currently supported. @@ -16989,11 +17118,7 @@ type DescribeDBClusterParameterGroupsInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the name of an existing DBClusterParameterGroup. DBClusterParameterGroupName *string `type:"string"` // This parameter is not currently supported. @@ -17112,11 +17237,7 @@ type DescribeDBClusterParametersInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the name of an existing DBClusterParameterGroup. // // DBClusterParameterGroupName is a required field DBClusterParameterGroupName *string `type:"string" required:"true"` @@ -17321,11 +17442,7 @@ type DescribeDBClusterSnapshotsInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the identifier of an existing DBCluster. DBClusterIdentifier *string `type:"string"` // A specific DB cluster snapshot identifier to describe. This parameter cannot @@ -17334,11 +17451,7 @@ type DescribeDBClusterSnapshotsInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the identifier of an existing DBClusterSnapshot. // // * If this identifier is for an automated snapshot, the SnapshotType parameter // must also be specified. @@ -17529,11 +17642,7 @@ type DescribeDBClustersInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match an existing DBClusterIdentifier. DBClusterIdentifier *string `type:"string"` // A filter that specifies one or more DB clusters to describe. @@ -17657,11 +17766,7 @@ type DescribeDBEngineVersionsInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match an existing DBParameterGroupFamily. DBParameterGroupFamily *string `type:"string"` // Indicates that only the default version of the specified engine or engine @@ -17834,11 +17939,7 @@ type DescribeDBInstancesInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the identifier of an existing DBInstance. DBInstanceIdentifier *string `type:"string"` // A filter that specifies one or more DB instances to describe. @@ -18013,11 +18114,7 @@ type DescribeDBLogFilesInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing DBInstance. // // DBInstanceIdentifier is a required field DBInstanceIdentifier *string `type:"string" required:"true"` @@ -18164,11 +18261,7 @@ type DescribeDBParameterGroupsInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the name of an existing DBClusterParameterGroup. DBParameterGroupName *string `type:"string"` // This parameter is not currently supported. @@ -18288,11 +18381,7 @@ type DescribeDBParametersInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the name of an existing DBParameterGroup. // // DBParameterGroupName is a required field DBParameterGroupName *string `type:"string" required:"true"` @@ -18616,11 +18705,7 @@ type DescribeDBSnapshotsInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the identifier of an existing DBInstance. DBInstanceIdentifier *string `type:"string"` // A specific DB snapshot identifier to describe. This parameter cannot be used @@ -18629,11 +18714,7 @@ type DescribeDBSnapshotsInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * If supplied, must match the identifier of an existing DBSnapshot. // // * If this identifier is for an automated snapshot, the SnapshotType parameter // must also be specified. @@ -19155,7 +19236,7 @@ type DescribeEventCategoriesInput struct { // This parameter is not currently supported. Filters []*Filter `locationNameList:"Filter" type:"list"` - // The type of source that will be generating the events. + // The type of source that is generating the events. // // Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot SourceType *string `type:"string"` @@ -19380,8 +19461,8 @@ type DescribeEventsInput struct { // Constraints: Minimum 20, maximum 100. MaxRecords *int64 `type:"integer"` - // The identifier of the event source for which events will be returned. If - // not specified, then all sources are included in the response. + // The identifier of the event source for which events are returned. If not + // specified, then all sources are included in the response. // // Constraints: // @@ -19537,8 +19618,7 @@ func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { type DescribeOptionGroupOptionsInput struct { _ struct{} `type:"structure"` - // A required parameter. Options available for the given engine name will be - // described. + // A required parameter. Options available for the given engine name are described. // // EngineName is a required field EngineName *string `type:"string" required:"true"` @@ -20563,6 +20643,71 @@ func (s *DescribeSourceRegionsOutput) SetSourceRegions(v []*SourceRegion) *Descr return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModificationsMessage +type DescribeValidDBInstanceModificationsInput struct { + _ struct{} `type:"structure"` + + // The customer identifier or the ARN of your DB instance. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeValidDBInstanceModificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeValidDBInstanceModificationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeValidDBInstanceModificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeValidDBInstanceModificationsInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DescribeValidDBInstanceModificationsInput) SetDBInstanceIdentifier(v string) *DescribeValidDBInstanceModificationsInput { + s.DBInstanceIdentifier = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModificationsResult +type DescribeValidDBInstanceModificationsOutput struct { + _ struct{} `type:"structure"` + + // Information about valid modifications that you can make to your DB instance. + // Contains the result of a successful call to the DescribeValidDBInstanceModifications + // action. You can use this information when you call ModifyDBInstance. + ValidDBInstanceModificationsMessage *ValidDBInstanceModificationsMessage `type:"structure"` +} + +// String returns the string representation +func (s DescribeValidDBInstanceModificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeValidDBInstanceModificationsOutput) GoString() string { + return s.String() +} + +// SetValidDBInstanceModificationsMessage sets the ValidDBInstanceModificationsMessage field's value. +func (s *DescribeValidDBInstanceModificationsOutput) SetValidDBInstanceModificationsMessage(v *ValidDBInstanceModificationsMessage) *DescribeValidDBInstanceModificationsOutput { + s.ValidDBInstanceModificationsMessage = v + return s +} + // An Active Directory Domain membership record associated with the DB instance. // Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DomainMembership type DomainMembership struct { @@ -20617,6 +20762,40 @@ func (s *DomainMembership) SetStatus(v string) *DomainMembership { return s } +// A range of double values. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DoubleRange +type DoubleRange struct { + _ struct{} `type:"structure"` + + // The minimum value in the range. + From *float64 `type:"double"` + + // The maximum value in the range. + To *float64 `type:"double"` +} + +// String returns the string representation +func (s DoubleRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DoubleRange) GoString() string { + return s.String() +} + +// SetFrom sets the From field's value. +func (s *DoubleRange) SetFrom(v float64) *DoubleRange { + s.From = &v + return s +} + +// SetTo sets the To field's value. +func (s *DoubleRange) SetTo(v float64) *DoubleRange { + s.To = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DownloadDBLogFilePortionMessage type DownloadDBLogFilePortionInput struct { _ struct{} `type:"structure"` @@ -20626,11 +20805,7 @@ type DownloadDBLogFilePortionInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing DBInstance. // // DBInstanceIdentifier is a required field DBInstanceIdentifier *string `type:"string" required:"true"` @@ -20646,7 +20821,7 @@ type DownloadDBLogFilePortionInput struct { Marker *string `type:"string"` // The number of lines to download. If the number of lines specified results - // in a file over 1 MB in size, the file will be truncated at 1 MB in size. + // in a file over 1 MB in size, the file is truncated at 1 MB in size. // // If the NumberOfLines parameter is specified, then the block of lines returned // can be from the beginning or the end of the log file, depending on the value @@ -21150,11 +21325,7 @@ type FailoverDBClusterInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing DBCluster. DBClusterIdentifier *string `type:"string"` // The name of the instance to promote to the primary instance. @@ -21433,13 +21604,7 @@ type ModifyDBClusterInput struct { // // Constraints: // - // * Must be the identifier for an existing DB cluster. - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Must match the identifier of an existing DBCluster. // // DBClusterIdentifier is a required field DBClusterIdentifier *string `type:"string" required:"true"` @@ -21464,9 +21629,9 @@ type ModifyDBClusterInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens + // * Must contain from 1 to 63 letters, numbers, or hyphens // - // * First character must be a letter + // * The first character must be a letter // // * Cannot end with a hyphen or contain two consecutive hyphens // @@ -21899,12 +22064,11 @@ type ModifyDBInstanceInput struct { // or Provisioned IOPS), amount of IOPS provisioned (if any), and the number // of prior scale storage operations. Typical migration times are under 24 hours, // but the process can take up to several days in some cases. During the migration, - // the DB instance will be available for use, but might experience performance - // degradation. While the migration takes place, nightly backups for the instance - // will be suspended. No other Amazon RDS operations can take place for the - // instance, including modifying the instance, rebooting the instance, deleting - // the instance, creating a Read Replica for the instance, and creating a DB - // snapshot of the instance. + // the DB instance is available for use, but might experience performance degradation. + // While the migration takes place, nightly backups for the instance are suspended. + // No other Amazon RDS operations can take place for the instance, including + // modifying the instance, rebooting the instance, deleting the instance, creating + // a Read Replica for the instance, and creating a DB snapshot of the instance. AllocatedStorage *int64 `type:"integer"` // Indicates that major version upgrades are allowed. Changing this parameter @@ -21922,17 +22086,17 @@ type ModifyDBInstanceInput struct { // // If this parameter is set to false, changes to the DB instance are applied // during the next maintenance window. Some parameter changes can cause an outage - // and will be applied on the next call to RebootDBInstance, or the next failure + // and are applied on the next call to RebootDBInstance, or the next failure // reboot. Review the table of parameters in Modifying a DB Instance and Using // the Apply Immediately Parameter (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) // to see the impact that setting ApplyImmediately to true or false has for - // each modified parameter and to determine when the changes will be applied. + // each modified parameter and to determine when the changes are applied. // // Default: false ApplyImmediately *bool `type:"boolean"` - // Indicates that minor version upgrades will be applied automatically to the - // DB instance during the maintenance window. Changing this parameter does not + // Indicates that minor version upgrades are applied automatically to the DB + // instance during the maintenance window. Changing this parameter does not // result in an outage except in the following case and the change is asynchronously // applied as soon as possible. An outage will result if this parameter is set // to true during the maintenance window, and a newer minor version is available, @@ -21977,36 +22141,24 @@ type ModifyDBInstanceInput struct { // otherwise false. The default is false. CopyTagsToSnapshot *bool `type:"boolean"` - // The new compute and memory capacity of the DB instance. To determine the - // instance classes that are available for a particular DB engine, use the DescribeOrderableDBInstanceOptions - // action. Note that not all instance classes are available in all regions for - // all DB engines. + // The new compute and memory capacity of the DB instance, for example, db.m4.large. + // Not all DB instance classes are available in all regions, or for all database + // engines. For the full list of DB instance classes, and availability for your + // engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. // - // Passing a value for this setting causes an outage during the change and is - // applied during the next maintenance window, unless ApplyImmediately is specified - // as true for this request. + // If you modify the DB instance class, an outage occurs during the change. + // The change is applied during the next maintenance window, unless ApplyImmediately + // is specified as true for this request. // // Default: Uses existing setting - // - // Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge - // | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large - // | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge - // | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge - // | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium - // | db.t2.large DBInstanceClass *string `type:"string"` // The DB instance identifier. This value is stored as a lowercase string. // // Constraints: // - // * Must be the identifier for an existing DB instance - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing DBInstance. // // DBInstanceIdentifier is a required field DBInstanceIdentifier *string `type:"string" required:"true"` @@ -22078,11 +22230,7 @@ type ModifyDBInstanceInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match existing DBSecurityGroups. DBSecurityGroups []*string `locationNameList:"DBSecurityGroupName" type:"list"` // The new DB subnet group for the DB instance. You can use this parameter to @@ -22094,8 +22242,7 @@ type ModifyDBInstanceInput struct { // is applied during the next maintenance window, unless you specify true for // the ApplyImmediately parameter. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. // // Example: mySubnetGroup DBSubnetGroupName *string `type:"string"` @@ -22128,6 +22275,9 @@ type ModifyDBInstanceInput struct { // Default: false EnableIAMDatabaseAuthentication *bool `type:"boolean"` + // True to enable Performance Insights for the DB instance; otherwise false. + EnablePerformanceInsights *bool `type:"boolean"` + // The version number of the database engine to upgrade to. Changing this parameter // results in an outage and the change is applied during the next maintenance // window unless the ApplyImmediately parameter is set to true for this request. @@ -22167,12 +22317,11 @@ type ModifyDBInstanceInput struct { // or Provisioned IOPS), amount of IOPS provisioned (if any), and the number // of prior scale storage operations. Typical migration times are under 24 hours, // but the process can take up to several days in some cases. During the migration, - // the DB instance will be available for use, but might experience performance - // degradation. While the migration takes place, nightly backups for the instance - // will be suspended. No other Amazon RDS operations can take place for the - // instance, including modifying the instance, rebooting the instance, deleting - // the instance, creating a Read Replica for the instance, and creating a DB - // snapshot of the instance. + // the DB instance is available for use, but might experience performance degradation. + // While the migration takes place, nightly backups for the instance are suspended. + // No other Amazon RDS operations can take place for the instance, including + // modifying the instance, rebooting the instance, deleting the instance, creating + // a Read Replica for the instance, and creating a DB snapshot of the instance. Iops *int64 `type:"integer"` // The license model for the DB instance. @@ -22195,9 +22344,25 @@ type ModifyDBInstanceInput struct { // // Default: Uses existing setting // - // Constraints: Must be 8 to 41 alphanumeric characters (MySQL, MariaDB, and - // Amazon Aurora), 8 to 30 alphanumeric characters (Oracle), or 8 to 128 alphanumeric - // characters (SQL Server). + // MariaDB + // + // Constraints: Must contain from 8 to 41 characters. + // + // Microsoft SQL Server + // + // Constraints: Must contain from 8 to 128 characters. + // + // MySQL + // + // Constraints: Must contain from 8 to 41 characters. + // + // Oracle + // + // Constraints: Must contain from 8 to 30 characters. + // + // PostgreSQL + // + // Constraints: Must contain from 8 to 128 characters. // // Amazon RDS API actions never return the password, so this action provides // a way to regain access to a primary instance user if the password is lost. @@ -22238,11 +22403,13 @@ type ModifyDBInstanceInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens + // * Must contain from 1 to 63 letters, numbers, or hyphens. // - // * First character must be a letter + // * The first character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: mydbinstance NewDBInstanceIdentifier *string `type:"string"` // Indicates that the DB instance should be associated with the specified option @@ -22258,6 +22425,11 @@ type ModifyDBInstanceInput struct { // from a DB instance once it is associated with a DB instance OptionGroupName *string `type:"string"` + // The KMS key identifier for encryption of Performance Insights data. The KMS + // key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS + // key alias for the KMS encryption key. + PerformanceInsightsKMSKeyId *string `type:"string"` + // The daily time range during which automated backups are created if automated // backups are enabled, as determined by the BackupRetentionPeriod parameter. // Changing this parameter does not result in an outage and the change is asynchronously @@ -22348,11 +22520,7 @@ type ModifyDBInstanceInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match existing VpcSecurityGroupIds. VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` } @@ -22475,6 +22643,12 @@ func (s *ModifyDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *Modi return s } +// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. +func (s *ModifyDBInstanceInput) SetEnablePerformanceInsights(v bool) *ModifyDBInstanceInput { + s.EnablePerformanceInsights = &v + return s +} + // SetEngineVersion sets the EngineVersion field's value. func (s *ModifyDBInstanceInput) SetEngineVersion(v string) *ModifyDBInstanceInput { s.EngineVersion = &v @@ -22529,6 +22703,12 @@ func (s *ModifyDBInstanceInput) SetOptionGroupName(v string) *ModifyDBInstanceIn return s } +// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. +func (s *ModifyDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *ModifyDBInstanceInput { + s.PerformanceInsightsKMSKeyId = &v + return s +} + // SetPreferredBackupWindow sets the PreferredBackupWindow field's value. func (s *ModifyDBInstanceInput) SetPreferredBackupWindow(v string) *ModifyDBInstanceInput { s.PreferredBackupWindow = &v @@ -22621,13 +22801,7 @@ type ModifyDBParameterGroupInput struct { // // Constraints: // - // * Must be the name of an existing DB parameter group - // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the name of an existing DBParameterGroup. // // DBParameterGroupName is a required field DBParameterGroupName *string `type:"string" required:"true"` @@ -22810,8 +22984,31 @@ type ModifyDBSnapshotInput struct { // DBSnapshotIdentifier is a required field DBSnapshotIdentifier *string `type:"string" required:"true"` - // The engine version to update the DB snapshot to. + // The engine version to upgrade the DB snapshot to. + // + // The following are the database engines and engine versions that are available + // when you upgrade a DB snapshot. + // + // MySQL + // + // * 5.5.46 (supported for 5.1 DB snapshots) + // + // Oracle + // + // * 12.1.0.2.v8 (supported for 12.1.0.1 DB snapshots) + // + // * 11.2.0.4.v12 (supported for 11.2.0.2 DB snapshots) + // + // * 11.2.0.4.v11 (supported for 11.2.0.3 DB snapshots) EngineVersion *string `type:"string"` + + // The option group to identify with the upgraded DB snapshot. + // + // You can specify this parameter when you upgrade an Oracle DB snapshot. The + // same option group considerations apply when upgrading a DB snapshot as when + // upgrading a DB instance. For more information, see Option Group Considerations + // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG). + OptionGroupName *string `type:"string"` } // String returns the string representation @@ -22849,6 +23046,12 @@ func (s *ModifyDBSnapshotInput) SetEngineVersion(v string) *ModifyDBSnapshotInpu return s } +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *ModifyDBSnapshotInput) SetOptionGroupName(v string) *ModifyDBSnapshotInput { + s.OptionGroupName = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshotResult type ModifyDBSnapshotOutput struct { _ struct{} `type:"structure"` @@ -22887,9 +23090,10 @@ type ModifyDBSubnetGroupInput struct { DBSubnetGroupDescription *string `type:"string"` // The name for the DB subnet group. This value is stored as a lowercase string. + // You can't modify the default subnet group. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. // // Example: mySubnetgroup // @@ -23000,10 +23204,9 @@ type ModifyEventSubscriptionInput struct { // it. SnsTopicArn *string `type:"string"` - // The type of source that will be generating the events. For example, if you - // want to be notified of events generated by a DB instance, you would set this - // parameter to db-instance. if this value is not specified, all events are - // returned. + // The type of source that is generating the events. For example, if you want + // to be notified of events generated by a DB instance, you would set this parameter + // to db-instance. if this value is not specified, all events are returned. // // Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot SourceType *string `type:"string"` @@ -23888,7 +24091,7 @@ func (s *OptionVersion) SetVersion(v string) *OptionVersion { return s } -// Contains a list of available options for a DB instance +// Contains a list of available options for a DB instance. // // This data type is used as a response element in the DescribeOrderableDBInstanceOptions // action. @@ -23896,44 +24099,65 @@ func (s *OptionVersion) SetVersion(v string) *OptionVersion { type OrderableDBInstanceOption struct { _ struct{} `type:"structure"` - // A list of Availability Zones for the orderable DB instance. + // A list of Availability Zones for a DB instance. AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` - // The DB instance class for the orderable DB instance. + // The DB instance class for a DB instance. DBInstanceClass *string `type:"string"` - // The engine type of the orderable DB instance. + // The engine type of a DB instance. Engine *string `type:"string"` - // The engine version of the orderable DB instance. + // The engine version of a DB instance. EngineVersion *string `type:"string"` - // The license model for the orderable DB instance. + // The license model for a DB instance. LicenseModel *string `type:"string"` - // Indicates whether this orderable DB instance is multi-AZ capable. + // Maximum total provisioned IOPS for a DB instance. + MaxIopsPerDbInstance *int64 `type:"integer"` + + // Maximum provisioned IOPS per GiB for a DB instance. + MaxIopsPerGib *float64 `type:"double"` + + // Maximum storage size for a DB instance. + MaxStorageSize *int64 `type:"integer"` + + // Minimum total provisioned IOPS for a DB instance. + MinIopsPerDbInstance *int64 `type:"integer"` + + // Minimum provisioned IOPS per GiB for a DB instance. + MinIopsPerGib *float64 `type:"double"` + + // Minimum storage size for a DB instance. + MinStorageSize *int64 `type:"integer"` + + // Indicates whether a DB instance is Multi-AZ capable. MultiAZCapable *bool `type:"boolean"` - // Indicates whether this orderable DB instance can have a Read Replica. + // Indicates whether a DB instance can have a Read Replica. ReadReplicaCapable *bool `type:"boolean"` - // Indicates the storage type for this orderable DB instance. + // Indicates the storage type for a DB instance. StorageType *string `type:"string"` - // Indicates whether the DB instance supports enhanced monitoring at intervals + // Indicates whether a DB instance supports Enhanced Monitoring at intervals // from 1 to 60 seconds. SupportsEnhancedMonitoring *bool `type:"boolean"` - // Indicates whether this orderable DB instance supports IAM database authentication. + // Indicates whether a DB instance supports IAM database authentication. SupportsIAMDatabaseAuthentication *bool `type:"boolean"` - // Indicates whether this orderable DB instance supports provisioned IOPS. + // Indicates whether a DB instance supports provisioned IOPS. SupportsIops *bool `type:"boolean"` - // Indicates whether this orderable DB instance supports encrypted storage. + // True if a DB instance supports Performance Insights, otherwise false. + SupportsPerformanceInsights *bool `type:"boolean"` + + // Indicates whether a DB instance supports encrypted storage. SupportsStorageEncryption *bool `type:"boolean"` - // Indicates whether this is a VPC orderable DB instance. + // Indicates whether a DB instance is in a VPC. Vpc *bool `type:"boolean"` } @@ -23977,6 +24201,42 @@ func (s *OrderableDBInstanceOption) SetLicenseModel(v string) *OrderableDBInstan return s } +// SetMaxIopsPerDbInstance sets the MaxIopsPerDbInstance field's value. +func (s *OrderableDBInstanceOption) SetMaxIopsPerDbInstance(v int64) *OrderableDBInstanceOption { + s.MaxIopsPerDbInstance = &v + return s +} + +// SetMaxIopsPerGib sets the MaxIopsPerGib field's value. +func (s *OrderableDBInstanceOption) SetMaxIopsPerGib(v float64) *OrderableDBInstanceOption { + s.MaxIopsPerGib = &v + return s +} + +// SetMaxStorageSize sets the MaxStorageSize field's value. +func (s *OrderableDBInstanceOption) SetMaxStorageSize(v int64) *OrderableDBInstanceOption { + s.MaxStorageSize = &v + return s +} + +// SetMinIopsPerDbInstance sets the MinIopsPerDbInstance field's value. +func (s *OrderableDBInstanceOption) SetMinIopsPerDbInstance(v int64) *OrderableDBInstanceOption { + s.MinIopsPerDbInstance = &v + return s +} + +// SetMinIopsPerGib sets the MinIopsPerGib field's value. +func (s *OrderableDBInstanceOption) SetMinIopsPerGib(v float64) *OrderableDBInstanceOption { + s.MinIopsPerGib = &v + return s +} + +// SetMinStorageSize sets the MinStorageSize field's value. +func (s *OrderableDBInstanceOption) SetMinStorageSize(v int64) *OrderableDBInstanceOption { + s.MinStorageSize = &v + return s +} + // SetMultiAZCapable sets the MultiAZCapable field's value. func (s *OrderableDBInstanceOption) SetMultiAZCapable(v bool) *OrderableDBInstanceOption { s.MultiAZCapable = &v @@ -24013,6 +24273,12 @@ func (s *OrderableDBInstanceOption) SetSupportsIops(v bool) *OrderableDBInstance return s } +// SetSupportsPerformanceInsights sets the SupportsPerformanceInsights field's value. +func (s *OrderableDBInstanceOption) SetSupportsPerformanceInsights(v bool) *OrderableDBInstanceOption { + s.SupportsPerformanceInsights = &v + return s +} + // SetSupportsStorageEncryption sets the SupportsStorageEncryption field's value. func (s *OrderableDBInstanceOption) SetSupportsStorageEncryption(v bool) *OrderableDBInstanceOption { s.SupportsStorageEncryption = &v @@ -24145,24 +24411,24 @@ type PendingMaintenanceAction struct { // The type of pending maintenance action that is available for the resource. Action *string `type:"string"` - // The date of the maintenance window when the action will be applied. The maintenance - // action will be applied to the resource during its first maintenance window - // after this date. If this date is specified, any next-maintenance opt-in requests + // The date of the maintenance window when the action is applied. The maintenance + // action is applied to the resource during its first maintenance window after + // this date. If this date is specified, any next-maintenance opt-in requests // are ignored. AutoAppliedAfterDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` - // The effective date when the pending maintenance action will be applied to - // the resource. This date takes into account opt-in requests received from - // the ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate, and the - // ForcedApplyDate. This value is blank if an opt-in request has not been received - // and nothing has been specified as AutoAppliedAfterDate or ForcedApplyDate. + // The effective date when the pending maintenance action is applied to the + // resource. This date takes into account opt-in requests received from the + // ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate, and the ForcedApplyDate. + // This value is blank if an opt-in request has not been received and nothing + // has been specified as AutoAppliedAfterDate or ForcedApplyDate. CurrentApplyDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` // A description providing more detail about the maintenance action. Description *string `type:"string"` - // The date when the maintenance action will be automatically applied. The maintenance - // action will be applied to the resource on this date regardless of the maintenance + // The date when the maintenance action is automatically applied. The maintenance + // action is applied to the resource on this date regardless of the maintenance // window for the resource. If this date is specified, any immediate opt-in // requests are ignored. ForcedApplyDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` @@ -24223,7 +24489,7 @@ type PendingModifiedValues struct { _ struct{} `type:"structure"` // Contains the new AllocatedStorage size for the DB instance that will be applied - // or is in progress. + // or is currently being applied. AllocatedStorage *int64 `type:"integer"` // Specifies the pending number of days for which automated backups are retained. @@ -24233,11 +24499,11 @@ type PendingModifiedValues struct { CACertificateIdentifier *string `type:"string"` // Contains the new DBInstanceClass for the DB instance that will be applied - // or is in progress. + // or is currently being applied. DBInstanceClass *string `type:"string"` // Contains the new DBInstanceIdentifier for the DB instance that will be applied - // or is in progress. + // or is currently being applied. DBInstanceIdentifier *string `type:"string"` // The new DB subnet group for the DB instance. @@ -24247,7 +24513,7 @@ type PendingModifiedValues struct { EngineVersion *string `type:"string"` // Specifies the new Provisioned IOPS value for the DB instance that will be - // applied or is being applied. + // applied or is currently being applied. Iops *int64 `type:"integer"` // The license model for the DB instance. @@ -24255,8 +24521,8 @@ type PendingModifiedValues struct { // Valid values: license-included | bring-your-own-license | general-public-license LicenseModel *string `type:"string"` - // Contains the pending or in-progress change of the master credentials for - // the DB instance. + // Contains the pending or currently-in-progress change of the master credentials + // for the DB instance. MasterUserPassword *string `type:"string"` // Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment. @@ -24366,11 +24632,7 @@ type PromoteReadReplicaDBClusterInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Must match the identifier of an existing DBCluster Read Replica. // // Example: my-cluster-replica1 // @@ -24464,13 +24726,7 @@ type PromoteReadReplicaInput struct { // // Constraints: // - // * Must be the identifier for an existing Read Replica DB instance - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing Read Replica DB instance. // // Example: mydbinstance // @@ -24671,6 +24927,52 @@ func (s *PurchaseReservedDBInstancesOfferingOutput) SetReservedDBInstance(v *Res return s } +// A range of integer values. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/Range +type Range struct { + _ struct{} `type:"structure"` + + // The minimum value in the range. + From *int64 `type:"integer"` + + // The step value for the range. For example, if you have a range of 5,000 to + // 10,000, with a step value of 1,000, the valid values start at 5,000 and step + // up by 1,000. Even though 7,500 is within the range, it isn't a valid value + // for the range. The valid values are 5,000, 6,000, 7,000, 8,000... + Step *int64 `type:"integer"` + + // The maximum value in the range. + To *int64 `type:"integer"` +} + +// String returns the string representation +func (s Range) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Range) GoString() string { + return s.String() +} + +// SetFrom sets the From field's value. +func (s *Range) SetFrom(v int64) *Range { + s.From = &v + return s +} + +// SetStep sets the Step field's value. +func (s *Range) SetStep(v int64) *Range { + s.Step = &v + return s +} + +// SetTo sets the To field's value. +func (s *Range) SetTo(v int64) *Range { + s.To = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RebootDBInstanceMessage type RebootDBInstanceInput struct { _ struct{} `type:"structure"` @@ -24679,16 +24981,12 @@ type RebootDBInstanceInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing DBInstance. // // DBInstanceIdentifier is a required field DBInstanceIdentifier *string `type:"string" required:"true"` - // When true, the reboot will be conducted through a MultiAZ failover. + // When true, the reboot is conducted through a MultiAZ failover. // // Constraint: You cannot specify true if the instance is not configured for // MultiAZ. @@ -24954,8 +25252,8 @@ func (s *RemoveSourceIdentifierFromSubscriptionOutput) SetEventSubscription(v *E type RemoveTagsFromResourceInput struct { _ struct{} `type:"structure"` - // The Amazon RDS resource the tags will be removed from. This value is an Amazon - // Resource Name (ARN). For information about creating an ARN, see Constructing + // The Amazon RDS resource that the tags are removed from. This value is an + // Amazon Resource Name (ARN). For information about creating an ARN, see Constructing // an RDS Amazon Resource Name (ARN) (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing). // // ResourceName is a required field @@ -25348,11 +25646,7 @@ type ResetDBParameterGroupInput struct { // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the name of an existing DBParameterGroup. // // DBParameterGroupName is a required field DBParameterGroupName *string `type:"string" required:"true"` @@ -25493,7 +25787,7 @@ type RestoreDBClusterFromS3Input struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // * Must contain from 1 to 63 letters, numbers, or hyphens. // // * First character must be a letter. // @@ -25505,21 +25799,16 @@ type RestoreDBClusterFromS3Input struct { DBClusterIdentifier *string `type:"string" required:"true"` // The name of the DB cluster parameter group to associate with the restored - // DB cluster. If this argument is omitted, default.aurora5.6 will be used. + // DB cluster. If this argument is omitted, default.aurora5.6 is used. // // Constraints: // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * If supplied, must match the name of an existing DBClusterParameterGroup. DBClusterParameterGroupName *string `type:"string"` // A DB subnet group to associate with the restored DB cluster. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -25572,7 +25861,7 @@ type RestoreDBClusterFromS3Input struct { // // Constraints: // - // * Must be 1 to 16 alphanumeric characters. + // * Must be 1 to 16 letters or numbers. // // * First character must be a letter. // @@ -25914,12 +26203,12 @@ type RestoreDBClusterFromSnapshotInput struct { // DB cluster can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - // The name of the DB cluster to create from the DB cluster snapshot. This parameter - // isn't case-sensitive. + // The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. + // This parameter isn't case-sensitive. // // Constraints: // - // * Must contain from 1 to 255 alphanumeric characters or hyphens + // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // @@ -25932,8 +26221,7 @@ type RestoreDBClusterFromSnapshotInput struct { // The name of the DB subnet group to use for the new DB cluster. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -25960,7 +26248,7 @@ type RestoreDBClusterFromSnapshotInput struct { EngineVersion *string `type:"string"` // The KMS key identifier to use when restoring an encrypted DB cluster from - // a DB cluster snapshot. + // a DB snapshot or DB cluster snapshot. // // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption // key. If you are restoring a DB cluster with the same AWS account that owns @@ -25970,12 +26258,12 @@ type RestoreDBClusterFromSnapshotInput struct { // If you do not specify a value for the KmsKeyId parameter, then the following // will occur: // - // * If the DB cluster snapshot is encrypted, then the restored DB cluster - // is encrypted using the KMS key that was used to encrypt the DB cluster - // snapshot. + // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, + // then the restored DB cluster is encrypted using the KMS key that was used + // to encrypt the DB snapshot or DB cluster snapshot. // - // * If the DB cluster snapshot is not encrypted, then the restored DB cluster - // is encrypted using the specified encryption key. + // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is not + // encrypted, then the restored DB cluster is not encrypted. KmsKeyId *string `type:"string"` // The name of the option group to use for the restored DB cluster. @@ -25988,15 +26276,15 @@ type RestoreDBClusterFromSnapshotInput struct { // Default: The same port as the original DB cluster. Port *int64 `type:"integer"` - // The identifier for the DB cluster snapshot to restore from. + // The identifier for the DB snapshot or DB cluster snapshot to restore from. + // + // You can use either the name or the Amazon Resource Name (ARN) to specify + // a DB cluster snapshot. However, you can use only the ARN to specify a DB + // snapshot. // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing Snapshot. // // SnapshotIdentifier is a required field SnapshotIdentifier *string `type:"string" required:"true"` @@ -26161,7 +26449,7 @@ type RestoreDBClusterToPointInTimeInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens + // * Must contain from 1 to 63 letters, numbers, or hyphens // // * First character must be a letter // @@ -26172,8 +26460,7 @@ type RestoreDBClusterToPointInTimeInput struct { // The DB subnet group name to use for the new DB cluster. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -26194,8 +26481,8 @@ type RestoreDBClusterToPointInTimeInput struct { // // You can restore to a new DB cluster and encrypt the new DB cluster with a // KMS key that is different than the KMS key used to encrypt the source DB - // cluster. The new DB cluster will be encrypted with the KMS key identified - // by the KmsKeyId parameter. + // cluster. The new DB cluster is encrypted with the KMS key identified by the + // KmsKeyId parameter. // // If you do not specify a value for the KmsKeyId parameter, then the following // will occur: @@ -26257,13 +26544,7 @@ type RestoreDBClusterToPointInTimeInput struct { // // Constraints: // - // * Must be the identifier of an existing database instance - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing DBCluster. // // SourceDBClusterIdentifier is a required field SourceDBClusterIdentifier *string `type:"string" required:"true"` @@ -26423,11 +26704,11 @@ func (s *RestoreDBClusterToPointInTimeOutput) SetDBCluster(v *DBCluster) *Restor type RestoreDBInstanceFromDBSnapshotInput struct { _ struct{} `type:"structure"` - // Indicates that minor version upgrades will be applied automatically to the - // DB instance during the maintenance window. + // Indicates that minor version upgrades are applied automatically to the DB + // instance during the maintenance window. AutoMinorVersionUpgrade *bool `type:"boolean"` - // The EC2 Availability Zone that the database instance will be created in. + // The EC2 Availability Zone that the database instance is created in. // // Default: A random, system-chosen Availability Zone. // @@ -26441,13 +26722,13 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // instance; otherwise false. The default is false. CopyTagsToSnapshot *bool `type:"boolean"` - // The compute and memory capacity of the Amazon RDS DB instance. + // The compute and memory capacity of the Amazon RDS DB instance, for example, + // db.m4.large. Not all DB instance classes are available in all regions, or + // for all database engines. For the full list of DB instance classes, and availability + // for your engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. // - // Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge - // | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge - // | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge - // | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge - // | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large + // Default: The same DBInstanceClass as the original DB instance. DBInstanceClass *string `type:"string"` // Name of the DB instance to create from the DB snapshot. This parameter isn't @@ -26455,7 +26736,7 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens + // * Must contain from 1 to 63 numbers, letters, or hyphens // // * First character must be a letter // @@ -26475,22 +26756,17 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // // Constraints: // - // * Must contain from 1 to 255 alphanumeric characters or hyphens + // * Must match the identifier of an existing DBSnapshot. // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier - // must be the ARN of the shared DB snapshot. + // * If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier + // must be the ARN of the shared DB snapshot. // // DBSnapshotIdentifier is a required field DBSnapshotIdentifier *string `type:"string" required:"true"` // The DB subnet group name to use for the new instance. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -26523,22 +26799,45 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // Constraint: Must be compatible with the engine of the source. You can restore // a MariaDB 10.1 DB instance from a MySQL 5.6 snapshot. // - // Valid Values: MySQL | mariadb | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee - // | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora + // Valid Values: + // + // * aurora + // + // * mariadb + // + // * mysql + // + // * oracle-ee + // + // * oracle-se2 + // + // * oracle-se1 + // + // * oracle-se + // + // * postgres + // + // * sqlserver-ee + // + // * sqlserver-se + // + // * sqlserver-ex + // + // * sqlserver-web Engine *string `type:"string"` // Specifies the amount of provisioned IOPS for the DB instance, expressed in // I/O operations per second. If this parameter is not specified, the IOPS value - // will be taken from the backup. If this parameter is set to 0, the new instance - // will be converted to a non-PIOPS instance, which will take additional time, - // though your DB instance will be available for connections before the conversion + // is taken from the backup. If this parameter is set to 0, the new instance + // is converted to a non-PIOPS instance. The conversion takes additional time, + // though your DB instance is available for connections before the conversion // starts. // + // The provisioned IOPS value must follow the requirements for your database + // engine. For more information, see Amazon RDS Provisioned IOPS Storage to + // Improve Performance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS). + // // Constraints: Must be an integer greater than 1000. - // - // SQL Server - // - // Setting the IOPS value for the SQL Server database engine is not supported. Iops *int64 `type:"integer"` // License model information for the restored DB instance. @@ -26581,9 +26880,9 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // * VPC: false // // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance will be publicly accessible. If a - // specific DB subnet group has been specified as part of the request and the - // PubliclyAccessible value has not been set, the DB instance will be private. + // value has not been set, the DB instance is publicly accessible. If a specific + // DB subnet group has been specified as part of the request and the PubliclyAccessible + // value has not been set, the DB instance is private. PubliclyAccessible *bool `type:"boolean"` // Specifies the storage type to be associated with the DB instance. @@ -26804,11 +27103,11 @@ func (s *RestoreDBInstanceFromDBSnapshotOutput) SetDBInstance(v *DBInstance) *Re type RestoreDBInstanceToPointInTimeInput struct { _ struct{} `type:"structure"` - // Indicates that minor version upgrades will be applied automatically to the - // DB instance during the maintenance window. + // Indicates that minor version upgrades are applied automatically to the DB + // instance during the maintenance window. AutoMinorVersionUpgrade *bool `type:"boolean"` - // The EC2 Availability Zone that the database instance will be created in. + // The EC2 Availability Zone that the database instance is created in. // // Default: A random, system-chosen Availability Zone. // @@ -26822,13 +27121,11 @@ type RestoreDBInstanceToPointInTimeInput struct { // instance; otherwise false. The default is false. CopyTagsToSnapshot *bool `type:"boolean"` - // The compute and memory capacity of the Amazon RDS DB instance. - // - // Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge - // | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge - // | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge - // | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge - // | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large + // The compute and memory capacity of the Amazon RDS DB instance, for example, + // db.m4.large. Not all DB instance classes are available in all regions, or + // for all database engines. For the full list of DB instance classes, and availability + // for your engine, see DB Instance Class (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. // // Default: The same DBInstanceClass as the original DB instance. DBInstanceClass *string `type:"string"` @@ -26840,8 +27137,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // The DB subnet group name to use for the new instance. // - // Constraints: Must contain no more than 255 alphanumeric characters, periods, - // underscores, spaces, or hyphens. Must not be default. + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -26873,8 +27169,31 @@ type RestoreDBInstanceToPointInTimeInput struct { // // Constraint: Must be compatible with the engine of the source // - // Valid Values: MySQL | mariadb | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee - // | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora + // Valid Values: + // + // * aurora + // + // * mariadb + // + // * mysql + // + // * oracle-ee + // + // * oracle-se2 + // + // * oracle-se1 + // + // * oracle-se + // + // * postgres + // + // * sqlserver-ee + // + // * sqlserver-se + // + // * sqlserver-ex + // + // * sqlserver-web Engine *string `type:"string"` // The amount of Provisioned IOPS (input/output operations per second) to be @@ -26927,9 +27246,9 @@ type RestoreDBInstanceToPointInTimeInput struct { // * VPC:false // // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance will be publicly accessible. If a - // specific DB subnet group has been specified as part of the request and the - // PubliclyAccessible value has not been set, the DB instance will be private. + // value has not been set, the DB instance is publicly accessible. If a specific + // DB subnet group has been specified as part of the request and the PubliclyAccessible + // value has not been set, the DB instance is private. PubliclyAccessible *bool `type:"boolean"` // The date and time to restore from. @@ -26949,13 +27268,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // // Constraints: // - // * Must be the identifier of an existing database instance - // - // * Must contain from 1 to 63 alphanumeric characters or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Must match the identifier of an existing DBInstance. // // SourceDBInstanceIdentifier is a required field SourceDBInstanceIdentifier *string `type:"string" required:"true"` @@ -26976,7 +27289,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // // Constraints: // - // * Must contain from 1 to 63 alphanumeric characters or hyphens + // * Must contain from 1 to 63 letters, numbers, or hyphens // // * First character must be a letter // @@ -27651,8 +27964,8 @@ func (s *Timezone) SetTimezoneName(v string) *Timezone { type UpgradeTarget struct { _ struct{} `type:"structure"` - // A value that indicates whether the target version will be applied to any - // source DB instances that have AutoMinorVersionUpgrade set to true. + // A value that indicates whether the target version is applied to any source + // DB instances that have AutoMinorVersionUpgrade set to true. AutoUpgrade *bool `type:"boolean"` // The version of the database engine that a DB instance can be upgraded to. @@ -27664,8 +27977,7 @@ type UpgradeTarget struct { // The version number of the upgrade target database engine. EngineVersion *string `type:"string"` - // A value that indicates whether a database engine will be upgraded to a major - // version. + // A value that indicates whether a database engine is upgraded to a major version. IsMajorVersionUpgrade *bool `type:"boolean"` } @@ -27709,6 +28021,89 @@ func (s *UpgradeTarget) SetIsMajorVersionUpgrade(v bool) *UpgradeTarget { return s } +// Information about valid modifications that you can make to your DB instance. +// Contains the result of a successful call to the DescribeValidDBInstanceModifications +// action. You can use this information when you call ModifyDBInstance. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ValidDBInstanceModificationsMessage +type ValidDBInstanceModificationsMessage struct { + _ struct{} `type:"structure"` + + // Valid storage options for your DB instance. + Storage []*ValidStorageOptions `locationNameList:"ValidStorageOptions" type:"list"` +} + +// String returns the string representation +func (s ValidDBInstanceModificationsMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidDBInstanceModificationsMessage) GoString() string { + return s.String() +} + +// SetStorage sets the Storage field's value. +func (s *ValidDBInstanceModificationsMessage) SetStorage(v []*ValidStorageOptions) *ValidDBInstanceModificationsMessage { + s.Storage = v + return s +} + +// Information about valid modifications that you can make to your DB instance. +// Contains the result of a successful call to the DescribeValidDBInstanceModifications +// action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ValidStorageOptions +type ValidStorageOptions struct { + _ struct{} `type:"structure"` + + // The valid range of Provisioned IOPS to gigabytes of storage multiplier. For + // example, 3-10, which means that provisioned IOPS can be between 3 and 10 + // times storage. + IopsToStorageRatio []*DoubleRange `locationNameList:"DoubleRange" type:"list"` + + // The valid range of provisioned IOPS. For example, 1000-20000. + ProvisionedIops []*Range `locationNameList:"Range" type:"list"` + + // The valid range of storage in gigabytes. For example, 100 to 6144. + StorageSize []*Range `locationNameList:"Range" type:"list"` + + // The valid storage types for your DB instance. For example, gp2, io1. + StorageType *string `type:"string"` +} + +// String returns the string representation +func (s ValidStorageOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidStorageOptions) GoString() string { + return s.String() +} + +// SetIopsToStorageRatio sets the IopsToStorageRatio field's value. +func (s *ValidStorageOptions) SetIopsToStorageRatio(v []*DoubleRange) *ValidStorageOptions { + s.IopsToStorageRatio = v + return s +} + +// SetProvisionedIops sets the ProvisionedIops field's value. +func (s *ValidStorageOptions) SetProvisionedIops(v []*Range) *ValidStorageOptions { + s.ProvisionedIops = v + return s +} + +// SetStorageSize sets the StorageSize field's value. +func (s *ValidStorageOptions) SetStorageSize(v []*Range) *ValidStorageOptions { + s.StorageSize = v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *ValidStorageOptions) SetStorageType(v string) *ValidStorageOptions { + s.StorageType = &v + return s +} + // This data type is used as a response element for queries on VPC security // group membership. // Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/VpcSecurityGroupMembership diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/doc.go b/vendor/github.com/aws/aws-sdk-go/service/rds/doc.go index d8777b443..bb4e704e9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/doc.go @@ -53,7 +53,7 @@ // // Using the Client // -// To Amazon Relational Database Service with the SDK use the New function to create +// To contact Amazon Relational Database Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/rds/waiters.go index cd45bcdc3..0c21e88bb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/waiters.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/waiters.go @@ -150,3 +150,145 @@ func (c *RDS) WaitUntilDBInstanceDeletedWithContext(ctx aws.Context, input *Desc return w.WaitWithContext(ctx) } + +// WaitUntilDBSnapshotAvailable uses the Amazon RDS API operation +// DescribeDBSnapshots to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *RDS) WaitUntilDBSnapshotAvailable(input *DescribeDBSnapshotsInput) error { + return c.WaitUntilDBSnapshotAvailableWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilDBSnapshotAvailableWithContext is an extended version of WaitUntilDBSnapshotAvailable. +// 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 *RDS) WaitUntilDBSnapshotAvailableWithContext(ctx aws.Context, input *DescribeDBSnapshotsInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilDBSnapshotAvailable", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "available", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "deleted", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "deleting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "incompatible-restore", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "incompatible-parameters", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeDBSnapshotsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBSnapshotsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilDBSnapshotDeleted uses the Amazon RDS API operation +// DescribeDBSnapshots to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *RDS) WaitUntilDBSnapshotDeleted(input *DescribeDBSnapshotsInput) error { + return c.WaitUntilDBSnapshotDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilDBSnapshotDeletedWithContext is an extended version of WaitUntilDBSnapshotDeleted. +// 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 *RDS) WaitUntilDBSnapshotDeletedWithContext(ctx aws.Context, input *DescribeDBSnapshotsInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilDBSnapshotDeleted", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "deleted", + }, + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "DBSnapshotNotFound", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "creating", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "modifying", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "rebooting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBSnapshots[].Status", + Expected: "resetting-master-credentials", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeDBSnapshotsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBSnapshotsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index d5ba56267..1a9949c37 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -3617,10 +3617,20 @@ func (c *Redshift) DescribeEventSubscriptionsRequest(input *DescribeEventSubscri // DescribeEventSubscriptions API operation for Amazon Redshift. // -// Lists descriptions of all the Amazon Redshift event notifications subscription +// Lists descriptions of all the Amazon Redshift event notification subscriptions // for a customer account. If you specify a subscription name, lists the description // for that subscription. // +// If you specify both tag keys and tag values in the same request, Amazon Redshift +// returns all event notification subscriptions that match any combination of +// the specified keys and values. For example, if you have owner and environment +// for tag keys, and admin and test for tag values, all subscriptions that have +// any combination of those values are returned. +// +// If both tag keys and values are omitted from the request, subscriptions are +// returned regardless of whether they have tag keys or values associated with +// them. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3633,6 +3643,9 @@ func (c *Redshift) DescribeEventSubscriptionsRequest(input *DescribeEventSubscri // An Amazon Redshift event notification subscription with the specified name // does not exist. // +// * ErrCodeInvalidTagFault "InvalidTagFault" +// The tag is invalid. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeEventSubscriptions func (c *Redshift) DescribeEventSubscriptions(input *DescribeEventSubscriptionsInput) (*DescribeEventSubscriptionsOutput, error) { req, out := c.DescribeEventSubscriptionsRequest(input) @@ -5435,19 +5448,20 @@ func (c *Redshift) GetClusterCredentialsRequest(input *GetClusterCredentialsInpu // GetClusterCredentials API operation for Amazon Redshift. // // Returns a database user name and temporary password with temporary authorization -// to log in to an Amazon Redshift database. The action returns the database +// to log on to an Amazon Redshift database. The action returns the database // user name prefixed with IAM: if AutoCreate is False or IAMA: if AutoCreate // is True. You can optionally specify one or more database user groups that -// the user will join at log in. By default, the temporary credentials expire +// the user will join at log on. By default, the temporary credentials expire // in 900 seconds. You can optionally specify a duration between 900 seconds -// (15 minutes) and 3600 seconds (60 minutes). For more information, see Generating -// IAM Database User Credentials in the Amazon Redshift Cluster Management Guide. +// (15 minutes) and 3600 seconds (60 minutes). For more information, see Using +// IAM Authentication to Generate Database User Credentials (http://docs.aws.amazon.com/redshift/latest/mgmt/generating-user-credentials.html) +// in the Amazon Redshift Cluster Management Guide. // -// The IAM user or role that executes GetClusterCredentials must have an IAM -// policy attached that allows the redshift:GetClusterCredentials action with -// access to the dbuser resource on the cluster. The user name specified for -// dbuser in the IAM policy and the user name specified for the DbUser parameter -// must match. +// The AWS Identity and Access Management (IAM)user or role that executes GetClusterCredentials +// must have an IAM policy attached that allows access to all necessary actions +// and resources. For more information about permissions, see Resource Policies +// for GetClusterCredentials (http://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html#redshift-policy-resources.getclustercredentials-resources) +// in the Amazon Redshift Cluster Management Guide. // // If the DbGroups parameter is specified, the IAM policy must allow the redshift:JoinGroup // action with access to the listed dbgroups. @@ -11452,6 +11466,22 @@ type DescribeEventSubscriptionsInput struct { // The name of the Amazon Redshift event notification subscription to be described. SubscriptionName *string `type:"string"` + + // A tag key or keys for which you want to return all matching event notification + // subscriptions that are associated with the specified key or keys. For example, + // suppose that you have subscriptions that are tagged with keys called owner + // and environment. If you specify both of these tag keys in the request, Amazon + // Redshift returns a response with the subscriptions that have either or both + // of these tag keys associated with them. + TagKeys []*string `locationNameList:"TagKey" type:"list"` + + // A tag value or values for which you want to return all matching event notification + // subscriptions that are associated with the specified tag value or values. + // For example, suppose that you have subscriptions that are tagged with values + // called admin and test. If you specify both of these tag values in the request, + // Amazon Redshift returns a response with the subscriptions that have either + // or both of these tag values associated with them. + TagValues []*string `locationNameList:"TagValue" type:"list"` } // String returns the string representation @@ -11482,6 +11512,18 @@ func (s *DescribeEventSubscriptionsInput) SetSubscriptionName(v string) *Describ return s } +// SetTagKeys sets the TagKeys field's value. +func (s *DescribeEventSubscriptionsInput) SetTagKeys(v []*string) *DescribeEventSubscriptionsInput { + s.TagKeys = v + return s +} + +// SetTagValues sets the TagValues field's value. +func (s *DescribeEventSubscriptionsInput) SetTagValues(v []*string) *DescribeEventSubscriptionsInput { + s.TagValues = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/EventSubscriptionsMessage type DescribeEventSubscriptionsOutput struct { _ struct{} `type:"structure"` @@ -12713,7 +12755,8 @@ type DescribeTagsInput struct { // * Snapshot copy grant // // For more information about Amazon Redshift resource types and constructing - // ARNs, go to Constructing an Amazon Redshift Amazon Resource Name (ARN) (http://docs.aws.amazon.com/redshift/latest/mgmt/constructing-redshift-arn.html) + // ARNs, go to Specifying Policy Elements: Actions, Effects, Resources, and + // Principals (http://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-overview.html#redshift-iam-access-control-specify-actions) // in the Amazon Redshift Cluster Management Guide. ResourceType *string `type:"string"` @@ -13553,8 +13596,8 @@ func (s *EventSubscription) SetTags(v []*Tag) *EventSubscription { type GetClusterCredentialsInput struct { _ struct{} `type:"structure"` - // Create a database user with the name specified for DbUser if one does not - // exist. + // Create a database user with the name specified for the user named in DbUser + // if one does not exist. AutoCreate *bool `type:"boolean"` // The unique identifier of the cluster that contains the database for which @@ -13563,18 +13606,39 @@ type GetClusterCredentialsInput struct { // ClusterIdentifier is a required field ClusterIdentifier *string `type:"string" required:"true"` - // A list of the names of existing database groups that DbUser will join for - // the current session. If not specified, the new user is added only to PUBLIC. + // A list of the names of existing database groups that the user named in DbUser + // will join for the current session, in addition to any group memberships for + // an existing user. If not specified, a new user is added only to PUBLIC. + // + // Database group name constraints + // + // * Must be 1 to 64 alphanumeric characters or hyphens + // + // * Must contain only lowercase letters, numbers, underscore, plus sign, + // period (dot), at symbol (@), or hyphen. + // + // * First character must be a letter. + // + // * Must not contain a colon ( : ) or slash ( / ). + // + // * Cannot be a reserved word. A list of reserved words can be found in + // Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html) + // in the Amazon Redshift Database Developer Guide. DbGroups []*string `locationNameList:"DbGroup" type:"list"` // The name of a database that DbUser is authorized to log on to. If DbName - // is not specified, DbUser can log in to any existing database. + // is not specified, DbUser can log on to any existing database. // // Constraints: // // * Must be 1 to 64 alphanumeric characters or hyphens // - // * Must contain only lowercase letters. + // * Must contain only lowercase letters, numbers, underscore, plus sign, + // period (dot), at symbol (@), or hyphen. + // + // * First character must be a letter. + // + // * Must not contain a colon ( : ) or slash ( / ). // // * Cannot be a reserved word. A list of reserved words can be found in // Reserved Words (http://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html) @@ -13589,14 +13653,15 @@ type GetClusterCredentialsInput struct { // is False, then the command succeeds but the connection attempt will fail // because the user doesn't exist in the database. // - // For more information, see CREATE USER (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/redshift/latest/dg/r_CREATE_USER.html) + // For more information, see CREATE USER (http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_USER.html) // in the Amazon Redshift Database Developer Guide. // // Constraints: // - // * Must be 1 to 128 alphanumeric characters or hyphens + // * Must be 1 to 64 alphanumeric characters or hyphens // - // * Must contain only lowercase letters. + // * Must contain only lowercase letters, numbers, underscore, plus sign, + // period (dot), at symbol (@), or hyphen. // // * First character must be a letter. // @@ -13679,7 +13744,7 @@ func (s *GetClusterCredentialsInput) SetDurationSeconds(v int64) *GetClusterCred return s } -// Temporary credentials with authorization to log in to an Amazon Redshift +// Temporary credentials with authorization to log on to an Amazon Redshift // database. // Please also see https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ClusterCredentials type GetClusterCredentialsOutput struct { @@ -13690,12 +13755,14 @@ type GetClusterCredentialsOutput struct { DbPassword *string `type:"string"` // A database user name that is authorized to log on to the database DbName - // using the password DbPassword. If the DbGroups parameter is specifed, DbUser - // is added to the listed groups for the current session. The user name is prefixed - // with IAM: for an existing user name or IAMA: if the user was auto-created. + // using the password DbPassword. If the specified DbUser exists in the database, + // the new user name has the same database privileges as the the user named + // in DbUser. By default, the user is added to PUBLIC. If the DbGroups parameter + // is specifed, DbUser is added to the listed groups for any sessions created + // using these credentials. DbUser *string `type:"string"` - // The date and time DbPassword expires. + // The date and time the password in DbPassword expires. Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601"` } @@ -16990,7 +17057,7 @@ type TaggedResource struct { // * Parameter group // // For more information about Amazon Redshift resource types and constructing - // ARNs, go to Constructing an Amazon Redshift Amazon Resource Name (ARN) (http://docs.aws.amazon.com/redshift/latest/mgmt/constructing-redshift-arn.html) + // ARNs, go to Constructing an Amazon Redshift Amazon Resource Name (ARN) (http://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-overview.html#redshift-iam-access-control-specify-actions) // in the Amazon Redshift Cluster Management Guide. ResourceType *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go index de582f04b..a5709ff7d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go @@ -35,7 +35,7 @@ // // Using the Client // -// To Amazon Redshift with the SDK use the New function to create +// To contact Amazon Redshift with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go index dc9c90209..7d800a144 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go @@ -695,6 +695,207 @@ func (c *Route53) CreateHostedZoneWithContext(ctx aws.Context, input *CreateHost return out, req.Send() } +const opCreateQueryLoggingConfig = "CreateQueryLoggingConfig" + +// CreateQueryLoggingConfigRequest generates a "aws/request.Request" representing the +// client's request for the CreateQueryLoggingConfig operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateQueryLoggingConfig for more information on using the CreateQueryLoggingConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateQueryLoggingConfigRequest method. +// req, resp := client.CreateQueryLoggingConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateQueryLoggingConfig +func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfigInput) (req *request.Request, output *CreateQueryLoggingConfigOutput) { + op := &request.Operation{ + Name: opCreateQueryLoggingConfig, + HTTPMethod: "POST", + HTTPPath: "/2013-04-01/queryloggingconfig", + } + + if input == nil { + input = &CreateQueryLoggingConfigInput{} + } + + output = &CreateQueryLoggingConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateQueryLoggingConfig API operation for Amazon Route 53. +// +// Creates a configuration for DNS query logging. After you create a query logging +// configuration, Amazon Route 53 begins to publish log data to an Amazon CloudWatch +// Logs log group. +// +// DNS query logs contain information about the queries that Amazon Route 53 +// receives for a specified public hosted zone, such as the following: +// +// * Amazon Route 53 edge location that responded to the DNS query +// +// * Domain or subdomain that was requested +// +// * DNS record type, such as A or AAAA +// +// * DNS response code, such as NoError or ServFail +// +// Log Group and Resource PolicyBefore you create a query logging configuration, +// perform the following operations. +// +// If you create a query logging configuration using the Amazon Route 53 console, +// Amazon Route 53 performs these operations automatically. +// +// Create a CloudWatch Logs log group, and make note of the ARN, which you specify +// when you create a query logging configuration. Note the following: +// +// You must create the log group in the us-east-1 region. +// +// You must use the same AWS account to create the log group and the hosted +// zone that you want to configure query logging for. +// +// When you create log groups for query logging, we recommend that you use a +// consistent prefix, for example: +// +// /aws/route53/hosted zone name +// +// In the next step, you'll create a resource policy, which controls access +// to one or more log groups and the associated AWS resources, such as Amazon +// Route 53 hosted zones. There's a limit on the number of resource policies +// that you can create, so we recommend that you use a consistent prefix so +// you can use the same resource policy for all the log groups that you create +// for query logging. +// +// Create a CloudWatch Logs resource policy, and give it the permissions that +// Amazon Route 53 needs to create log streams and to send query logs to log +// streams. For the value of Resource, specify the ARN for the log group that +// you created in the previous step. To use the same resource policy for all +// the CloudWatch Logs log groups that you created for query logging configurations, +// replace the hosted zone name with *, for example: +// +// arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/* +// +// You can't use the CloudWatch console to create or edit a resource policy. +// You must use the CloudWatch API, one of the AWS SDKs, or the AWS CLI. +// +// Log Streams and Edge LocationsWhen Amazon Route 53 finishes creating the +// configuration for DNS query logging, it does the following: +// +// Creates a log stream for an edge location the first time that the edge location +// responds to DNS queries for the specified hosted zone. That log stream is +// used to log all queries that Amazon Route 53 responds to for that edge location. +// +// Begins to send query logs to the applicable log stream. +// +// The name of each log stream is in the following format: +// +// hosted zone ID/edge location code +// +// The edge location code is a three-letter code and an arbitrarily assigned +// number, for example, DFW3. The three-letter code typically corresponds with +// the International Air Transport Association airport code for an airport near +// the edge location. (These abbreviations might change in the future.) For +// a list of edge locations, see "The Amazon Route 53 Global Network" on the +// Amazon Route 53 Product Details (http://aws.amazon.com/route53/details/) +// page. +// +// Queries That Are LoggedQuery logs contain only the queries that DNS resolvers +// forward to Amazon Route 53. If a DNS resolver has already cached the response +// to a query (such as the IP address for a load balancer for example.com), +// the resolver will continue to return the cached response. It doesn't forward +// another query to Amazon Route 53 until the TTL for the corresponding resource +// record set expires. Depending on how many DNS queries are submitted for a +// resource record set, and depending on the TTL for that resource record set, +// query logs might contain information about only one query out of every several +// thousand queries that are submitted to DNS. For more information about how +// DNS works, see Routing Internet Traffic to Your Website or Web Application +// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html) +// in the Amazon Route 53 Developer Guide. +// +// Log File FormatFor a list of the values in each query log and the format +// of each value, see Logging DNS Queries (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html) +// in the Amazon Route 53 Developer Guide. +// +// PricingFor information about charges for query logs, see Amazon CloudWatch +// Pricing (http://aws.amazon.com/cloudwatch/pricing/). +// +// How to Stop LoggingIf you want Amazon Route 53 to stop sending query logs +// to CloudWatch Logs, delete the query logging configuration. For more information, +// see DeleteQueryLoggingConfig. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53's +// API operation CreateQueryLoggingConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModification "ConcurrentModification" +// Another user submitted a request to create, update, or delete the object +// at the same time that you did. Retry the request. +// +// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" +// No hosted zone exists with the ID that you specified. +// +// * ErrCodeNoSuchCloudWatchLogsLogGroup "NoSuchCloudWatchLogsLogGroup" +// There is no CloudWatch Logs log group with the specified ARN. +// +// * ErrCodeInvalidInput "InvalidInput" +// The input is not valid. +// +// * ErrCodeQueryLoggingConfigAlreadyExists "QueryLoggingConfigAlreadyExists" +// You can create only one query logging configuration for a hosted zone, and +// a query logging configuration already exists for this hosted zone. +// +// * ErrCodeInsufficientCloudWatchLogsResourcePolicy "InsufficientCloudWatchLogsResourcePolicy" +// Amazon Route 53 doesn't have the permissions required to create log streams +// and send query logs to log streams. Possible causes include the following: +// +// * There is no resource policy that specifies the log group ARN in the +// value for Resource. +// +// * The resource policy that includes the log group ARN in the value for +// Resource doesn't have the necessary permissions. +// +// * The resource policy hasn't finished propagating yet. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateQueryLoggingConfig +func (c *Route53) CreateQueryLoggingConfig(input *CreateQueryLoggingConfigInput) (*CreateQueryLoggingConfigOutput, error) { + req, out := c.CreateQueryLoggingConfigRequest(input) + return out, req.Send() +} + +// CreateQueryLoggingConfigWithContext is the same as CreateQueryLoggingConfig with the addition of +// the ability to pass a context and additional request options. +// +// See CreateQueryLoggingConfig for details on how to use this API operation. +// +// 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 *Route53) CreateQueryLoggingConfigWithContext(ctx aws.Context, input *CreateQueryLoggingConfigInput, opts ...request.Option) (*CreateQueryLoggingConfigOutput, error) { + req, out := c.CreateQueryLoggingConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateReusableDelegationSet = "CreateReusableDelegationSet" // CreateReusableDelegationSetRequest generates a "aws/request.Request" representing the @@ -971,7 +1172,7 @@ func (c *Route53) CreateTrafficPolicyInstanceRequest(input *CreateTrafficPolicyI // No traffic policy exists with the specified ID. // // * ErrCodeTrafficPolicyInstanceAlreadyExists "TrafficPolicyInstanceAlreadyExists" -// Traffic policy instance with given Id already exists. +// There is already a traffic policy instance with the specified ID. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyInstance func (c *Route53) CreateTrafficPolicyInstance(input *CreateTrafficPolicyInstanceInput) (*CreateTrafficPolicyInstanceOutput, error) { @@ -1063,8 +1264,8 @@ func (c *Route53) CreateTrafficPolicyVersionRequest(input *CreateTrafficPolicyVe // The input is not valid. // // * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to update the object at the same time that -// you did. Retry the request. +// Another user submitted a request to create, update, or delete the object +// at the same time that you did. Retry the request. // // * ErrCodeInvalidTrafficPolicyDocument "InvalidTrafficPolicyDocument" // The format of the traffic policy document that you specified in the Document @@ -1156,8 +1357,8 @@ func (c *Route53) CreateVPCAssociationAuthorizationRequest(input *CreateVPCAssoc // // Returned Error Codes: // * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to update the object at the same time that -// you did. Retry the request. +// Another user submitted a request to create, update, or delete the object +// at the same time that you did. Retry the request. // // * ErrCodeTooManyVPCAssociationAuthorizations "TooManyVPCAssociationAuthorizations" // You've created the maximum number of authorizations that can be created for @@ -1416,6 +1617,96 @@ func (c *Route53) DeleteHostedZoneWithContext(ctx aws.Context, input *DeleteHost return out, req.Send() } +const opDeleteQueryLoggingConfig = "DeleteQueryLoggingConfig" + +// DeleteQueryLoggingConfigRequest generates a "aws/request.Request" representing the +// client's request for the DeleteQueryLoggingConfig operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteQueryLoggingConfig for more information on using the DeleteQueryLoggingConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteQueryLoggingConfigRequest method. +// req, resp := client.DeleteQueryLoggingConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteQueryLoggingConfig +func (c *Route53) DeleteQueryLoggingConfigRequest(input *DeleteQueryLoggingConfigInput) (req *request.Request, output *DeleteQueryLoggingConfigOutput) { + op := &request.Operation{ + Name: opDeleteQueryLoggingConfig, + HTTPMethod: "DELETE", + HTTPPath: "/2013-04-01/queryloggingconfig/{Id}", + } + + if input == nil { + input = &DeleteQueryLoggingConfigInput{} + } + + output = &DeleteQueryLoggingConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteQueryLoggingConfig API operation for Amazon Route 53. +// +// Deletes a configuration for DNS query logging. If you delete a configuration, +// Amazon Route 53 stops sending query logs to CloudWatch Logs. Amazon Route +// 53 doesn't delete any logs that are already in CloudWatch Logs. +// +// For more information about DNS query logs, see CreateQueryLoggingConfig. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53's +// API operation DeleteQueryLoggingConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModification "ConcurrentModification" +// Another user submitted a request to create, update, or delete the object +// at the same time that you did. Retry the request. +// +// * ErrCodeNoSuchQueryLoggingConfig "NoSuchQueryLoggingConfig" +// There is no DNS query logging configuration with the specified ID. +// +// * ErrCodeInvalidInput "InvalidInput" +// The input is not valid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteQueryLoggingConfig +func (c *Route53) DeleteQueryLoggingConfig(input *DeleteQueryLoggingConfigInput) (*DeleteQueryLoggingConfigOutput, error) { + req, out := c.DeleteQueryLoggingConfigRequest(input) + return out, req.Send() +} + +// DeleteQueryLoggingConfigWithContext is the same as DeleteQueryLoggingConfig with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteQueryLoggingConfig for details on how to use this API operation. +// +// 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 *Route53) DeleteQueryLoggingConfigWithContext(ctx aws.Context, input *DeleteQueryLoggingConfigInput, opts ...request.Option) (*DeleteQueryLoggingConfigOutput, error) { + req, out := c.DeleteQueryLoggingConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteReusableDelegationSet = "DeleteReusableDelegationSet" // DeleteReusableDelegationSetRequest generates a "aws/request.Request" representing the @@ -1577,8 +1868,8 @@ func (c *Route53) DeleteTrafficPolicyRequest(input *DeleteTrafficPolicyInput) (r // traffic policy. // // * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to update the object at the same time that -// you did. Retry the request. +// Another user submitted a request to create, update, or delete the object +// at the same time that you did. Retry the request. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicy func (c *Route53) DeleteTrafficPolicy(input *DeleteTrafficPolicyInput) (*DeleteTrafficPolicyOutput, error) { @@ -1759,8 +2050,8 @@ func (c *Route53) DeleteVPCAssociationAuthorizationRequest(input *DeleteVPCAssoc // // Returned Error Codes: // * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to update the object at the same time that -// you did. Retry the request. +// Another user submitted a request to create, update, or delete the object +// at the same time that you did. Retry the request. // // * ErrCodeVPCAssociationAuthorizationNotFound "VPCAssociationAuthorizationNotFound" // The VPC that you specified is not authorized to be associated with the hosted @@ -2655,6 +2946,91 @@ func (c *Route53) GetHostedZoneCountWithContext(ctx aws.Context, input *GetHoste return out, req.Send() } +const opGetQueryLoggingConfig = "GetQueryLoggingConfig" + +// GetQueryLoggingConfigRequest generates a "aws/request.Request" representing the +// client's request for the GetQueryLoggingConfig operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetQueryLoggingConfig for more information on using the GetQueryLoggingConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetQueryLoggingConfigRequest method. +// req, resp := client.GetQueryLoggingConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetQueryLoggingConfig +func (c *Route53) GetQueryLoggingConfigRequest(input *GetQueryLoggingConfigInput) (req *request.Request, output *GetQueryLoggingConfigOutput) { + op := &request.Operation{ + Name: opGetQueryLoggingConfig, + HTTPMethod: "GET", + HTTPPath: "/2013-04-01/queryloggingconfig/{Id}", + } + + if input == nil { + input = &GetQueryLoggingConfigInput{} + } + + output = &GetQueryLoggingConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetQueryLoggingConfig API operation for Amazon Route 53. +// +// Gets information about a specified configuration for DNS query logging. +// +// For more information about DNS query logs, see CreateQueryLoggingConfig and +// Logging DNS Queries (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53's +// API operation GetQueryLoggingConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchQueryLoggingConfig "NoSuchQueryLoggingConfig" +// There is no DNS query logging configuration with the specified ID. +// +// * ErrCodeInvalidInput "InvalidInput" +// The input is not valid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetQueryLoggingConfig +func (c *Route53) GetQueryLoggingConfig(input *GetQueryLoggingConfigInput) (*GetQueryLoggingConfigOutput, error) { + req, out := c.GetQueryLoggingConfigRequest(input) + return out, req.Send() +} + +// GetQueryLoggingConfigWithContext is the same as GetQueryLoggingConfig with the addition of +// the ability to pass a context and additional request options. +// +// See GetQueryLoggingConfig for details on how to use this API operation. +// +// 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 *Route53) GetQueryLoggingConfigWithContext(ctx aws.Context, input *GetQueryLoggingConfigInput, opts ...request.Option) (*GetQueryLoggingConfigOutput, error) { + req, out := c.GetQueryLoggingConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetReusableDelegationSet = "GetReusableDelegationSet" // GetReusableDelegationSetRequest generates a "aws/request.Request" representing the @@ -3490,6 +3866,99 @@ func (c *Route53) ListHostedZonesByNameWithContext(ctx aws.Context, input *ListH return out, req.Send() } +const opListQueryLoggingConfigs = "ListQueryLoggingConfigs" + +// ListQueryLoggingConfigsRequest generates a "aws/request.Request" representing the +// client's request for the ListQueryLoggingConfigs operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListQueryLoggingConfigs for more information on using the ListQueryLoggingConfigs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListQueryLoggingConfigsRequest method. +// req, resp := client.ListQueryLoggingConfigsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListQueryLoggingConfigs +func (c *Route53) ListQueryLoggingConfigsRequest(input *ListQueryLoggingConfigsInput) (req *request.Request, output *ListQueryLoggingConfigsOutput) { + op := &request.Operation{ + Name: opListQueryLoggingConfigs, + HTTPMethod: "GET", + HTTPPath: "/2013-04-01/queryloggingconfig", + } + + if input == nil { + input = &ListQueryLoggingConfigsInput{} + } + + output = &ListQueryLoggingConfigsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListQueryLoggingConfigs API operation for Amazon Route 53. +// +// Lists the configurations for DNS query logging that are associated with the +// current AWS account or the configuration that is associated with a specified +// hosted zone. +// +// For more information about DNS query logs, see CreateQueryLoggingConfig. +// Additional information, including the format of DNS query logs, appears in +// Logging DNS Queries (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html) +// in the Amazon Route 53 Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53's +// API operation ListQueryLoggingConfigs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInput "InvalidInput" +// The input is not valid. +// +// * ErrCodeInvalidPaginationToken "InvalidPaginationToken" +// The value that you specified to get the second or subsequent page of results +// is invalid. +// +// * ErrCodeNoSuchHostedZone "NoSuchHostedZone" +// No hosted zone exists with the ID that you specified. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListQueryLoggingConfigs +func (c *Route53) ListQueryLoggingConfigs(input *ListQueryLoggingConfigsInput) (*ListQueryLoggingConfigsOutput, error) { + req, out := c.ListQueryLoggingConfigsRequest(input) + return out, req.Send() +} + +// ListQueryLoggingConfigsWithContext is the same as ListQueryLoggingConfigs with the addition of +// the ability to pass a context and additional request options. +// +// See ListQueryLoggingConfigs for details on how to use this API operation. +// +// 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 *Route53) ListQueryLoggingConfigsWithContext(ctx aws.Context, input *ListQueryLoggingConfigsInput, opts ...request.Option) (*ListQueryLoggingConfigsOutput, error) { + req, out := c.ListQueryLoggingConfigsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListResourceRecordSets = "ListResourceRecordSets" // ListResourceRecordSetsRequest generates a "aws/request.Request" representing the @@ -4459,6 +4928,8 @@ func (c *Route53) ListVPCAssociationAuthorizationsRequest(input *ListVPCAssociat // The input is not valid. // // * ErrCodeInvalidPaginationToken "InvalidPaginationToken" +// The value that you specified to get the second or subsequent page of results +// is invalid. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListVPCAssociationAuthorizations func (c *Route53) ListVPCAssociationAuthorizations(input *ListVPCAssociationAuthorizationsInput) (*ListVPCAssociationAuthorizationsOutput, error) { @@ -4800,8 +5271,8 @@ func (c *Route53) UpdateTrafficPolicyCommentRequest(input *UpdateTrafficPolicyCo // No traffic policy exists with the specified ID. // // * ErrCodeConcurrentModification "ConcurrentModification" -// Another user submitted a request to update the object at the same time that -// you did. Retry the request. +// Another user submitted a request to create, update, or delete the object +// at the same time that you did. Retry the request. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyComment func (c *Route53) UpdateTrafficPolicyComment(input *UpdateTrafficPolicyCommentInput) (*UpdateTrafficPolicyCommentOutput, error) { @@ -5069,12 +5540,16 @@ type AliasTarget struct { // Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of // DNSName. For more information, see the applicable guide: // - // Classic Load Balancer: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) + // Classic Load Balancers: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) // - // Application Load Balancer: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // Application and Network Load Balancers: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) // - // AWS CLI: Use describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) - // to get the value of DNSName. + // AWS CLI: Use describe-load-balancers to get the value of DNSName. For more + // information, see the applicable guide: + // + // Classic Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) + // + // Application and Network Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) // // Amazon S3 bucket that is configured as a static websiteSpecify the domain // name of the Amazon S3 website endpoint in which you created the bucket, for @@ -5163,23 +5638,28 @@ type AliasTarget struct { // // Elastic Load Balancing (http://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region) // table in the "AWS Regions and Endpoints" chapter of the Amazon Web Services - // General Reference: Use the value in the "Amazon Route 53 Hosted Zone ID" - // column that corresponds with the region that you created your load balancer - // in. + // General Reference: Use the value that corresponds with the region that you + // created your load balancer in. Note that there are separate columns for Application + // and Classic Load Balancers and for Network Load Balancers. // - // AWS Management Console: Go to the Amazon EC2 page, click Load Balancers in - // the navigation pane, select the load balancer, and get the value of the Hosted - // zone field on the Description tab. + // AWS Management Console: Go to the Amazon EC2 page, choose Load Balancers + // in the navigation pane, select the load balancer, and get the value of the + // Hosted zone field on the Description tab. // // Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of // CanonicalHostedZoneNameId. For more information, see the applicable guide: // - // Classic Load Balancer: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) + // Classic Load Balancers: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) // - // Application Load Balancer: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // Application and Network Load Balancers: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) // - // AWS CLI: Use describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) - // to get the value of CanonicalHostedZoneNameID. + // AWS CLI: Use describe-load-balancers to get the value of CanonicalHostedZoneNameID + // (for Classic Load Balancers) or CanonicalHostedZoneNameID (for Application + // and Network Load Balancers). For more information, see the applicable guide: + // + // Classic Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) + // + // Application and Network Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) // // An Amazon S3 bucket configured as a static websiteSpecify the hosted zone // ID for the region that you created the bucket in. For more information about @@ -6197,6 +6677,107 @@ func (s *CreateHostedZoneOutput) SetVPC(v *VPC) *CreateHostedZoneOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateQueryLoggingConfigRequest +type CreateQueryLoggingConfigInput struct { + _ struct{} `locationName:"CreateQueryLoggingConfigRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` + + // The Amazon Resource Name (ARN) for the log group that you want to Amazon + // Route 53 to send query logs to. This is the format of the ARN: + // + // arn:aws:logs:region:account-id:log-group:log_group_name + // + // To get the ARN for a log group, you can use the CloudWatch console, the DescribeLogGroups + // (http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html) + // API action, the describe-log-groups (http://docs.aws.amazon.com/cli/latest/reference/logs/describe-log-groups.html) + // command, or the applicable command in one of the AWS SDKs. + // + // CloudWatchLogsLogGroupArn is a required field + CloudWatchLogsLogGroupArn *string `type:"string" required:"true"` + + // The ID of the hosted zone that you want to log queries for. You can log queries + // only for public hosted zones. + // + // HostedZoneId is a required field + HostedZoneId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateQueryLoggingConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateQueryLoggingConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateQueryLoggingConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateQueryLoggingConfigInput"} + if s.CloudWatchLogsLogGroupArn == nil { + invalidParams.Add(request.NewErrParamRequired("CloudWatchLogsLogGroupArn")) + } + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. +func (s *CreateQueryLoggingConfigInput) SetCloudWatchLogsLogGroupArn(v string) *CreateQueryLoggingConfigInput { + s.CloudWatchLogsLogGroupArn = &v + return s +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *CreateQueryLoggingConfigInput) SetHostedZoneId(v string) *CreateQueryLoggingConfigInput { + s.HostedZoneId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateQueryLoggingConfigResponse +type CreateQueryLoggingConfigOutput struct { + _ struct{} `type:"structure"` + + // The unique URL representing the new query logging configuration. + // + // Location is a required field + Location *string `location:"header" locationName:"Location" type:"string" required:"true"` + + // A complex type that contains the ID for a query logging configuration, the + // ID of the hosted zone that you want to log queries for, and the ARN for the + // log group that you want Amazon Route 53 to send query logs to. + // + // QueryLoggingConfig is a required field + QueryLoggingConfig *QueryLoggingConfig `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateQueryLoggingConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateQueryLoggingConfigOutput) GoString() string { + return s.String() +} + +// SetLocation sets the Location field's value. +func (s *CreateQueryLoggingConfigOutput) SetLocation(v string) *CreateQueryLoggingConfigOutput { + s.Location = &v + return s +} + +// SetQueryLoggingConfig sets the QueryLoggingConfig field's value. +func (s *CreateQueryLoggingConfigOutput) SetQueryLoggingConfig(v *QueryLoggingConfig) *CreateQueryLoggingConfigOutput { + s.QueryLoggingConfig = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateReusableDelegationSetRequest type CreateReusableDelegationSetInput struct { _ struct{} `locationName:"CreateReusableDelegationSetRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` @@ -6926,6 +7507,63 @@ func (s *DeleteHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *DeleteHostedZoneO return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteQueryLoggingConfigRequest +type DeleteQueryLoggingConfigInput struct { + _ struct{} `type:"structure"` + + // The ID of the configuration that you want to delete. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteQueryLoggingConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueryLoggingConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteQueryLoggingConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteQueryLoggingConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DeleteQueryLoggingConfigInput) SetId(v string) *DeleteQueryLoggingConfigInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteQueryLoggingConfigResponse +type DeleteQueryLoggingConfigOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteQueryLoggingConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueryLoggingConfigOutput) GoString() string { + return s.String() +} + // A request to delete a reusable delegation set. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteReusableDelegationSetRequest type DeleteReusableDelegationSetInput struct { @@ -8094,6 +8732,76 @@ func (s *GetHostedZoneOutput) SetVPCs(v []*VPC) *GetHostedZoneOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetQueryLoggingConfigRequest +type GetQueryLoggingConfigInput struct { + _ struct{} `type:"structure"` + + // The ID of the configuration for DNS query logging that you want to get information + // about. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetQueryLoggingConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueryLoggingConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetQueryLoggingConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetQueryLoggingConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *GetQueryLoggingConfigInput) SetId(v string) *GetQueryLoggingConfigInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetQueryLoggingConfigResponse +type GetQueryLoggingConfigOutput struct { + _ struct{} `type:"structure"` + + // A complex type that contains information about the query logging configuration + // that you specified in a GetQueryLoggingConfig request. + // + // QueryLoggingConfig is a required field + QueryLoggingConfig *QueryLoggingConfig `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetQueryLoggingConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueryLoggingConfigOutput) GoString() string { + return s.String() +} + +// SetQueryLoggingConfig sets the QueryLoggingConfig field's value. +func (s *GetQueryLoggingConfigOutput) SetQueryLoggingConfig(v *QueryLoggingConfig) *GetQueryLoggingConfigOutput { + s.QueryLoggingConfig = v + return s +} + // A request to get information about a specified reusable delegation set. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSetRequest type GetReusableDelegationSetInput struct { @@ -8402,6 +9110,11 @@ type HealthCheck struct { // // Id is a required field Id *string `type:"string" required:"true"` + + // If the health check was created by another service, the service that created + // the health check. When a health check is created by another service, you + // can't edit or delete it using Amazon Route 53. + LinkedService *LinkedService `type:"structure"` } // String returns the string representation @@ -8444,6 +9157,12 @@ func (s *HealthCheck) SetId(v string) *HealthCheck { return s } +// SetLinkedService sets the LinkedService field's value. +func (s *HealthCheck) SetLinkedService(v *LinkedService) *HealthCheck { + s.LinkedService = v + return s +} + // A complex type that contains information about the health check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/HealthCheckConfig type HealthCheckConfig struct { @@ -8924,6 +9643,11 @@ type HostedZone struct { // Id is a required field Id *string `type:"string" required:"true"` + // If the hosted zone was created by another service, the service that created + // the hosted zone. When a hosted zone is created by another service, you can't + // edit or delete it using Amazon Route 53. + LinkedService *LinkedService `type:"structure"` + // The name of the domain. For public hosted zones, this is the name that you // have registered with your DNS registrar. // @@ -8965,6 +9689,12 @@ func (s *HostedZone) SetId(v string) *HostedZone { return s } +// SetLinkedService sets the LinkedService field's value. +func (s *HostedZone) SetLinkedService(v *LinkedService) *HostedZone { + s.LinkedService = v + return s +} + // SetName sets the Name field's value. func (s *HostedZone) SetName(v string) *HostedZone { s.Name = &v @@ -9013,6 +9743,48 @@ func (s *HostedZoneConfig) SetPrivateZone(v bool) *HostedZoneConfig { return s } +// If a health check or hosted zone was created by another service, LinkedService +// is a complex type that describes the service that created the resource. When +// a resource is created by another service, you can't edit or delete it using +// Amazon Route 53. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/LinkedService +type LinkedService struct { + _ struct{} `type:"structure"` + + // If the health check or hosted zone was created by another service, an optional + // description that can be provided by the other service. When a resource is + // created by another service, you can't edit or delete it using Amazon Route + // 53. + Description *string `type:"string"` + + // If the health check or hosted zone was created by another service, the service + // that created the resource. When a resource is created by another service, + // you can't edit or delete it using Amazon Route 53. + ServicePrincipal *string `type:"string"` +} + +// String returns the string representation +func (s LinkedService) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LinkedService) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *LinkedService) SetDescription(v string) *LinkedService { + s.Description = &v + return s +} + +// SetServicePrincipal sets the ServicePrincipal field's value. +func (s *LinkedService) SetServicePrincipal(v string) *LinkedService { + s.ServicePrincipal = &v + return s +} + // A request to get a list of geographic locations that Amazon Route 53 supports // for geolocation resource record sets. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListGeoLocationsRequest @@ -9619,6 +10391,107 @@ func (s *ListHostedZonesOutput) SetNextMarker(v string) *ListHostedZonesOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListQueryLoggingConfigsRequest +type ListQueryLoggingConfigsInput struct { + _ struct{} `type:"structure"` + + // (Optional) If you want to list the query logging configuration that is associated + // with a hosted zone, specify the ID in HostedZoneId. + // + // If you don't specify a hosted zone ID, ListQueryLoggingConfigs returns all + // of the configurations that are associated with the current AWS account. + HostedZoneId *string `location:"querystring" locationName:"hostedzoneid" type:"string"` + + // (Optional) The maximum number of query logging configurations that you want + // Amazon Route 53 to return in response to the current request. If the current + // AWS account has more than MaxResults configurations, use the value of ListQueryLoggingConfigsResponse$NextToken + // in the response to get the next page of results. + // + // If you don't specify a value for MaxResults, Amazon Route 53 returns up to + // 100 configurations. + MaxResults *string `location:"querystring" locationName:"maxresults" type:"string"` + + // (Optional) If the current AWS account has more than MaxResults query logging + // configurations, use NextToken to get the second and subsequent pages of results. + // + // For the first ListQueryLoggingConfigs request, omit this value. + // + // For the second and subsequent requests, get the value of NextToken from the + // previous response and specify that value for NextToken in the request. + NextToken *string `location:"querystring" locationName:"nexttoken" type:"string"` +} + +// String returns the string representation +func (s ListQueryLoggingConfigsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListQueryLoggingConfigsInput) GoString() string { + return s.String() +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *ListQueryLoggingConfigsInput) SetHostedZoneId(v string) *ListQueryLoggingConfigsInput { + s.HostedZoneId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListQueryLoggingConfigsInput) SetMaxResults(v string) *ListQueryLoggingConfigsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListQueryLoggingConfigsInput) SetNextToken(v string) *ListQueryLoggingConfigsInput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListQueryLoggingConfigsResponse +type ListQueryLoggingConfigsOutput struct { + _ struct{} `type:"structure"` + + // If a response includes the last of the query logging configurations that + // are associated with the current AWS account, NextToken doesn't appear in + // the response. + // + // If a response doesn't include the last of the configurations, you can get + // more configurations by submitting another ListQueryLoggingConfigs request. + // Get the value of NextToken that Amazon Route 53 returned in the previous + // response and include it in NextToken in the next request. + NextToken *string `type:"string"` + + // An array that contains one QueryLoggingConfig element for each configuration + // for DNS query logging that is associated with the current AWS account. + // + // QueryLoggingConfigs is a required field + QueryLoggingConfigs []*QueryLoggingConfig `locationNameList:"QueryLoggingConfig" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListQueryLoggingConfigsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListQueryLoggingConfigsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListQueryLoggingConfigsOutput) SetNextToken(v string) *ListQueryLoggingConfigsOutput { + s.NextToken = &v + return s +} + +// SetQueryLoggingConfigs sets the QueryLoggingConfigs field's value. +func (s *ListQueryLoggingConfigsOutput) SetQueryLoggingConfigs(v []*QueryLoggingConfig) *ListQueryLoggingConfigsOutput { + s.QueryLoggingConfigs = v + return s +} + // A request for the resource record sets that are associated with a specified // hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListResourceRecordSetsRequest @@ -11059,6 +11932,57 @@ func (s *ListVPCAssociationAuthorizationsOutput) SetVPCs(v []*VPC) *ListVPCAssoc return s } +// A complex type that contains information about a configuration for DNS query +// logging. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/QueryLoggingConfig +type QueryLoggingConfig struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the CloudWatch Logs log group that Amazon + // Route 53 is publishing logs to. + // + // CloudWatchLogsLogGroupArn is a required field + CloudWatchLogsLogGroupArn *string `type:"string" required:"true"` + + // The ID of the hosted zone that CloudWatch Logs is logging queries for. + // + // HostedZoneId is a required field + HostedZoneId *string `type:"string" required:"true"` + + // The ID for a configuration for DNS query logging. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s QueryLoggingConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryLoggingConfig) GoString() string { + return s.String() +} + +// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value. +func (s *QueryLoggingConfig) SetCloudWatchLogsLogGroupArn(v string) *QueryLoggingConfig { + s.CloudWatchLogsLogGroupArn = &v + return s +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *QueryLoggingConfig) SetHostedZoneId(v string) *QueryLoggingConfig { + s.HostedZoneId = &v + return s +} + +// SetId sets the Id field's value. +func (s *QueryLoggingConfig) SetId(v string) *QueryLoggingConfig { + s.Id = &v + return s +} + // Information specific to the resource record. // // If you're creating an alias resource record set, omit ResourceRecord. @@ -12491,6 +13415,23 @@ type UpdateHealthCheckInput struct { // want Amazon Route 53 health checkers to check the specified endpoint from. Regions []*string `locationNameList:"Region" min:"3" type:"list"` + // A complex type that contains one ResettableElementName element for each element + // that you want to reset to the default value. Valid values for ResettableElementName + // include the following: + // + // * ChildHealthChecks: Amazon Route 53 resets HealthCheckConfig$ChildHealthChecks + // to null. + // + // * FullyQualifiedDomainName: Amazon Route 53 resets HealthCheckConfig$FullyQualifiedDomainName + // to null. + // + // * Regions: Amazon Route 53 resets the HealthCheckConfig$Regions list to + // the default set of regions. + // + // * ResourcePath: Amazon Route 53 resets HealthCheckConfig$ResourcePath + // to null. + ResetElements []*string `locationNameList:"ResettableElementName" type:"list"` + // The path that you want Amazon Route 53 to request when performing health // checks. The path can be any value for which your endpoint will return an // HTTP status code of 2xx or 3xx when the endpoint is healthy, for example @@ -12625,6 +13566,12 @@ func (s *UpdateHealthCheckInput) SetRegions(v []*string) *UpdateHealthCheckInput return s } +// SetResetElements sets the ResetElements field's value. +func (s *UpdateHealthCheckInput) SetResetElements(v []*string) *UpdateHealthCheckInput { + s.ResetElements = v + return s +} + // SetResourcePath sets the ResourcePath field's value. func (s *UpdateHealthCheckInput) SetResourcePath(v string) *UpdateHealthCheckInput { s.ResourcePath = &v @@ -13192,6 +14139,20 @@ const ( RRTypeCaa = "CAA" ) +const ( + // ResettableElementNameFullyQualifiedDomainName is a ResettableElementName enum value + ResettableElementNameFullyQualifiedDomainName = "FullyQualifiedDomainName" + + // ResettableElementNameRegions is a ResettableElementName enum value + ResettableElementNameRegions = "Regions" + + // ResettableElementNameResourcePath is a ResettableElementName enum value + ResettableElementNameResourcePath = "ResourcePath" + + // ResettableElementNameChildHealthChecks is a ResettableElementName enum value + ResettableElementNameChildHealthChecks = "ChildHealthChecks" +) + const ( // ResourceRecordSetFailoverPrimary is a ResourceRecordSetFailover enum value ResourceRecordSetFailoverPrimary = "PRIMARY" diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/doc.go b/vendor/github.com/aws/aws-sdk-go/service/route53/doc.go index 64ac990f1..7965fea67 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/doc.go @@ -10,7 +10,7 @@ // // Using the Client // -// To Amazon Route 53 with the SDK use the New function to create +// To contact Amazon Route 53 with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go index a808abbab..24225020e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go @@ -7,8 +7,8 @@ const ( // ErrCodeConcurrentModification for service response error code // "ConcurrentModification". // - // Another user submitted a request to update the object at the same time that - // you did. Retry the request. + // Another user submitted a request to create, update, or delete the object + // at the same time that you did. Retry the request. ErrCodeConcurrentModification = "ConcurrentModification" // ErrCodeConflictingDomainExists for service response error code @@ -129,6 +129,21 @@ const ( // 53 endpoint. ErrCodeIncompatibleVersion = "IncompatibleVersion" + // ErrCodeInsufficientCloudWatchLogsResourcePolicy for service response error code + // "InsufficientCloudWatchLogsResourcePolicy". + // + // Amazon Route 53 doesn't have the permissions required to create log streams + // and send query logs to log streams. Possible causes include the following: + // + // * There is no resource policy that specifies the log group ARN in the + // value for Resource. + // + // * The resource policy that includes the log group ARN in the value for + // Resource doesn't have the necessary permissions. + // + // * The resource policy hasn't finished propagating yet. + ErrCodeInsufficientCloudWatchLogsResourcePolicy = "InsufficientCloudWatchLogsResourcePolicy" + // ErrCodeInvalidArgument for service response error code // "InvalidArgument". // @@ -156,6 +171,9 @@ const ( // ErrCodeInvalidPaginationToken for service response error code // "InvalidPaginationToken". + // + // The value that you specified to get the second or subsequent page of results + // is invalid. ErrCodeInvalidPaginationToken = "InvalidPaginationToken" // ErrCodeInvalidTrafficPolicyDocument for service response error code @@ -192,6 +210,12 @@ const ( // A change with the specified change ID does not exist. ErrCodeNoSuchChange = "NoSuchChange" + // ErrCodeNoSuchCloudWatchLogsLogGroup for service response error code + // "NoSuchCloudWatchLogsLogGroup". + // + // There is no CloudWatch Logs log group with the specified ARN. + ErrCodeNoSuchCloudWatchLogsLogGroup = "NoSuchCloudWatchLogsLogGroup" + // ErrCodeNoSuchDelegationSet for service response error code // "NoSuchDelegationSet". // @@ -217,6 +241,12 @@ const ( // No hosted zone exists with the ID that you specified. ErrCodeNoSuchHostedZone = "NoSuchHostedZone" + // ErrCodeNoSuchQueryLoggingConfig for service response error code + // "NoSuchQueryLoggingConfig". + // + // There is no DNS query logging configuration with the specified ID. + ErrCodeNoSuchQueryLoggingConfig = "NoSuchQueryLoggingConfig" + // ErrCodeNoSuchTrafficPolicy for service response error code // "NoSuchTrafficPolicy". // @@ -253,6 +283,13 @@ const ( // 53 doesn't support associating a VPC with a public hosted zone. ErrCodePublicZoneVPCAssociation = "PublicZoneVPCAssociation" + // ErrCodeQueryLoggingConfigAlreadyExists for service response error code + // "QueryLoggingConfigAlreadyExists". + // + // You can create only one query logging configuration for a hosted zone, and + // a query logging configuration already exists for this hosted zone. + ErrCodeQueryLoggingConfigAlreadyExists = "QueryLoggingConfigAlreadyExists" + // ErrCodeThrottlingException for service response error code // "ThrottlingException". // @@ -317,7 +354,7 @@ const ( // ErrCodeTrafficPolicyInstanceAlreadyExists for service response error code // "TrafficPolicyInstanceAlreadyExists". // - // Traffic policy instance with given Id already exists. + // There is already a traffic policy instance with the specified ID. ErrCodeTrafficPolicyInstanceAlreadyExists = "TrafficPolicyInstanceAlreadyExists" // ErrCodeVPCAssociationAuthorizationNotFound for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index e65ef266f..1df7b373a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -643,6 +643,82 @@ func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCor return out, req.Send() } +const opDeleteBucketEncryption = "DeleteBucketEncryption" + +// DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBucketEncryption operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBucketEncryption for more information on using the DeleteBucketEncryption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBucketEncryptionRequest method. +// req, resp := client.DeleteBucketEncryptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption +func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) { + op := &request.Operation{ + Name: opDeleteBucketEncryption, + HTTPMethod: "DELETE", + HTTPPath: "/{Bucket}?encryption", + } + + if input == nil { + input = &DeleteBucketEncryptionInput{} + } + + output = &DeleteBucketEncryptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteBucketEncryption API operation for Amazon Simple Storage Service. +// +// Deletes the server-side encryption configuration from the bucket. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Storage Service's +// API operation DeleteBucketEncryption for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption +func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) { + req, out := c.DeleteBucketEncryptionRequest(input) + return out, req.Send() +} + +// DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBucketEncryption for details on how to use this API operation. +// +// 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 *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) { + req, out := c.DeleteBucketEncryptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration" // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the @@ -1699,6 +1775,80 @@ func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput return out, req.Send() } +const opGetBucketEncryption = "GetBucketEncryption" + +// GetBucketEncryptionRequest generates a "aws/request.Request" representing the +// client's request for the GetBucketEncryption operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBucketEncryption for more information on using the GetBucketEncryption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBucketEncryptionRequest method. +// req, resp := client.GetBucketEncryptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption +func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) { + op := &request.Operation{ + Name: opGetBucketEncryption, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?encryption", + } + + if input == nil { + input = &GetBucketEncryptionInput{} + } + + output = &GetBucketEncryptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBucketEncryption API operation for Amazon Simple Storage Service. +// +// Returns the server-side encryption configuration of a bucket. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Storage Service's +// API operation GetBucketEncryption for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption +func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) { + req, out := c.GetBucketEncryptionRequest(input) + return out, req.Send() +} + +// GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of +// the ability to pass a context and additional request options. +// +// See GetBucketEncryption for details on how to use this API operation. +// +// 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 *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) { + req, out := c.GetBucketEncryptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration" // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the @@ -4477,6 +4627,83 @@ func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput return out, req.Send() } +const opPutBucketEncryption = "PutBucketEncryption" + +// PutBucketEncryptionRequest generates a "aws/request.Request" representing the +// client's request for the PutBucketEncryption operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutBucketEncryption for more information on using the PutBucketEncryption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutBucketEncryptionRequest method. +// req, resp := client.PutBucketEncryptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption +func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) { + op := &request.Operation{ + Name: opPutBucketEncryption, + HTTPMethod: "PUT", + HTTPPath: "/{Bucket}?encryption", + } + + if input == nil { + input = &PutBucketEncryptionInput{} + } + + output = &PutBucketEncryptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutBucketEncryption API operation for Amazon Simple Storage Service. +// +// Creates a new server-side encryption configuration (or replaces an existing +// one, if present). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Storage Service's +// API operation PutBucketEncryption for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption +func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) { + req, out := c.PutBucketEncryptionRequest(input) + return out, req.Send() +} + +// PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of +// the ability to pass a context and additional request options. +// +// See PutBucketEncryption for details on how to use this API operation. +// +// 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 *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) { + req, out := c.PutBucketEncryptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration" // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the @@ -6155,6 +6382,46 @@ func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy { return s } +// Container for information regarding the access control for replicas. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlTranslation +type AccessControlTranslation struct { + _ struct{} `type:"structure"` + + // The override value for the owner of the replica object. + // + // Owner is a required field + Owner *string `type:"string" required:"true" enum:"OwnerOverride"` +} + +// String returns the string representation +func (s AccessControlTranslation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessControlTranslation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AccessControlTranslation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"} + if s.Owner == nil { + invalidParams.Add(request.NewErrParamRequired("Owner")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOwner sets the Owner field's value. +func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation { + s.Owner = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsAndOperator type AnalyticsAndOperator struct { _ struct{} `type:"structure"` @@ -8382,6 +8649,68 @@ func (s DeleteBucketCorsOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryptionRequest +type DeleteBucketEncryptionInput struct { + _ struct{} `type:"structure"` + + // The name of the bucket containing the server-side encryption configuration + // to delete. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBucketEncryptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBucketEncryptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBucketEncryptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput { + s.Bucket = &v + return s +} + +func (s *DeleteBucketEncryptionInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryptionOutput +type DeleteBucketEncryptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteBucketEncryptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBucketEncryptionOutput) GoString() string { + return s.String() +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketRequest type DeleteBucketInput struct { _ struct{} `type:"structure"` @@ -9344,16 +9673,27 @@ func (s *DeletedObject) SetVersionId(v string) *DeletedObject { return s } +// Container for replication destination information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Destination type Destination struct { _ struct{} `type:"structure"` + // Container for information regarding the access control for replicas. + AccessControlTranslation *AccessControlTranslation `type:"structure"` + + // Account ID of the destination bucket. Currently this is only being verified + // if Access Control Translation is enabled + Account *string `type:"string"` + // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store // replicas of the object identified by the rule. // // Bucket is a required field Bucket *string `type:"string" required:"true"` + // Container for information regarding encryption based configuration for replicas. + EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // The class of storage used to store the object. StorageClass *string `type:"string" enum:"StorageClass"` } @@ -9374,6 +9714,11 @@ func (s *Destination) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.AccessControlTranslation != nil { + if err := s.AccessControlTranslation.Validate(); err != nil { + invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9381,6 +9726,18 @@ func (s *Destination) Validate() error { return nil } +// SetAccessControlTranslation sets the AccessControlTranslation field's value. +func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination { + s.AccessControlTranslation = v + return s +} + +// SetAccount sets the Account field's value. +func (s *Destination) SetAccount(v string) *Destination { + s.Account = &v + return s +} + // SetBucket sets the Bucket field's value. func (s *Destination) SetBucket(v string) *Destination { s.Bucket = &v @@ -9394,12 +9751,43 @@ func (s *Destination) getBucket() (v string) { return *s.Bucket } +// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. +func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination { + s.EncryptionConfiguration = v + return s +} + // SetStorageClass sets the StorageClass field's value. func (s *Destination) SetStorageClass(v string) *Destination { s.StorageClass = &v return s } +// Container for information regarding encryption based configuration for replicas. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/EncryptionConfiguration +type EncryptionConfiguration struct { + _ struct{} `type:"structure"` + + // The id of the KMS key used to encrypt the replica object. + ReplicaKmsKeyID *string `type:"string"` +} + +// String returns the string representation +func (s EncryptionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EncryptionConfiguration) GoString() string { + return s.String() +} + +// SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value. +func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration { + s.ReplicaKmsKeyID = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Error type Error struct { _ struct{} `type:"structure"` @@ -9822,6 +10210,78 @@ func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryptionRequest +type GetBucketEncryptionInput struct { + _ struct{} `type:"structure"` + + // The name of the bucket from which the server-side encryption configuration + // is retrieved. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBucketEncryptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBucketEncryptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketEncryptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput { + s.Bucket = &v + return s +} + +func (s *GetBucketEncryptionInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryptionOutput +type GetBucketEncryptionOutput struct { + _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"` + + // Container for server-side encryption configuration rules. Currently S3 supports + // one rule only. + ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"` +} + +// String returns the string representation +func (s GetBucketEncryptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBucketEncryptionOutput) GoString() string { + return s.String() +} + +// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value. +func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput { + s.ServerSideEncryptionConfiguration = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationRequest type GetBucketInventoryConfigurationInput struct { _ struct{} `type:"structure"` @@ -12500,6 +12960,56 @@ func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestin return s } +// Contains the type of server-side encryption used to encrypt the inventory +// results. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryEncryption +type InventoryEncryption struct { + _ struct{} `type:"structure"` + + // Specifies the use of SSE-KMS to encrypt delievered Inventory reports. + SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"` + + // Specifies the use of SSE-S3 to encrypt delievered Inventory reports. + SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"` +} + +// String returns the string representation +func (s InventoryEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryEncryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InventoryEncryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"} + if s.SSEKMS != nil { + if err := s.SSEKMS.Validate(); err != nil { + invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSSEKMS sets the SSEKMS field's value. +func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption { + s.SSEKMS = v + return s +} + +// SetSSES3 sets the SSES3 field's value. +func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption { + s.SSES3 = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryFilter type InventoryFilter struct { _ struct{} `type:"structure"` @@ -12552,6 +13062,10 @@ type InventoryS3BucketDestination struct { // Bucket is a required field Bucket *string `type:"string" required:"true"` + // Contains the type of server-side encryption used to encrypt the inventory + // results. + Encryption *InventoryEncryption `type:"structure"` + // Specifies the output format of the inventory results. // // Format is a required field @@ -12580,6 +13094,11 @@ func (s *InventoryS3BucketDestination) Validate() error { if s.Format == nil { invalidParams.Add(request.NewErrParamRequired("Format")) } + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -12606,6 +13125,12 @@ func (s *InventoryS3BucketDestination) getBucket() (v string) { return *s.Bucket } +// SetEncryption sets the Encryption field's value. +func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination { + s.Encryption = v + return s +} + // SetFormat sets the Format field's value. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination { s.Format = &v @@ -15860,6 +16385,88 @@ func (s PutBucketCorsOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryptionRequest +type PutBucketEncryptionInput struct { + _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"` + + // The name of the bucket for which the server-side encryption configuration + // is set. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + + // Container for server-side encryption configuration rules. Currently S3 supports + // one rule only. + // + // ServerSideEncryptionConfiguration is a required field + ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` +} + +// String returns the string representation +func (s PutBucketEncryptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBucketEncryptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketEncryptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.ServerSideEncryptionConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration")) + } + if s.ServerSideEncryptionConfiguration != nil { + if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil { + invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput { + s.Bucket = &v + return s +} + +func (s *PutBucketEncryptionInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value. +func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput { + s.ServerSideEncryptionConfiguration = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryptionOutput +type PutBucketEncryptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutBucketEncryptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBucketEncryptionOutput) GoString() string { + return s.String() +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationRequest type PutBucketInventoryConfigurationInput struct { _ struct{} `type:"structure" payload:"InventoryConfiguration"` @@ -16425,6 +17032,10 @@ type PutBucketPolicyInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + // Set this parameter to true to confirm that you want to remove your permissions + // to change this bucket policy in the future. + ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"` + // The bucket policy as a JSON document. // // Policy is a required field @@ -16470,6 +17081,12 @@ func (s *PutBucketPolicyInput) getBucket() (v string) { return *s.Bucket } +// SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value. +func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput { + s.ConfirmRemoveSelfBucketAccess = &v + return s +} + // SetPolicy sets the Policy field's value. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput { s.Policy = &v @@ -17085,6 +17702,9 @@ type PutObjectInput struct { // body cannot be determined automatically. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` + // The base64-encoded 128-bit MD5 digest of the part data. + ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"` + // A standard MIME type describing the format of the object data. ContentType *string `location:"header" locationName:"Content-Type" type:"string"` @@ -17238,6 +17858,12 @@ func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput { return s } +// SetContentMD5 sets the ContentMD5 field's value. +func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput { + s.ContentMD5 = &v + return s +} + // SetContentType sets the ContentType field's value. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput { s.ContentType = &v @@ -17858,10 +18484,13 @@ func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationCo return s } +// Container for information about a particular replication rule. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRule type ReplicationRule struct { _ struct{} `type:"structure"` + // Container for replication destination information. + // // Destination is a required field Destination *Destination `type:"structure" required:"true"` @@ -17875,6 +18504,9 @@ type ReplicationRule struct { // Prefix is a required field Prefix *string `type:"string" required:"true"` + // Container for filters that define which source objects should be replicated. + SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"` + // The rule is ignored if status is not Enabled. // // Status is a required field @@ -17908,6 +18540,11 @@ func (s *ReplicationRule) Validate() error { invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) } } + if s.SourceSelectionCriteria != nil { + if err := s.SourceSelectionCriteria.Validate(); err != nil { + invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -17933,6 +18570,12 @@ func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule { return s } +// SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value. +func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule { + s.SourceSelectionCriteria = v + return s +} + // SetStatus sets the Status field's value. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule { s.Status = &v @@ -18316,6 +18959,291 @@ func (s *Rule) SetTransition(v *Transition) *Rule { return s } +// Specifies the use of SSE-KMS to encrypt delievered Inventory reports. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SSEKMS +type SSEKMS struct { + _ struct{} `locationName:"SSE-KMS" type:"structure"` + + // Specifies the ID of the AWS Key Management Service (KMS) master encryption + // key to use for encrypting Inventory reports. + // + // KeyId is a required field + KeyId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s SSEKMS) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SSEKMS) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SSEKMS) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SSEKMS"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyId sets the KeyId field's value. +func (s *SSEKMS) SetKeyId(v string) *SSEKMS { + s.KeyId = &v + return s +} + +// Specifies the use of SSE-S3 to encrypt delievered Inventory reports. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SSES3 +type SSES3 struct { + _ struct{} `locationName:"SSE-S3" type:"structure"` +} + +// String returns the string representation +func (s SSES3) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SSES3) GoString() string { + return s.String() +} + +// Describes the default server-side encryption to apply to new objects in the +// bucket. If Put Object request does not specify any server-side encryption, +// this default encryption will be applied. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ServerSideEncryptionByDefault +type ServerSideEncryptionByDefault struct { + _ struct{} `type:"structure"` + + // KMS master key ID to use for the default encryption. This parameter is allowed + // if SSEAlgorithm is aws:kms. + KMSMasterKeyID *string `type:"string"` + + // Server-side encryption algorithm to use for the default encryption. + // + // SSEAlgorithm is a required field + SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"` +} + +// String returns the string representation +func (s ServerSideEncryptionByDefault) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServerSideEncryptionByDefault) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ServerSideEncryptionByDefault) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"} + if s.SSEAlgorithm == nil { + invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKMSMasterKeyID sets the KMSMasterKeyID field's value. +func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault { + s.KMSMasterKeyID = &v + return s +} + +// SetSSEAlgorithm sets the SSEAlgorithm field's value. +func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault { + s.SSEAlgorithm = &v + return s +} + +// Container for server-side encryption configuration rules. Currently S3 supports +// one rule only. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ServerSideEncryptionConfiguration +type ServerSideEncryptionConfiguration struct { + _ struct{} `type:"structure"` + + // Container for information about a particular server-side encryption configuration + // rule. + // + // Rules is a required field + Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"` +} + +// String returns the string representation +func (s ServerSideEncryptionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServerSideEncryptionConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ServerSideEncryptionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"} + if s.Rules == nil { + invalidParams.Add(request.NewErrParamRequired("Rules")) + } + if s.Rules != nil { + for i, v := range s.Rules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRules sets the Rules field's value. +func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration { + s.Rules = v + return s +} + +// Container for information about a particular server-side encryption configuration +// rule. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ServerSideEncryptionRule +type ServerSideEncryptionRule struct { + _ struct{} `type:"structure"` + + // Describes the default server-side encryption to apply to new objects in the + // bucket. If Put Object request does not specify any server-side encryption, + // this default encryption will be applied. + ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"` +} + +// String returns the string representation +func (s ServerSideEncryptionRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServerSideEncryptionRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ServerSideEncryptionRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"} + if s.ApplyServerSideEncryptionByDefault != nil { + if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil { + invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value. +func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule { + s.ApplyServerSideEncryptionByDefault = v + return s +} + +// Container for filters that define which source objects should be replicated. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SourceSelectionCriteria +type SourceSelectionCriteria struct { + _ struct{} `type:"structure"` + + // Container for filter information of selection of KMS Encrypted S3 objects. + SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"` +} + +// String returns the string representation +func (s SourceSelectionCriteria) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SourceSelectionCriteria) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SourceSelectionCriteria) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"} + if s.SseKmsEncryptedObjects != nil { + if err := s.SseKmsEncryptedObjects.Validate(); err != nil { + invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value. +func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria { + s.SseKmsEncryptedObjects = v + return s +} + +// Container for filter information of selection of KMS Encrypted S3 objects. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SseKmsEncryptedObjects +type SseKmsEncryptedObjects struct { + _ struct{} `type:"structure"` + + // The replication for KMS encrypted S3 objects is disabled if status is not + // Enabled. + // + // Status is a required field + Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"` +} + +// String returns the string representation +func (s SseKmsEncryptedObjects) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SseKmsEncryptedObjects) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SseKmsEncryptedObjects) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"} + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStatus sets the Status field's value. +func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects { + s.Status = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysis type StorageClassAnalysis struct { _ struct{} `type:"structure"` @@ -19079,6 +20007,9 @@ type UploadPartInput struct { // body cannot be determined automatically. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` + // The base64-encoded 128-bit MD5 digest of the part data. + ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"` + // Object key for which the multipart upload was initiated. // // Key is a required field @@ -19178,6 +20109,12 @@ func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput { return s } +// SetContentMD5 sets the ContentMD5 field's value. +func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput { + s.ContentMD5 = &v + return s +} + // SetKey sets the Key field's value. func (s *UploadPartInput) SetKey(v string) *UploadPartInput { s.Key = &v @@ -19597,6 +20534,9 @@ const ( // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value InventoryOptionalFieldReplicationStatus = "ReplicationStatus" + + // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value + InventoryOptionalFieldEncryptionStatus = "EncryptionStatus" ) const ( @@ -19662,6 +20602,11 @@ const ( ObjectVersionStorageClassStandard = "STANDARD" ) +const ( + // OwnerOverrideDestination is a OwnerOverride enum value + OwnerOverrideDestination = "Destination" +) + const ( // PayerRequester is a Payer enum value PayerRequester = "Requester" @@ -19741,6 +20686,14 @@ const ( ServerSideEncryptionAwsKms = "aws:kms" ) +const ( + // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value + SseKmsEncryptedObjectsStatusEnabled = "Enabled" + + // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value + SseKmsEncryptedObjectsStatusDisabled = "Disabled" +) + const ( // StorageClassStandard is a StorageClass enum value StorageClassStandard = "STANDARD" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go index 30068d159..0def02255 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go @@ -10,7 +10,7 @@ // // Using the Client // -// To Amazon Simple Storage Service with the SDK use the New function to create +// To contact Amazon Simple Storage Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go new file mode 100644 index 000000000..b9b2efdef --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go @@ -0,0 +1,12713 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package servicecatalog + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opAcceptPortfolioShare = "AcceptPortfolioShare" + +// AcceptPortfolioShareRequest generates a "aws/request.Request" representing the +// client's request for the AcceptPortfolioShare operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AcceptPortfolioShare for more information on using the AcceptPortfolioShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AcceptPortfolioShareRequest method. +// req, resp := client.AcceptPortfolioShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AcceptPortfolioShare +func (c *ServiceCatalog) AcceptPortfolioShareRequest(input *AcceptPortfolioShareInput) (req *request.Request, output *AcceptPortfolioShareOutput) { + op := &request.Operation{ + Name: opAcceptPortfolioShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AcceptPortfolioShareInput{} + } + + output = &AcceptPortfolioShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptPortfolioShare API operation for AWS Service Catalog. +// +// Accepts an offer to share a portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation AcceptPortfolioShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AcceptPortfolioShare +func (c *ServiceCatalog) AcceptPortfolioShare(input *AcceptPortfolioShareInput) (*AcceptPortfolioShareOutput, error) { + req, out := c.AcceptPortfolioShareRequest(input) + return out, req.Send() +} + +// AcceptPortfolioShareWithContext is the same as AcceptPortfolioShare with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptPortfolioShare for details on how to use this API operation. +// +// 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 *ServiceCatalog) AcceptPortfolioShareWithContext(ctx aws.Context, input *AcceptPortfolioShareInput, opts ...request.Option) (*AcceptPortfolioShareOutput, error) { + req, out := c.AcceptPortfolioShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociatePrincipalWithPortfolio = "AssociatePrincipalWithPortfolio" + +// AssociatePrincipalWithPortfolioRequest generates a "aws/request.Request" representing the +// client's request for the AssociatePrincipalWithPortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociatePrincipalWithPortfolio for more information on using the AssociatePrincipalWithPortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociatePrincipalWithPortfolioRequest method. +// req, resp := client.AssociatePrincipalWithPortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociatePrincipalWithPortfolio +func (c *ServiceCatalog) AssociatePrincipalWithPortfolioRequest(input *AssociatePrincipalWithPortfolioInput) (req *request.Request, output *AssociatePrincipalWithPortfolioOutput) { + op := &request.Operation{ + Name: opAssociatePrincipalWithPortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociatePrincipalWithPortfolioInput{} + } + + output = &AssociatePrincipalWithPortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociatePrincipalWithPortfolio API operation for AWS Service Catalog. +// +// Associates the specified principal ARN with the specified portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation AssociatePrincipalWithPortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociatePrincipalWithPortfolio +func (c *ServiceCatalog) AssociatePrincipalWithPortfolio(input *AssociatePrincipalWithPortfolioInput) (*AssociatePrincipalWithPortfolioOutput, error) { + req, out := c.AssociatePrincipalWithPortfolioRequest(input) + return out, req.Send() +} + +// AssociatePrincipalWithPortfolioWithContext is the same as AssociatePrincipalWithPortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See AssociatePrincipalWithPortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) AssociatePrincipalWithPortfolioWithContext(ctx aws.Context, input *AssociatePrincipalWithPortfolioInput, opts ...request.Option) (*AssociatePrincipalWithPortfolioOutput, error) { + req, out := c.AssociatePrincipalWithPortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateProductWithPortfolio = "AssociateProductWithPortfolio" + +// AssociateProductWithPortfolioRequest generates a "aws/request.Request" representing the +// client's request for the AssociateProductWithPortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateProductWithPortfolio for more information on using the AssociateProductWithPortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateProductWithPortfolioRequest method. +// req, resp := client.AssociateProductWithPortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateProductWithPortfolio +func (c *ServiceCatalog) AssociateProductWithPortfolioRequest(input *AssociateProductWithPortfolioInput) (req *request.Request, output *AssociateProductWithPortfolioOutput) { + op := &request.Operation{ + Name: opAssociateProductWithPortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateProductWithPortfolioInput{} + } + + output = &AssociateProductWithPortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateProductWithPortfolio API operation for AWS Service Catalog. +// +// Associates a product with a portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation AssociateProductWithPortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateProductWithPortfolio +func (c *ServiceCatalog) AssociateProductWithPortfolio(input *AssociateProductWithPortfolioInput) (*AssociateProductWithPortfolioOutput, error) { + req, out := c.AssociateProductWithPortfolioRequest(input) + return out, req.Send() +} + +// AssociateProductWithPortfolioWithContext is the same as AssociateProductWithPortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateProductWithPortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) AssociateProductWithPortfolioWithContext(ctx aws.Context, input *AssociateProductWithPortfolioInput, opts ...request.Option) (*AssociateProductWithPortfolioOutput, error) { + req, out := c.AssociateProductWithPortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateTagOptionWithResource = "AssociateTagOptionWithResource" + +// AssociateTagOptionWithResourceRequest generates a "aws/request.Request" representing the +// client's request for the AssociateTagOptionWithResource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateTagOptionWithResource for more information on using the AssociateTagOptionWithResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateTagOptionWithResourceRequest method. +// req, resp := client.AssociateTagOptionWithResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateTagOptionWithResource +func (c *ServiceCatalog) AssociateTagOptionWithResourceRequest(input *AssociateTagOptionWithResourceInput) (req *request.Request, output *AssociateTagOptionWithResourceOutput) { + op := &request.Operation{ + Name: opAssociateTagOptionWithResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateTagOptionWithResourceInput{} + } + + output = &AssociateTagOptionWithResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateTagOptionWithResource API operation for AWS Service Catalog. +// +// Associate a TagOption identifier with a resource identifier. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation AssociateTagOptionWithResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// An attempt was made to modify a resource that is in an invalid state. Inspect +// the resource you are using for this operation to ensure that all resource +// states are valid before retrying the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateTagOptionWithResource +func (c *ServiceCatalog) AssociateTagOptionWithResource(input *AssociateTagOptionWithResourceInput) (*AssociateTagOptionWithResourceOutput, error) { + req, out := c.AssociateTagOptionWithResourceRequest(input) + return out, req.Send() +} + +// AssociateTagOptionWithResourceWithContext is the same as AssociateTagOptionWithResource with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateTagOptionWithResource for details on how to use this API operation. +// +// 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 *ServiceCatalog) AssociateTagOptionWithResourceWithContext(ctx aws.Context, input *AssociateTagOptionWithResourceInput, opts ...request.Option) (*AssociateTagOptionWithResourceOutput, error) { + req, out := c.AssociateTagOptionWithResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCopyProduct = "CopyProduct" + +// CopyProductRequest generates a "aws/request.Request" representing the +// client's request for the CopyProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CopyProduct for more information on using the CopyProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CopyProductRequest method. +// req, resp := client.CopyProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CopyProduct +func (c *ServiceCatalog) CopyProductRequest(input *CopyProductInput) (req *request.Request, output *CopyProductOutput) { + op := &request.Operation{ + Name: opCopyProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopyProductInput{} + } + + output = &CopyProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopyProduct API operation for AWS Service Catalog. +// +// Copies the specified source product to the specified target product or a +// new product. +// +// You can copy the product to the same account or another account. You can +// copy the product to the same region or another region. +// +// This operation is performed asynchronously. To track the progress of the +// operation, use DescribeCopyProductStatus. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation CopyProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CopyProduct +func (c *ServiceCatalog) CopyProduct(input *CopyProductInput) (*CopyProductOutput, error) { + req, out := c.CopyProductRequest(input) + return out, req.Send() +} + +// CopyProductWithContext is the same as CopyProduct with the addition of +// the ability to pass a context and additional request options. +// +// See CopyProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) CopyProductWithContext(ctx aws.Context, input *CopyProductInput, opts ...request.Option) (*CopyProductOutput, error) { + req, out := c.CopyProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateConstraint = "CreateConstraint" + +// CreateConstraintRequest generates a "aws/request.Request" representing the +// client's request for the CreateConstraint operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateConstraint for more information on using the CreateConstraint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateConstraintRequest method. +// req, resp := client.CreateConstraintRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateConstraint +func (c *ServiceCatalog) CreateConstraintRequest(input *CreateConstraintInput) (req *request.Request, output *CreateConstraintOutput) { + op := &request.Operation{ + Name: opCreateConstraint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateConstraintInput{} + } + + output = &CreateConstraintOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateConstraint API operation for AWS Service Catalog. +// +// Creates a new constraint. For more information, see Using Constraints (http://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation CreateConstraint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateConstraint +func (c *ServiceCatalog) CreateConstraint(input *CreateConstraintInput) (*CreateConstraintOutput, error) { + req, out := c.CreateConstraintRequest(input) + return out, req.Send() +} + +// CreateConstraintWithContext is the same as CreateConstraint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateConstraint for details on how to use this API operation. +// +// 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 *ServiceCatalog) CreateConstraintWithContext(ctx aws.Context, input *CreateConstraintInput, opts ...request.Option) (*CreateConstraintOutput, error) { + req, out := c.CreateConstraintRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreatePortfolio = "CreatePortfolio" + +// CreatePortfolioRequest generates a "aws/request.Request" representing the +// client's request for the CreatePortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePortfolio for more information on using the CreatePortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePortfolioRequest method. +// req, resp := client.CreatePortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolio +func (c *ServiceCatalog) CreatePortfolioRequest(input *CreatePortfolioInput) (req *request.Request, output *CreatePortfolioOutput) { + op := &request.Operation{ + Name: opCreatePortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreatePortfolioInput{} + } + + output = &CreatePortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreatePortfolio API operation for AWS Service Catalog. +// +// Creates a new portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation CreatePortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolio +func (c *ServiceCatalog) CreatePortfolio(input *CreatePortfolioInput) (*CreatePortfolioOutput, error) { + req, out := c.CreatePortfolioRequest(input) + return out, req.Send() +} + +// CreatePortfolioWithContext is the same as CreatePortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) CreatePortfolioWithContext(ctx aws.Context, input *CreatePortfolioInput, opts ...request.Option) (*CreatePortfolioOutput, error) { + req, out := c.CreatePortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreatePortfolioShare = "CreatePortfolioShare" + +// CreatePortfolioShareRequest generates a "aws/request.Request" representing the +// client's request for the CreatePortfolioShare operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePortfolioShare for more information on using the CreatePortfolioShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePortfolioShareRequest method. +// req, resp := client.CreatePortfolioShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioShare +func (c *ServiceCatalog) CreatePortfolioShareRequest(input *CreatePortfolioShareInput) (req *request.Request, output *CreatePortfolioShareOutput) { + op := &request.Operation{ + Name: opCreatePortfolioShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreatePortfolioShareInput{} + } + + output = &CreatePortfolioShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreatePortfolioShare API operation for AWS Service Catalog. +// +// Creates a new portfolio share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation CreatePortfolioShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioShare +func (c *ServiceCatalog) CreatePortfolioShare(input *CreatePortfolioShareInput) (*CreatePortfolioShareOutput, error) { + req, out := c.CreatePortfolioShareRequest(input) + return out, req.Send() +} + +// CreatePortfolioShareWithContext is the same as CreatePortfolioShare with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePortfolioShare for details on how to use this API operation. +// +// 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 *ServiceCatalog) CreatePortfolioShareWithContext(ctx aws.Context, input *CreatePortfolioShareInput, opts ...request.Option) (*CreatePortfolioShareOutput, error) { + req, out := c.CreatePortfolioShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateProduct = "CreateProduct" + +// CreateProductRequest generates a "aws/request.Request" representing the +// client's request for the CreateProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateProduct for more information on using the CreateProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateProductRequest method. +// req, resp := client.CreateProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProduct +func (c *ServiceCatalog) CreateProductRequest(input *CreateProductInput) (req *request.Request, output *CreateProductOutput) { + op := &request.Operation{ + Name: opCreateProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateProductInput{} + } + + output = &CreateProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateProduct API operation for AWS Service Catalog. +// +// Creates a new product. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation CreateProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProduct +func (c *ServiceCatalog) CreateProduct(input *CreateProductInput) (*CreateProductOutput, error) { + req, out := c.CreateProductRequest(input) + return out, req.Send() +} + +// CreateProductWithContext is the same as CreateProduct with the addition of +// the ability to pass a context and additional request options. +// +// See CreateProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) CreateProductWithContext(ctx aws.Context, input *CreateProductInput, opts ...request.Option) (*CreateProductOutput, error) { + req, out := c.CreateProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateProvisioningArtifact = "CreateProvisioningArtifact" + +// CreateProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the CreateProvisioningArtifact operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateProvisioningArtifact for more information on using the CreateProvisioningArtifact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateProvisioningArtifactRequest method. +// req, resp := client.CreateProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProvisioningArtifact +func (c *ServiceCatalog) CreateProvisioningArtifactRequest(input *CreateProvisioningArtifactInput) (req *request.Request, output *CreateProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opCreateProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateProvisioningArtifactInput{} + } + + output = &CreateProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateProvisioningArtifact API operation for AWS Service Catalog. +// +// Create a new provisioning artifact for the specified product. This operation +// does not work with a product that has been shared with you. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation CreateProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProvisioningArtifact +func (c *ServiceCatalog) CreateProvisioningArtifact(input *CreateProvisioningArtifactInput) (*CreateProvisioningArtifactOutput, error) { + req, out := c.CreateProvisioningArtifactRequest(input) + return out, req.Send() +} + +// CreateProvisioningArtifactWithContext is the same as CreateProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See CreateProvisioningArtifact for details on how to use this API operation. +// +// 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 *ServiceCatalog) CreateProvisioningArtifactWithContext(ctx aws.Context, input *CreateProvisioningArtifactInput, opts ...request.Option) (*CreateProvisioningArtifactOutput, error) { + req, out := c.CreateProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTagOption = "CreateTagOption" + +// CreateTagOptionRequest generates a "aws/request.Request" representing the +// client's request for the CreateTagOption operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTagOption for more information on using the CreateTagOption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTagOptionRequest method. +// req, resp := client.CreateTagOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateTagOption +func (c *ServiceCatalog) CreateTagOptionRequest(input *CreateTagOptionInput) (req *request.Request, output *CreateTagOptionOutput) { + op := &request.Operation{ + Name: opCreateTagOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTagOptionInput{} + } + + output = &CreateTagOptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTagOption API operation for AWS Service Catalog. +// +// Create a new TagOption. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation CreateTagOption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateTagOption +func (c *ServiceCatalog) CreateTagOption(input *CreateTagOptionInput) (*CreateTagOptionOutput, error) { + req, out := c.CreateTagOptionRequest(input) + return out, req.Send() +} + +// CreateTagOptionWithContext is the same as CreateTagOption with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTagOption for details on how to use this API operation. +// +// 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 *ServiceCatalog) CreateTagOptionWithContext(ctx aws.Context, input *CreateTagOptionInput, opts ...request.Option) (*CreateTagOptionOutput, error) { + req, out := c.CreateTagOptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteConstraint = "DeleteConstraint" + +// DeleteConstraintRequest generates a "aws/request.Request" representing the +// client's request for the DeleteConstraint operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteConstraint for more information on using the DeleteConstraint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteConstraintRequest method. +// req, resp := client.DeleteConstraintRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteConstraint +func (c *ServiceCatalog) DeleteConstraintRequest(input *DeleteConstraintInput) (req *request.Request, output *DeleteConstraintOutput) { + op := &request.Operation{ + Name: opDeleteConstraint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteConstraintInput{} + } + + output = &DeleteConstraintOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteConstraint API operation for AWS Service Catalog. +// +// Deletes the specified constraint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DeleteConstraint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteConstraint +func (c *ServiceCatalog) DeleteConstraint(input *DeleteConstraintInput) (*DeleteConstraintOutput, error) { + req, out := c.DeleteConstraintRequest(input) + return out, req.Send() +} + +// DeleteConstraintWithContext is the same as DeleteConstraint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteConstraint for details on how to use this API operation. +// +// 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 *ServiceCatalog) DeleteConstraintWithContext(ctx aws.Context, input *DeleteConstraintInput, opts ...request.Option) (*DeleteConstraintOutput, error) { + req, out := c.DeleteConstraintRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeletePortfolio = "DeletePortfolio" + +// DeletePortfolioRequest generates a "aws/request.Request" representing the +// client's request for the DeletePortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePortfolio for more information on using the DeletePortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePortfolioRequest method. +// req, resp := client.DeletePortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolio +func (c *ServiceCatalog) DeletePortfolioRequest(input *DeletePortfolioInput) (req *request.Request, output *DeletePortfolioOutput) { + op := &request.Operation{ + Name: opDeletePortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeletePortfolioInput{} + } + + output = &DeletePortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeletePortfolio API operation for AWS Service Catalog. +// +// Deletes the specified portfolio. This operation does not work with a portfolio +// that has been shared with you or if it has products, users, constraints, +// or shared accounts associated with it. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DeletePortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation was requested against a resource that is currently in use. +// Free the resource from use and retry the operation. +// +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolio +func (c *ServiceCatalog) DeletePortfolio(input *DeletePortfolioInput) (*DeletePortfolioOutput, error) { + req, out := c.DeletePortfolioRequest(input) + return out, req.Send() +} + +// DeletePortfolioWithContext is the same as DeletePortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) DeletePortfolioWithContext(ctx aws.Context, input *DeletePortfolioInput, opts ...request.Option) (*DeletePortfolioOutput, error) { + req, out := c.DeletePortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeletePortfolioShare = "DeletePortfolioShare" + +// DeletePortfolioShareRequest generates a "aws/request.Request" representing the +// client's request for the DeletePortfolioShare operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePortfolioShare for more information on using the DeletePortfolioShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePortfolioShareRequest method. +// req, resp := client.DeletePortfolioShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioShare +func (c *ServiceCatalog) DeletePortfolioShareRequest(input *DeletePortfolioShareInput) (req *request.Request, output *DeletePortfolioShareOutput) { + op := &request.Operation{ + Name: opDeletePortfolioShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeletePortfolioShareInput{} + } + + output = &DeletePortfolioShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeletePortfolioShare API operation for AWS Service Catalog. +// +// Deletes the specified portfolio share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DeletePortfolioShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioShare +func (c *ServiceCatalog) DeletePortfolioShare(input *DeletePortfolioShareInput) (*DeletePortfolioShareOutput, error) { + req, out := c.DeletePortfolioShareRequest(input) + return out, req.Send() +} + +// DeletePortfolioShareWithContext is the same as DeletePortfolioShare with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePortfolioShare for details on how to use this API operation. +// +// 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 *ServiceCatalog) DeletePortfolioShareWithContext(ctx aws.Context, input *DeletePortfolioShareInput, opts ...request.Option) (*DeletePortfolioShareOutput, error) { + req, out := c.DeletePortfolioShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteProduct = "DeleteProduct" + +// DeleteProductRequest generates a "aws/request.Request" representing the +// client's request for the DeleteProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteProduct for more information on using the DeleteProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteProductRequest method. +// req, resp := client.DeleteProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProduct +func (c *ServiceCatalog) DeleteProductRequest(input *DeleteProductInput) (req *request.Request, output *DeleteProductOutput) { + op := &request.Operation{ + Name: opDeleteProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteProductInput{} + } + + output = &DeleteProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteProduct API operation for AWS Service Catalog. +// +// Deletes the specified product. This operation does not work with a product +// that has been shared with you or is associated with a portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DeleteProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation was requested against a resource that is currently in use. +// Free the resource from use and retry the operation. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProduct +func (c *ServiceCatalog) DeleteProduct(input *DeleteProductInput) (*DeleteProductOutput, error) { + req, out := c.DeleteProductRequest(input) + return out, req.Send() +} + +// DeleteProductWithContext is the same as DeleteProduct with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) DeleteProductWithContext(ctx aws.Context, input *DeleteProductInput, opts ...request.Option) (*DeleteProductOutput, error) { + req, out := c.DeleteProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteProvisioningArtifact = "DeleteProvisioningArtifact" + +// DeleteProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the DeleteProvisioningArtifact operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteProvisioningArtifact for more information on using the DeleteProvisioningArtifact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteProvisioningArtifactRequest method. +// req, resp := client.DeleteProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProvisioningArtifact +func (c *ServiceCatalog) DeleteProvisioningArtifactRequest(input *DeleteProvisioningArtifactInput) (req *request.Request, output *DeleteProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opDeleteProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteProvisioningArtifactInput{} + } + + output = &DeleteProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteProvisioningArtifact API operation for AWS Service Catalog. +// +// Deletes the specified provisioning artifact. This operation does not work +// on a provisioning artifact associated with a product that has been shared +// with you, or on the last provisioning artifact associated with a product +// (a product must have at least one provisioning artifact). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DeleteProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation was requested against a resource that is currently in use. +// Free the resource from use and retry the operation. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProvisioningArtifact +func (c *ServiceCatalog) DeleteProvisioningArtifact(input *DeleteProvisioningArtifactInput) (*DeleteProvisioningArtifactOutput, error) { + req, out := c.DeleteProvisioningArtifactRequest(input) + return out, req.Send() +} + +// DeleteProvisioningArtifactWithContext is the same as DeleteProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteProvisioningArtifact for details on how to use this API operation. +// +// 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 *ServiceCatalog) DeleteProvisioningArtifactWithContext(ctx aws.Context, input *DeleteProvisioningArtifactInput, opts ...request.Option) (*DeleteProvisioningArtifactOutput, error) { + req, out := c.DeleteProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeConstraint = "DescribeConstraint" + +// DescribeConstraintRequest generates a "aws/request.Request" representing the +// client's request for the DescribeConstraint operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeConstraint for more information on using the DescribeConstraint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeConstraintRequest method. +// req, resp := client.DescribeConstraintRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeConstraint +func (c *ServiceCatalog) DescribeConstraintRequest(input *DescribeConstraintInput) (req *request.Request, output *DescribeConstraintOutput) { + op := &request.Operation{ + Name: opDescribeConstraint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeConstraintInput{} + } + + output = &DescribeConstraintOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeConstraint API operation for AWS Service Catalog. +// +// Retrieves detailed information for a specified constraint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeConstraint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeConstraint +func (c *ServiceCatalog) DescribeConstraint(input *DescribeConstraintInput) (*DescribeConstraintOutput, error) { + req, out := c.DescribeConstraintRequest(input) + return out, req.Send() +} + +// DescribeConstraintWithContext is the same as DescribeConstraint with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeConstraint for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeConstraintWithContext(ctx aws.Context, input *DescribeConstraintInput, opts ...request.Option) (*DescribeConstraintOutput, error) { + req, out := c.DescribeConstraintRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCopyProductStatus = "DescribeCopyProductStatus" + +// DescribeCopyProductStatusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCopyProductStatus operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCopyProductStatus for more information on using the DescribeCopyProductStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCopyProductStatusRequest method. +// req, resp := client.DescribeCopyProductStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeCopyProductStatus +func (c *ServiceCatalog) DescribeCopyProductStatusRequest(input *DescribeCopyProductStatusInput) (req *request.Request, output *DescribeCopyProductStatusOutput) { + op := &request.Operation{ + Name: opDescribeCopyProductStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCopyProductStatusInput{} + } + + output = &DescribeCopyProductStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCopyProductStatus API operation for AWS Service Catalog. +// +// Describes the status of the specified copy product operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeCopyProductStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeCopyProductStatus +func (c *ServiceCatalog) DescribeCopyProductStatus(input *DescribeCopyProductStatusInput) (*DescribeCopyProductStatusOutput, error) { + req, out := c.DescribeCopyProductStatusRequest(input) + return out, req.Send() +} + +// DescribeCopyProductStatusWithContext is the same as DescribeCopyProductStatus with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCopyProductStatus for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeCopyProductStatusWithContext(ctx aws.Context, input *DescribeCopyProductStatusInput, opts ...request.Option) (*DescribeCopyProductStatusOutput, error) { + req, out := c.DescribeCopyProductStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribePortfolio = "DescribePortfolio" + +// DescribePortfolioRequest generates a "aws/request.Request" representing the +// client's request for the DescribePortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribePortfolio for more information on using the DescribePortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribePortfolioRequest method. +// req, resp := client.DescribePortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolio +func (c *ServiceCatalog) DescribePortfolioRequest(input *DescribePortfolioInput) (req *request.Request, output *DescribePortfolioOutput) { + op := &request.Operation{ + Name: opDescribePortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePortfolioInput{} + } + + output = &DescribePortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePortfolio API operation for AWS Service Catalog. +// +// Retrieves detailed information and any tags associated with the specified +// portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribePortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolio +func (c *ServiceCatalog) DescribePortfolio(input *DescribePortfolioInput) (*DescribePortfolioOutput, error) { + req, out := c.DescribePortfolioRequest(input) + return out, req.Send() +} + +// DescribePortfolioWithContext is the same as DescribePortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribePortfolioWithContext(ctx aws.Context, input *DescribePortfolioInput, opts ...request.Option) (*DescribePortfolioOutput, error) { + req, out := c.DescribePortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeProduct = "DescribeProduct" + +// DescribeProductRequest generates a "aws/request.Request" representing the +// client's request for the DescribeProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeProduct for more information on using the DescribeProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeProductRequest method. +// req, resp := client.DescribeProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProduct +func (c *ServiceCatalog) DescribeProductRequest(input *DescribeProductInput) (req *request.Request, output *DescribeProductOutput) { + op := &request.Operation{ + Name: opDescribeProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeProductInput{} + } + + output = &DescribeProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeProduct API operation for AWS Service Catalog. +// +// Retrieves information about a specified product. +// +// This operation is functionally identical to DescribeProductView except that +// it takes as input ProductId instead of ProductViewId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProduct +func (c *ServiceCatalog) DescribeProduct(input *DescribeProductInput) (*DescribeProductOutput, error) { + req, out := c.DescribeProductRequest(input) + return out, req.Send() +} + +// DescribeProductWithContext is the same as DescribeProduct with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeProductWithContext(ctx aws.Context, input *DescribeProductInput, opts ...request.Option) (*DescribeProductOutput, error) { + req, out := c.DescribeProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeProductAsAdmin = "DescribeProductAsAdmin" + +// DescribeProductAsAdminRequest generates a "aws/request.Request" representing the +// client's request for the DescribeProductAsAdmin operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeProductAsAdmin for more information on using the DescribeProductAsAdmin +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeProductAsAdminRequest method. +// req, resp := client.DescribeProductAsAdminRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductAsAdmin +func (c *ServiceCatalog) DescribeProductAsAdminRequest(input *DescribeProductAsAdminInput) (req *request.Request, output *DescribeProductAsAdminOutput) { + op := &request.Operation{ + Name: opDescribeProductAsAdmin, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeProductAsAdminInput{} + } + + output = &DescribeProductAsAdminOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeProductAsAdmin API operation for AWS Service Catalog. +// +// Retrieves information about a specified product, run with administrator access. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeProductAsAdmin for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductAsAdmin +func (c *ServiceCatalog) DescribeProductAsAdmin(input *DescribeProductAsAdminInput) (*DescribeProductAsAdminOutput, error) { + req, out := c.DescribeProductAsAdminRequest(input) + return out, req.Send() +} + +// DescribeProductAsAdminWithContext is the same as DescribeProductAsAdmin with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeProductAsAdmin for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeProductAsAdminWithContext(ctx aws.Context, input *DescribeProductAsAdminInput, opts ...request.Option) (*DescribeProductAsAdminOutput, error) { + req, out := c.DescribeProductAsAdminRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeProductView = "DescribeProductView" + +// DescribeProductViewRequest generates a "aws/request.Request" representing the +// client's request for the DescribeProductView operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeProductView for more information on using the DescribeProductView +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeProductViewRequest method. +// req, resp := client.DescribeProductViewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductView +func (c *ServiceCatalog) DescribeProductViewRequest(input *DescribeProductViewInput) (req *request.Request, output *DescribeProductViewOutput) { + op := &request.Operation{ + Name: opDescribeProductView, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeProductViewInput{} + } + + output = &DescribeProductViewOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeProductView API operation for AWS Service Catalog. +// +// Retrieves information about a specified product. +// +// This operation is functionally identical to DescribeProduct except that it +// takes as input ProductViewId instead of ProductId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeProductView for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductView +func (c *ServiceCatalog) DescribeProductView(input *DescribeProductViewInput) (*DescribeProductViewOutput, error) { + req, out := c.DescribeProductViewRequest(input) + return out, req.Send() +} + +// DescribeProductViewWithContext is the same as DescribeProductView with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeProductView for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeProductViewWithContext(ctx aws.Context, input *DescribeProductViewInput, opts ...request.Option) (*DescribeProductViewOutput, error) { + req, out := c.DescribeProductViewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeProvisionedProduct = "DescribeProvisionedProduct" + +// DescribeProvisionedProductRequest generates a "aws/request.Request" representing the +// client's request for the DescribeProvisionedProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeProvisionedProduct for more information on using the DescribeProvisionedProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeProvisionedProductRequest method. +// req, resp := client.DescribeProvisionedProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisionedProduct +func (c *ServiceCatalog) DescribeProvisionedProductRequest(input *DescribeProvisionedProductInput) (req *request.Request, output *DescribeProvisionedProductOutput) { + op := &request.Operation{ + Name: opDescribeProvisionedProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeProvisionedProductInput{} + } + + output = &DescribeProvisionedProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeProvisionedProduct API operation for AWS Service Catalog. +// +// Retrieve detailed information about the provisioned product. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeProvisionedProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisionedProduct +func (c *ServiceCatalog) DescribeProvisionedProduct(input *DescribeProvisionedProductInput) (*DescribeProvisionedProductOutput, error) { + req, out := c.DescribeProvisionedProductRequest(input) + return out, req.Send() +} + +// DescribeProvisionedProductWithContext is the same as DescribeProvisionedProduct with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeProvisionedProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeProvisionedProductWithContext(ctx aws.Context, input *DescribeProvisionedProductInput, opts ...request.Option) (*DescribeProvisionedProductOutput, error) { + req, out := c.DescribeProvisionedProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeProvisioningArtifact = "DescribeProvisioningArtifact" + +// DescribeProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the DescribeProvisioningArtifact operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeProvisioningArtifact for more information on using the DescribeProvisioningArtifact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeProvisioningArtifactRequest method. +// req, resp := client.DescribeProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningArtifact +func (c *ServiceCatalog) DescribeProvisioningArtifactRequest(input *DescribeProvisioningArtifactInput) (req *request.Request, output *DescribeProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opDescribeProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeProvisioningArtifactInput{} + } + + output = &DescribeProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeProvisioningArtifact API operation for AWS Service Catalog. +// +// Retrieves detailed information about the specified provisioning artifact. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningArtifact +func (c *ServiceCatalog) DescribeProvisioningArtifact(input *DescribeProvisioningArtifactInput) (*DescribeProvisioningArtifactOutput, error) { + req, out := c.DescribeProvisioningArtifactRequest(input) + return out, req.Send() +} + +// DescribeProvisioningArtifactWithContext is the same as DescribeProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeProvisioningArtifact for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeProvisioningArtifactWithContext(ctx aws.Context, input *DescribeProvisioningArtifactInput, opts ...request.Option) (*DescribeProvisioningArtifactOutput, error) { + req, out := c.DescribeProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeProvisioningParameters = "DescribeProvisioningParameters" + +// DescribeProvisioningParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeProvisioningParameters operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeProvisioningParameters for more information on using the DescribeProvisioningParameters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeProvisioningParametersRequest method. +// req, resp := client.DescribeProvisioningParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningParameters +func (c *ServiceCatalog) DescribeProvisioningParametersRequest(input *DescribeProvisioningParametersInput) (req *request.Request, output *DescribeProvisioningParametersOutput) { + op := &request.Operation{ + Name: opDescribeProvisioningParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeProvisioningParametersInput{} + } + + output = &DescribeProvisioningParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeProvisioningParameters API operation for AWS Service Catalog. +// +// Provides information about parameters required to provision a specified product +// in a specified manner. Use this operation to obtain the list of ProvisioningArtifactParameters +// parameters available to call the ProvisionProduct operation for the specified +// product. +// +// If the output contains a TagOption key with an empty list of values, there +// is a TagOption conflict for that key. The end user cannot take action to +// fix the conflict, and launch is not blocked. In subsequent calls to the ProvisionProduct +// operation, do not include conflicted TagOption keys as tags. Calls to ProvisionProduct +// with empty TagOption values cause the error "Parameter validation failed: +// Missing required parameter in Tags[N]:Value ". Calls to ProvisionProduct +// with conflicted TagOption keys automatically tag the provisioned product +// with the conflicted keys with the value "sc-tagoption-conflict-portfolioId-productId". +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeProvisioningParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningParameters +func (c *ServiceCatalog) DescribeProvisioningParameters(input *DescribeProvisioningParametersInput) (*DescribeProvisioningParametersOutput, error) { + req, out := c.DescribeProvisioningParametersRequest(input) + return out, req.Send() +} + +// DescribeProvisioningParametersWithContext is the same as DescribeProvisioningParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeProvisioningParameters for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeProvisioningParametersWithContext(ctx aws.Context, input *DescribeProvisioningParametersInput, opts ...request.Option) (*DescribeProvisioningParametersOutput, error) { + req, out := c.DescribeProvisioningParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeRecord = "DescribeRecord" + +// DescribeRecordRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRecord operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeRecord for more information on using the DescribeRecord +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeRecordRequest method. +// req, resp := client.DescribeRecordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeRecord +func (c *ServiceCatalog) DescribeRecordRequest(input *DescribeRecordInput) (req *request.Request, output *DescribeRecordOutput) { + op := &request.Operation{ + Name: opDescribeRecord, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeRecordInput{} + } + + output = &DescribeRecordOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeRecord API operation for AWS Service Catalog. +// +// Retrieves a paginated list of the full details of a specific request. Use +// this operation after calling a request operation (ProvisionProduct, TerminateProvisionedProduct, +// or UpdateProvisionedProduct). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeRecord for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeRecord +func (c *ServiceCatalog) DescribeRecord(input *DescribeRecordInput) (*DescribeRecordOutput, error) { + req, out := c.DescribeRecordRequest(input) + return out, req.Send() +} + +// DescribeRecordWithContext is the same as DescribeRecord with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeRecord for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeRecordWithContext(ctx aws.Context, input *DescribeRecordInput, opts ...request.Option) (*DescribeRecordOutput, error) { + req, out := c.DescribeRecordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTagOption = "DescribeTagOption" + +// DescribeTagOptionRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTagOption operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTagOption for more information on using the DescribeTagOption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTagOptionRequest method. +// req, resp := client.DescribeTagOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeTagOption +func (c *ServiceCatalog) DescribeTagOptionRequest(input *DescribeTagOptionInput) (req *request.Request, output *DescribeTagOptionOutput) { + op := &request.Operation{ + Name: opDescribeTagOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTagOptionInput{} + } + + output = &DescribeTagOptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTagOption API operation for AWS Service Catalog. +// +// Describes a TagOption. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeTagOption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeTagOption +func (c *ServiceCatalog) DescribeTagOption(input *DescribeTagOptionInput) (*DescribeTagOptionOutput, error) { + req, out := c.DescribeTagOptionRequest(input) + return out, req.Send() +} + +// DescribeTagOptionWithContext is the same as DescribeTagOption with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTagOption for details on how to use this API operation. +// +// 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 *ServiceCatalog) DescribeTagOptionWithContext(ctx aws.Context, input *DescribeTagOptionInput, opts ...request.Option) (*DescribeTagOptionOutput, error) { + req, out := c.DescribeTagOptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociatePrincipalFromPortfolio = "DisassociatePrincipalFromPortfolio" + +// DisassociatePrincipalFromPortfolioRequest generates a "aws/request.Request" representing the +// client's request for the DisassociatePrincipalFromPortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociatePrincipalFromPortfolio for more information on using the DisassociatePrincipalFromPortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociatePrincipalFromPortfolioRequest method. +// req, resp := client.DisassociatePrincipalFromPortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociatePrincipalFromPortfolio +func (c *ServiceCatalog) DisassociatePrincipalFromPortfolioRequest(input *DisassociatePrincipalFromPortfolioInput) (req *request.Request, output *DisassociatePrincipalFromPortfolioOutput) { + op := &request.Operation{ + Name: opDisassociatePrincipalFromPortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociatePrincipalFromPortfolioInput{} + } + + output = &DisassociatePrincipalFromPortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociatePrincipalFromPortfolio API operation for AWS Service Catalog. +// +// Disassociates a previously associated principal ARN from a specified portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DisassociatePrincipalFromPortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociatePrincipalFromPortfolio +func (c *ServiceCatalog) DisassociatePrincipalFromPortfolio(input *DisassociatePrincipalFromPortfolioInput) (*DisassociatePrincipalFromPortfolioOutput, error) { + req, out := c.DisassociatePrincipalFromPortfolioRequest(input) + return out, req.Send() +} + +// DisassociatePrincipalFromPortfolioWithContext is the same as DisassociatePrincipalFromPortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociatePrincipalFromPortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) DisassociatePrincipalFromPortfolioWithContext(ctx aws.Context, input *DisassociatePrincipalFromPortfolioInput, opts ...request.Option) (*DisassociatePrincipalFromPortfolioOutput, error) { + req, out := c.DisassociatePrincipalFromPortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateProductFromPortfolio = "DisassociateProductFromPortfolio" + +// DisassociateProductFromPortfolioRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateProductFromPortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateProductFromPortfolio for more information on using the DisassociateProductFromPortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateProductFromPortfolioRequest method. +// req, resp := client.DisassociateProductFromPortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateProductFromPortfolio +func (c *ServiceCatalog) DisassociateProductFromPortfolioRequest(input *DisassociateProductFromPortfolioInput) (req *request.Request, output *DisassociateProductFromPortfolioOutput) { + op := &request.Operation{ + Name: opDisassociateProductFromPortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateProductFromPortfolioInput{} + } + + output = &DisassociateProductFromPortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateProductFromPortfolio API operation for AWS Service Catalog. +// +// Disassociates the specified product from the specified portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DisassociateProductFromPortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation was requested against a resource that is currently in use. +// Free the resource from use and retry the operation. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateProductFromPortfolio +func (c *ServiceCatalog) DisassociateProductFromPortfolio(input *DisassociateProductFromPortfolioInput) (*DisassociateProductFromPortfolioOutput, error) { + req, out := c.DisassociateProductFromPortfolioRequest(input) + return out, req.Send() +} + +// DisassociateProductFromPortfolioWithContext is the same as DisassociateProductFromPortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateProductFromPortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) DisassociateProductFromPortfolioWithContext(ctx aws.Context, input *DisassociateProductFromPortfolioInput, opts ...request.Option) (*DisassociateProductFromPortfolioOutput, error) { + req, out := c.DisassociateProductFromPortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateTagOptionFromResource = "DisassociateTagOptionFromResource" + +// DisassociateTagOptionFromResourceRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateTagOptionFromResource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateTagOptionFromResource for more information on using the DisassociateTagOptionFromResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateTagOptionFromResourceRequest method. +// req, resp := client.DisassociateTagOptionFromResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateTagOptionFromResource +func (c *ServiceCatalog) DisassociateTagOptionFromResourceRequest(input *DisassociateTagOptionFromResourceInput) (req *request.Request, output *DisassociateTagOptionFromResourceOutput) { + op := &request.Operation{ + Name: opDisassociateTagOptionFromResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateTagOptionFromResourceInput{} + } + + output = &DisassociateTagOptionFromResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateTagOptionFromResource API operation for AWS Service Catalog. +// +// Disassociates a TagOption from a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DisassociateTagOptionFromResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateTagOptionFromResource +func (c *ServiceCatalog) DisassociateTagOptionFromResource(input *DisassociateTagOptionFromResourceInput) (*DisassociateTagOptionFromResourceOutput, error) { + req, out := c.DisassociateTagOptionFromResourceRequest(input) + return out, req.Send() +} + +// DisassociateTagOptionFromResourceWithContext is the same as DisassociateTagOptionFromResource with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateTagOptionFromResource for details on how to use this API operation. +// +// 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 *ServiceCatalog) DisassociateTagOptionFromResourceWithContext(ctx aws.Context, input *DisassociateTagOptionFromResourceInput, opts ...request.Option) (*DisassociateTagOptionFromResourceOutput, error) { + req, out := c.DisassociateTagOptionFromResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListAcceptedPortfolioShares = "ListAcceptedPortfolioShares" + +// ListAcceptedPortfolioSharesRequest generates a "aws/request.Request" representing the +// client's request for the ListAcceptedPortfolioShares operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListAcceptedPortfolioShares for more information on using the ListAcceptedPortfolioShares +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListAcceptedPortfolioSharesRequest method. +// req, resp := client.ListAcceptedPortfolioSharesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListAcceptedPortfolioShares +func (c *ServiceCatalog) ListAcceptedPortfolioSharesRequest(input *ListAcceptedPortfolioSharesInput) (req *request.Request, output *ListAcceptedPortfolioSharesOutput) { + op := &request.Operation{ + Name: opListAcceptedPortfolioShares, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListAcceptedPortfolioSharesInput{} + } + + output = &ListAcceptedPortfolioSharesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAcceptedPortfolioShares API operation for AWS Service Catalog. +// +// Lists details of all portfolios for which sharing was accepted by this account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListAcceptedPortfolioShares for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListAcceptedPortfolioShares +func (c *ServiceCatalog) ListAcceptedPortfolioShares(input *ListAcceptedPortfolioSharesInput) (*ListAcceptedPortfolioSharesOutput, error) { + req, out := c.ListAcceptedPortfolioSharesRequest(input) + return out, req.Send() +} + +// ListAcceptedPortfolioSharesWithContext is the same as ListAcceptedPortfolioShares with the addition of +// the ability to pass a context and additional request options. +// +// See ListAcceptedPortfolioShares for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListAcceptedPortfolioSharesWithContext(ctx aws.Context, input *ListAcceptedPortfolioSharesInput, opts ...request.Option) (*ListAcceptedPortfolioSharesOutput, error) { + req, out := c.ListAcceptedPortfolioSharesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListAcceptedPortfolioSharesPages iterates over the pages of a ListAcceptedPortfolioShares operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListAcceptedPortfolioShares method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListAcceptedPortfolioShares operation. +// pageNum := 0 +// err := client.ListAcceptedPortfolioSharesPages(params, +// func(page *ListAcceptedPortfolioSharesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListAcceptedPortfolioSharesPages(input *ListAcceptedPortfolioSharesInput, fn func(*ListAcceptedPortfolioSharesOutput, bool) bool) error { + return c.ListAcceptedPortfolioSharesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListAcceptedPortfolioSharesPagesWithContext same as ListAcceptedPortfolioSharesPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) ListAcceptedPortfolioSharesPagesWithContext(ctx aws.Context, input *ListAcceptedPortfolioSharesInput, fn func(*ListAcceptedPortfolioSharesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListAcceptedPortfolioSharesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListAcceptedPortfolioSharesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListAcceptedPortfolioSharesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListConstraintsForPortfolio = "ListConstraintsForPortfolio" + +// ListConstraintsForPortfolioRequest generates a "aws/request.Request" representing the +// client's request for the ListConstraintsForPortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListConstraintsForPortfolio for more information on using the ListConstraintsForPortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListConstraintsForPortfolioRequest method. +// req, resp := client.ListConstraintsForPortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListConstraintsForPortfolio +func (c *ServiceCatalog) ListConstraintsForPortfolioRequest(input *ListConstraintsForPortfolioInput) (req *request.Request, output *ListConstraintsForPortfolioOutput) { + op := &request.Operation{ + Name: opListConstraintsForPortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListConstraintsForPortfolioInput{} + } + + output = &ListConstraintsForPortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListConstraintsForPortfolio API operation for AWS Service Catalog. +// +// Retrieves detailed constraint information for the specified portfolio and +// product. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListConstraintsForPortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListConstraintsForPortfolio +func (c *ServiceCatalog) ListConstraintsForPortfolio(input *ListConstraintsForPortfolioInput) (*ListConstraintsForPortfolioOutput, error) { + req, out := c.ListConstraintsForPortfolioRequest(input) + return out, req.Send() +} + +// ListConstraintsForPortfolioWithContext is the same as ListConstraintsForPortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See ListConstraintsForPortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListConstraintsForPortfolioWithContext(ctx aws.Context, input *ListConstraintsForPortfolioInput, opts ...request.Option) (*ListConstraintsForPortfolioOutput, error) { + req, out := c.ListConstraintsForPortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListConstraintsForPortfolioPages iterates over the pages of a ListConstraintsForPortfolio operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListConstraintsForPortfolio method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListConstraintsForPortfolio operation. +// pageNum := 0 +// err := client.ListConstraintsForPortfolioPages(params, +// func(page *ListConstraintsForPortfolioOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListConstraintsForPortfolioPages(input *ListConstraintsForPortfolioInput, fn func(*ListConstraintsForPortfolioOutput, bool) bool) error { + return c.ListConstraintsForPortfolioPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListConstraintsForPortfolioPagesWithContext same as ListConstraintsForPortfolioPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) ListConstraintsForPortfolioPagesWithContext(ctx aws.Context, input *ListConstraintsForPortfolioInput, fn func(*ListConstraintsForPortfolioOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListConstraintsForPortfolioInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListConstraintsForPortfolioRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListConstraintsForPortfolioOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListLaunchPaths = "ListLaunchPaths" + +// ListLaunchPathsRequest generates a "aws/request.Request" representing the +// client's request for the ListLaunchPaths operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLaunchPaths for more information on using the ListLaunchPaths +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLaunchPathsRequest method. +// req, resp := client.ListLaunchPathsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListLaunchPaths +func (c *ServiceCatalog) ListLaunchPathsRequest(input *ListLaunchPathsInput) (req *request.Request, output *ListLaunchPathsOutput) { + op := &request.Operation{ + Name: opListLaunchPaths, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListLaunchPathsInput{} + } + + output = &ListLaunchPathsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLaunchPaths API operation for AWS Service Catalog. +// +// Returns a paginated list of all paths to a specified product. A path is how +// the user has access to a specified product, and is necessary when provisioning +// a product. A path also determines the constraints put on the product. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListLaunchPaths for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListLaunchPaths +func (c *ServiceCatalog) ListLaunchPaths(input *ListLaunchPathsInput) (*ListLaunchPathsOutput, error) { + req, out := c.ListLaunchPathsRequest(input) + return out, req.Send() +} + +// ListLaunchPathsWithContext is the same as ListLaunchPaths with the addition of +// the ability to pass a context and additional request options. +// +// See ListLaunchPaths for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListLaunchPathsWithContext(ctx aws.Context, input *ListLaunchPathsInput, opts ...request.Option) (*ListLaunchPathsOutput, error) { + req, out := c.ListLaunchPathsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListLaunchPathsPages iterates over the pages of a ListLaunchPaths operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListLaunchPaths method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListLaunchPaths operation. +// pageNum := 0 +// err := client.ListLaunchPathsPages(params, +// func(page *ListLaunchPathsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListLaunchPathsPages(input *ListLaunchPathsInput, fn func(*ListLaunchPathsOutput, bool) bool) error { + return c.ListLaunchPathsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListLaunchPathsPagesWithContext same as ListLaunchPathsPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) ListLaunchPathsPagesWithContext(ctx aws.Context, input *ListLaunchPathsInput, fn func(*ListLaunchPathsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListLaunchPathsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListLaunchPathsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListLaunchPathsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListPortfolioAccess = "ListPortfolioAccess" + +// ListPortfolioAccessRequest generates a "aws/request.Request" representing the +// client's request for the ListPortfolioAccess operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPortfolioAccess for more information on using the ListPortfolioAccess +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPortfolioAccessRequest method. +// req, resp := client.ListPortfolioAccessRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolioAccess +func (c *ServiceCatalog) ListPortfolioAccessRequest(input *ListPortfolioAccessInput) (req *request.Request, output *ListPortfolioAccessOutput) { + op := &request.Operation{ + Name: opListPortfolioAccess, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListPortfolioAccessInput{} + } + + output = &ListPortfolioAccessOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPortfolioAccess API operation for AWS Service Catalog. +// +// Lists the account IDs that have been authorized sharing of the specified +// portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListPortfolioAccess for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolioAccess +func (c *ServiceCatalog) ListPortfolioAccess(input *ListPortfolioAccessInput) (*ListPortfolioAccessOutput, error) { + req, out := c.ListPortfolioAccessRequest(input) + return out, req.Send() +} + +// ListPortfolioAccessWithContext is the same as ListPortfolioAccess with the addition of +// the ability to pass a context and additional request options. +// +// See ListPortfolioAccess for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListPortfolioAccessWithContext(ctx aws.Context, input *ListPortfolioAccessInput, opts ...request.Option) (*ListPortfolioAccessOutput, error) { + req, out := c.ListPortfolioAccessRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListPortfolios = "ListPortfolios" + +// ListPortfoliosRequest generates a "aws/request.Request" representing the +// client's request for the ListPortfolios operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPortfolios for more information on using the ListPortfolios +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPortfoliosRequest method. +// req, resp := client.ListPortfoliosRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolios +func (c *ServiceCatalog) ListPortfoliosRequest(input *ListPortfoliosInput) (req *request.Request, output *ListPortfoliosOutput) { + op := &request.Operation{ + Name: opListPortfolios, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListPortfoliosInput{} + } + + output = &ListPortfoliosOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPortfolios API operation for AWS Service Catalog. +// +// Lists all portfolios in the catalog. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListPortfolios for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolios +func (c *ServiceCatalog) ListPortfolios(input *ListPortfoliosInput) (*ListPortfoliosOutput, error) { + req, out := c.ListPortfoliosRequest(input) + return out, req.Send() +} + +// ListPortfoliosWithContext is the same as ListPortfolios with the addition of +// the ability to pass a context and additional request options. +// +// See ListPortfolios for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListPortfoliosWithContext(ctx aws.Context, input *ListPortfoliosInput, opts ...request.Option) (*ListPortfoliosOutput, error) { + req, out := c.ListPortfoliosRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListPortfoliosPages iterates over the pages of a ListPortfolios operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPortfolios method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListPortfolios operation. +// pageNum := 0 +// err := client.ListPortfoliosPages(params, +// func(page *ListPortfoliosOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListPortfoliosPages(input *ListPortfoliosInput, fn func(*ListPortfoliosOutput, bool) bool) error { + return c.ListPortfoliosPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPortfoliosPagesWithContext same as ListPortfoliosPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) ListPortfoliosPagesWithContext(ctx aws.Context, input *ListPortfoliosInput, fn func(*ListPortfoliosOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPortfoliosInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPortfoliosRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListPortfoliosOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListPortfoliosForProduct = "ListPortfoliosForProduct" + +// ListPortfoliosForProductRequest generates a "aws/request.Request" representing the +// client's request for the ListPortfoliosForProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPortfoliosForProduct for more information on using the ListPortfoliosForProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPortfoliosForProductRequest method. +// req, resp := client.ListPortfoliosForProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfoliosForProduct +func (c *ServiceCatalog) ListPortfoliosForProductRequest(input *ListPortfoliosForProductInput) (req *request.Request, output *ListPortfoliosForProductOutput) { + op := &request.Operation{ + Name: opListPortfoliosForProduct, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListPortfoliosForProductInput{} + } + + output = &ListPortfoliosForProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPortfoliosForProduct API operation for AWS Service Catalog. +// +// Lists all portfolios that the specified product is associated with. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListPortfoliosForProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfoliosForProduct +func (c *ServiceCatalog) ListPortfoliosForProduct(input *ListPortfoliosForProductInput) (*ListPortfoliosForProductOutput, error) { + req, out := c.ListPortfoliosForProductRequest(input) + return out, req.Send() +} + +// ListPortfoliosForProductWithContext is the same as ListPortfoliosForProduct with the addition of +// the ability to pass a context and additional request options. +// +// See ListPortfoliosForProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListPortfoliosForProductWithContext(ctx aws.Context, input *ListPortfoliosForProductInput, opts ...request.Option) (*ListPortfoliosForProductOutput, error) { + req, out := c.ListPortfoliosForProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListPortfoliosForProductPages iterates over the pages of a ListPortfoliosForProduct operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPortfoliosForProduct method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListPortfoliosForProduct operation. +// pageNum := 0 +// err := client.ListPortfoliosForProductPages(params, +// func(page *ListPortfoliosForProductOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListPortfoliosForProductPages(input *ListPortfoliosForProductInput, fn func(*ListPortfoliosForProductOutput, bool) bool) error { + return c.ListPortfoliosForProductPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPortfoliosForProductPagesWithContext same as ListPortfoliosForProductPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) ListPortfoliosForProductPagesWithContext(ctx aws.Context, input *ListPortfoliosForProductInput, fn func(*ListPortfoliosForProductOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPortfoliosForProductInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPortfoliosForProductRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListPortfoliosForProductOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListPrincipalsForPortfolio = "ListPrincipalsForPortfolio" + +// ListPrincipalsForPortfolioRequest generates a "aws/request.Request" representing the +// client's request for the ListPrincipalsForPortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPrincipalsForPortfolio for more information on using the ListPrincipalsForPortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPrincipalsForPortfolioRequest method. +// req, resp := client.ListPrincipalsForPortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPrincipalsForPortfolio +func (c *ServiceCatalog) ListPrincipalsForPortfolioRequest(input *ListPrincipalsForPortfolioInput) (req *request.Request, output *ListPrincipalsForPortfolioOutput) { + op := &request.Operation{ + Name: opListPrincipalsForPortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListPrincipalsForPortfolioInput{} + } + + output = &ListPrincipalsForPortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPrincipalsForPortfolio API operation for AWS Service Catalog. +// +// Lists all principal ARNs associated with the specified portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListPrincipalsForPortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPrincipalsForPortfolio +func (c *ServiceCatalog) ListPrincipalsForPortfolio(input *ListPrincipalsForPortfolioInput) (*ListPrincipalsForPortfolioOutput, error) { + req, out := c.ListPrincipalsForPortfolioRequest(input) + return out, req.Send() +} + +// ListPrincipalsForPortfolioWithContext is the same as ListPrincipalsForPortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See ListPrincipalsForPortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListPrincipalsForPortfolioWithContext(ctx aws.Context, input *ListPrincipalsForPortfolioInput, opts ...request.Option) (*ListPrincipalsForPortfolioOutput, error) { + req, out := c.ListPrincipalsForPortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListPrincipalsForPortfolioPages iterates over the pages of a ListPrincipalsForPortfolio operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPrincipalsForPortfolio method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListPrincipalsForPortfolio operation. +// pageNum := 0 +// err := client.ListPrincipalsForPortfolioPages(params, +// func(page *ListPrincipalsForPortfolioOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListPrincipalsForPortfolioPages(input *ListPrincipalsForPortfolioInput, fn func(*ListPrincipalsForPortfolioOutput, bool) bool) error { + return c.ListPrincipalsForPortfolioPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPrincipalsForPortfolioPagesWithContext same as ListPrincipalsForPortfolioPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) ListPrincipalsForPortfolioPagesWithContext(ctx aws.Context, input *ListPrincipalsForPortfolioInput, fn func(*ListPrincipalsForPortfolioOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPrincipalsForPortfolioInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPrincipalsForPortfolioRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListPrincipalsForPortfolioOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListProvisioningArtifacts = "ListProvisioningArtifacts" + +// ListProvisioningArtifactsRequest generates a "aws/request.Request" representing the +// client's request for the ListProvisioningArtifacts operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListProvisioningArtifacts for more information on using the ListProvisioningArtifacts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListProvisioningArtifactsRequest method. +// req, resp := client.ListProvisioningArtifactsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifacts +func (c *ServiceCatalog) ListProvisioningArtifactsRequest(input *ListProvisioningArtifactsInput) (req *request.Request, output *ListProvisioningArtifactsOutput) { + op := &request.Operation{ + Name: opListProvisioningArtifacts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListProvisioningArtifactsInput{} + } + + output = &ListProvisioningArtifactsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListProvisioningArtifacts API operation for AWS Service Catalog. +// +// Lists all provisioning artifacts associated with the specified product. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListProvisioningArtifacts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifacts +func (c *ServiceCatalog) ListProvisioningArtifacts(input *ListProvisioningArtifactsInput) (*ListProvisioningArtifactsOutput, error) { + req, out := c.ListProvisioningArtifactsRequest(input) + return out, req.Send() +} + +// ListProvisioningArtifactsWithContext is the same as ListProvisioningArtifacts with the addition of +// the ability to pass a context and additional request options. +// +// See ListProvisioningArtifacts for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListProvisioningArtifactsWithContext(ctx aws.Context, input *ListProvisioningArtifactsInput, opts ...request.Option) (*ListProvisioningArtifactsOutput, error) { + req, out := c.ListProvisioningArtifactsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListRecordHistory = "ListRecordHistory" + +// ListRecordHistoryRequest generates a "aws/request.Request" representing the +// client's request for the ListRecordHistory operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRecordHistory for more information on using the ListRecordHistory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRecordHistoryRequest method. +// req, resp := client.ListRecordHistoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListRecordHistory +func (c *ServiceCatalog) ListRecordHistoryRequest(input *ListRecordHistoryInput) (req *request.Request, output *ListRecordHistoryOutput) { + op := &request.Operation{ + Name: opListRecordHistory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListRecordHistoryInput{} + } + + output = &ListRecordHistoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRecordHistory API operation for AWS Service Catalog. +// +// Returns a paginated list of all performed requests, in the form of RecordDetails +// objects that are filtered as specified. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListRecordHistory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListRecordHistory +func (c *ServiceCatalog) ListRecordHistory(input *ListRecordHistoryInput) (*ListRecordHistoryOutput, error) { + req, out := c.ListRecordHistoryRequest(input) + return out, req.Send() +} + +// ListRecordHistoryWithContext is the same as ListRecordHistory with the addition of +// the ability to pass a context and additional request options. +// +// See ListRecordHistory for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListRecordHistoryWithContext(ctx aws.Context, input *ListRecordHistoryInput, opts ...request.Option) (*ListRecordHistoryOutput, error) { + req, out := c.ListRecordHistoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListResourcesForTagOption = "ListResourcesForTagOption" + +// ListResourcesForTagOptionRequest generates a "aws/request.Request" representing the +// client's request for the ListResourcesForTagOption operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResourcesForTagOption for more information on using the ListResourcesForTagOption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResourcesForTagOptionRequest method. +// req, resp := client.ListResourcesForTagOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListResourcesForTagOption +func (c *ServiceCatalog) ListResourcesForTagOptionRequest(input *ListResourcesForTagOptionInput) (req *request.Request, output *ListResourcesForTagOptionOutput) { + op := &request.Operation{ + Name: opListResourcesForTagOption, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"PageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListResourcesForTagOptionInput{} + } + + output = &ListResourcesForTagOptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResourcesForTagOption API operation for AWS Service Catalog. +// +// Lists resources associated with a TagOption. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListResourcesForTagOption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListResourcesForTagOption +func (c *ServiceCatalog) ListResourcesForTagOption(input *ListResourcesForTagOptionInput) (*ListResourcesForTagOptionOutput, error) { + req, out := c.ListResourcesForTagOptionRequest(input) + return out, req.Send() +} + +// ListResourcesForTagOptionWithContext is the same as ListResourcesForTagOption with the addition of +// the ability to pass a context and additional request options. +// +// See ListResourcesForTagOption for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListResourcesForTagOptionWithContext(ctx aws.Context, input *ListResourcesForTagOptionInput, opts ...request.Option) (*ListResourcesForTagOptionOutput, error) { + req, out := c.ListResourcesForTagOptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListResourcesForTagOptionPages iterates over the pages of a ListResourcesForTagOption operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListResourcesForTagOption method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListResourcesForTagOption operation. +// pageNum := 0 +// err := client.ListResourcesForTagOptionPages(params, +// func(page *ListResourcesForTagOptionOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListResourcesForTagOptionPages(input *ListResourcesForTagOptionInput, fn func(*ListResourcesForTagOptionOutput, bool) bool) error { + return c.ListResourcesForTagOptionPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListResourcesForTagOptionPagesWithContext same as ListResourcesForTagOptionPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) ListResourcesForTagOptionPagesWithContext(ctx aws.Context, input *ListResourcesForTagOptionInput, fn func(*ListResourcesForTagOptionOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListResourcesForTagOptionInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListResourcesForTagOptionRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListResourcesForTagOptionOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTagOptions = "ListTagOptions" + +// ListTagOptionsRequest generates a "aws/request.Request" representing the +// client's request for the ListTagOptions operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagOptions for more information on using the ListTagOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagOptionsRequest method. +// req, resp := client.ListTagOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions +func (c *ServiceCatalog) ListTagOptionsRequest(input *ListTagOptionsInput) (req *request.Request, output *ListTagOptionsOutput) { + op := &request.Operation{ + Name: opListTagOptions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"PageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTagOptionsInput{} + } + + output = &ListTagOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagOptions API operation for AWS Service Catalog. +// +// Lists detailed TagOptions information. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListTagOptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions +func (c *ServiceCatalog) ListTagOptions(input *ListTagOptionsInput) (*ListTagOptionsOutput, error) { + req, out := c.ListTagOptionsRequest(input) + return out, req.Send() +} + +// ListTagOptionsWithContext is the same as ListTagOptions with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagOptions for details on how to use this API operation. +// +// 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 *ServiceCatalog) ListTagOptionsWithContext(ctx aws.Context, input *ListTagOptionsInput, opts ...request.Option) (*ListTagOptionsOutput, error) { + req, out := c.ListTagOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTagOptionsPages iterates over the pages of a ListTagOptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTagOptions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTagOptions operation. +// pageNum := 0 +// err := client.ListTagOptionsPages(params, +// func(page *ListTagOptionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListTagOptionsPages(input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool) error { + return c.ListTagOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTagOptionsPagesWithContext same as ListTagOptionsPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) ListTagOptionsPagesWithContext(ctx aws.Context, input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTagOptionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTagOptionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTagOptionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opProvisionProduct = "ProvisionProduct" + +// ProvisionProductRequest generates a "aws/request.Request" representing the +// client's request for the ProvisionProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ProvisionProduct for more information on using the ProvisionProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ProvisionProductRequest method. +// req, resp := client.ProvisionProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProduct +func (c *ServiceCatalog) ProvisionProductRequest(input *ProvisionProductInput) (req *request.Request, output *ProvisionProductOutput) { + op := &request.Operation{ + Name: opProvisionProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ProvisionProductInput{} + } + + output = &ProvisionProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// ProvisionProduct API operation for AWS Service Catalog. +// +// Requests a provision of a specified product. A provisioned product is a resourced +// instance for a product. For example, provisioning a CloudFormation-template-backed +// product results in launching a CloudFormation stack and all the underlying +// resources that come with it. +// +// You can check the status of this request using the DescribeRecord operation. +// The error "Parameter validation failed: Missing required parameter in Tags[N]:Value" +// indicates that your request contains a tag which has a tag key but no corresponding +// tag value (value is empty or null). Your call may have included values returned +// from a DescribeProvisioningParameters call that resulted in a TagOption key +// with an empty list. This happens when TagOption keys are in conflict. For +// more information, see DescribeProvisioningParameters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ProvisionProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProduct +func (c *ServiceCatalog) ProvisionProduct(input *ProvisionProductInput) (*ProvisionProductOutput, error) { + req, out := c.ProvisionProductRequest(input) + return out, req.Send() +} + +// ProvisionProductWithContext is the same as ProvisionProduct with the addition of +// the ability to pass a context and additional request options. +// +// See ProvisionProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) ProvisionProductWithContext(ctx aws.Context, input *ProvisionProductInput, opts ...request.Option) (*ProvisionProductOutput, error) { + req, out := c.ProvisionProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRejectPortfolioShare = "RejectPortfolioShare" + +// RejectPortfolioShareRequest generates a "aws/request.Request" representing the +// client's request for the RejectPortfolioShare operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RejectPortfolioShare for more information on using the RejectPortfolioShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RejectPortfolioShareRequest method. +// req, resp := client.RejectPortfolioShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RejectPortfolioShare +func (c *ServiceCatalog) RejectPortfolioShareRequest(input *RejectPortfolioShareInput) (req *request.Request, output *RejectPortfolioShareOutput) { + op := &request.Operation{ + Name: opRejectPortfolioShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RejectPortfolioShareInput{} + } + + output = &RejectPortfolioShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// RejectPortfolioShare API operation for AWS Service Catalog. +// +// Rejects an offer to share a portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation RejectPortfolioShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RejectPortfolioShare +func (c *ServiceCatalog) RejectPortfolioShare(input *RejectPortfolioShareInput) (*RejectPortfolioShareOutput, error) { + req, out := c.RejectPortfolioShareRequest(input) + return out, req.Send() +} + +// RejectPortfolioShareWithContext is the same as RejectPortfolioShare with the addition of +// the ability to pass a context and additional request options. +// +// See RejectPortfolioShare for details on how to use this API operation. +// +// 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 *ServiceCatalog) RejectPortfolioShareWithContext(ctx aws.Context, input *RejectPortfolioShareInput, opts ...request.Option) (*RejectPortfolioShareOutput, error) { + req, out := c.RejectPortfolioShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opScanProvisionedProducts = "ScanProvisionedProducts" + +// ScanProvisionedProductsRequest generates a "aws/request.Request" representing the +// client's request for the ScanProvisionedProducts operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ScanProvisionedProducts for more information on using the ScanProvisionedProducts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ScanProvisionedProductsRequest method. +// req, resp := client.ScanProvisionedProductsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ScanProvisionedProducts +func (c *ServiceCatalog) ScanProvisionedProductsRequest(input *ScanProvisionedProductsInput) (req *request.Request, output *ScanProvisionedProductsOutput) { + op := &request.Operation{ + Name: opScanProvisionedProducts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ScanProvisionedProductsInput{} + } + + output = &ScanProvisionedProductsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ScanProvisionedProducts API operation for AWS Service Catalog. +// +// Returns a paginated list of all the ProvisionedProduct objects that are currently +// available (not terminated). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ScanProvisionedProducts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ScanProvisionedProducts +func (c *ServiceCatalog) ScanProvisionedProducts(input *ScanProvisionedProductsInput) (*ScanProvisionedProductsOutput, error) { + req, out := c.ScanProvisionedProductsRequest(input) + return out, req.Send() +} + +// ScanProvisionedProductsWithContext is the same as ScanProvisionedProducts with the addition of +// the ability to pass a context and additional request options. +// +// See ScanProvisionedProducts for details on how to use this API operation. +// +// 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 *ServiceCatalog) ScanProvisionedProductsWithContext(ctx aws.Context, input *ScanProvisionedProductsInput, opts ...request.Option) (*ScanProvisionedProductsOutput, error) { + req, out := c.ScanProvisionedProductsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSearchProducts = "SearchProducts" + +// SearchProductsRequest generates a "aws/request.Request" representing the +// client's request for the SearchProducts operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SearchProducts for more information on using the SearchProducts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SearchProductsRequest method. +// req, resp := client.SearchProductsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProducts +func (c *ServiceCatalog) SearchProductsRequest(input *SearchProductsInput) (req *request.Request, output *SearchProductsOutput) { + op := &request.Operation{ + Name: opSearchProducts, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &SearchProductsInput{} + } + + output = &SearchProductsOutput{} + req = c.newRequest(op, input, output) + return +} + +// SearchProducts API operation for AWS Service Catalog. +// +// Returns a paginated list all of the Products objects to which the caller +// has access. +// +// The output of this operation can be used as input for other operations, such +// as DescribeProductView. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation SearchProducts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProducts +func (c *ServiceCatalog) SearchProducts(input *SearchProductsInput) (*SearchProductsOutput, error) { + req, out := c.SearchProductsRequest(input) + return out, req.Send() +} + +// SearchProductsWithContext is the same as SearchProducts with the addition of +// the ability to pass a context and additional request options. +// +// See SearchProducts for details on how to use this API operation. +// +// 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 *ServiceCatalog) SearchProductsWithContext(ctx aws.Context, input *SearchProductsInput, opts ...request.Option) (*SearchProductsOutput, error) { + req, out := c.SearchProductsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// SearchProductsPages iterates over the pages of a SearchProducts operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See SearchProducts method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a SearchProducts operation. +// pageNum := 0 +// err := client.SearchProductsPages(params, +// func(page *SearchProductsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) SearchProductsPages(input *SearchProductsInput, fn func(*SearchProductsOutput, bool) bool) error { + return c.SearchProductsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// SearchProductsPagesWithContext same as SearchProductsPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) SearchProductsPagesWithContext(ctx aws.Context, input *SearchProductsInput, fn func(*SearchProductsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *SearchProductsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.SearchProductsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*SearchProductsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opSearchProductsAsAdmin = "SearchProductsAsAdmin" + +// SearchProductsAsAdminRequest generates a "aws/request.Request" representing the +// client's request for the SearchProductsAsAdmin operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SearchProductsAsAdmin for more information on using the SearchProductsAsAdmin +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SearchProductsAsAdminRequest method. +// req, resp := client.SearchProductsAsAdminRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProductsAsAdmin +func (c *ServiceCatalog) SearchProductsAsAdminRequest(input *SearchProductsAsAdminInput) (req *request.Request, output *SearchProductsAsAdminOutput) { + op := &request.Operation{ + Name: opSearchProductsAsAdmin, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &SearchProductsAsAdminInput{} + } + + output = &SearchProductsAsAdminOutput{} + req = c.newRequest(op, input, output) + return +} + +// SearchProductsAsAdmin API operation for AWS Service Catalog. +// +// Retrieves summary and status information about all products created within +// the caller's account. If a portfolio ID is provided, this operation retrieves +// information for only those products that are associated with the specified +// portfolio. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation SearchProductsAsAdmin for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProductsAsAdmin +func (c *ServiceCatalog) SearchProductsAsAdmin(input *SearchProductsAsAdminInput) (*SearchProductsAsAdminOutput, error) { + req, out := c.SearchProductsAsAdminRequest(input) + return out, req.Send() +} + +// SearchProductsAsAdminWithContext is the same as SearchProductsAsAdmin with the addition of +// the ability to pass a context and additional request options. +// +// See SearchProductsAsAdmin for details on how to use this API operation. +// +// 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 *ServiceCatalog) SearchProductsAsAdminWithContext(ctx aws.Context, input *SearchProductsAsAdminInput, opts ...request.Option) (*SearchProductsAsAdminOutput, error) { + req, out := c.SearchProductsAsAdminRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// SearchProductsAsAdminPages iterates over the pages of a SearchProductsAsAdmin operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See SearchProductsAsAdmin method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a SearchProductsAsAdmin operation. +// pageNum := 0 +// err := client.SearchProductsAsAdminPages(params, +// func(page *SearchProductsAsAdminOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) SearchProductsAsAdminPages(input *SearchProductsAsAdminInput, fn func(*SearchProductsAsAdminOutput, bool) bool) error { + return c.SearchProductsAsAdminPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// SearchProductsAsAdminPagesWithContext same as SearchProductsAsAdminPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ServiceCatalog) SearchProductsAsAdminPagesWithContext(ctx aws.Context, input *SearchProductsAsAdminInput, fn func(*SearchProductsAsAdminOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *SearchProductsAsAdminInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.SearchProductsAsAdminRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*SearchProductsAsAdminOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opTerminateProvisionedProduct = "TerminateProvisionedProduct" + +// TerminateProvisionedProductRequest generates a "aws/request.Request" representing the +// client's request for the TerminateProvisionedProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TerminateProvisionedProduct for more information on using the TerminateProvisionedProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TerminateProvisionedProductRequest method. +// req, resp := client.TerminateProvisionedProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/TerminateProvisionedProduct +func (c *ServiceCatalog) TerminateProvisionedProductRequest(input *TerminateProvisionedProductInput) (req *request.Request, output *TerminateProvisionedProductOutput) { + op := &request.Operation{ + Name: opTerminateProvisionedProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TerminateProvisionedProductInput{} + } + + output = &TerminateProvisionedProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// TerminateProvisionedProduct API operation for AWS Service Catalog. +// +// Requests termination of an existing ProvisionedProduct object. If there are +// Tags associated with the object, they are terminated when the ProvisionedProduct +// object is terminated. +// +// This operation does not delete any records associated with the ProvisionedProduct +// object. +// +// You can check the status of this request using the DescribeRecord operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation TerminateProvisionedProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/TerminateProvisionedProduct +func (c *ServiceCatalog) TerminateProvisionedProduct(input *TerminateProvisionedProductInput) (*TerminateProvisionedProductOutput, error) { + req, out := c.TerminateProvisionedProductRequest(input) + return out, req.Send() +} + +// TerminateProvisionedProductWithContext is the same as TerminateProvisionedProduct with the addition of +// the ability to pass a context and additional request options. +// +// See TerminateProvisionedProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) TerminateProvisionedProductWithContext(ctx aws.Context, input *TerminateProvisionedProductInput, opts ...request.Option) (*TerminateProvisionedProductOutput, error) { + req, out := c.TerminateProvisionedProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateConstraint = "UpdateConstraint" + +// UpdateConstraintRequest generates a "aws/request.Request" representing the +// client's request for the UpdateConstraint operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateConstraint for more information on using the UpdateConstraint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateConstraintRequest method. +// req, resp := client.UpdateConstraintRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateConstraint +func (c *ServiceCatalog) UpdateConstraintRequest(input *UpdateConstraintInput) (req *request.Request, output *UpdateConstraintOutput) { + op := &request.Operation{ + Name: opUpdateConstraint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateConstraintInput{} + } + + output = &UpdateConstraintOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateConstraint API operation for AWS Service Catalog. +// +// Updates an existing constraint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation UpdateConstraint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateConstraint +func (c *ServiceCatalog) UpdateConstraint(input *UpdateConstraintInput) (*UpdateConstraintOutput, error) { + req, out := c.UpdateConstraintRequest(input) + return out, req.Send() +} + +// UpdateConstraintWithContext is the same as UpdateConstraint with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateConstraint for details on how to use this API operation. +// +// 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 *ServiceCatalog) UpdateConstraintWithContext(ctx aws.Context, input *UpdateConstraintInput, opts ...request.Option) (*UpdateConstraintOutput, error) { + req, out := c.UpdateConstraintRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdatePortfolio = "UpdatePortfolio" + +// UpdatePortfolioRequest generates a "aws/request.Request" representing the +// client's request for the UpdatePortfolio operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdatePortfolio for more information on using the UpdatePortfolio +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdatePortfolioRequest method. +// req, resp := client.UpdatePortfolioRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdatePortfolio +func (c *ServiceCatalog) UpdatePortfolioRequest(input *UpdatePortfolioInput) (req *request.Request, output *UpdatePortfolioOutput) { + op := &request.Operation{ + Name: opUpdatePortfolio, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdatePortfolioInput{} + } + + output = &UpdatePortfolioOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdatePortfolio API operation for AWS Service Catalog. +// +// Updates the specified portfolio's details. This operation does not work with +// a product that has been shared with you. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation UpdatePortfolio for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Reduce the resource use or increase the service limits and retry the operation. +// +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdatePortfolio +func (c *ServiceCatalog) UpdatePortfolio(input *UpdatePortfolioInput) (*UpdatePortfolioOutput, error) { + req, out := c.UpdatePortfolioRequest(input) + return out, req.Send() +} + +// UpdatePortfolioWithContext is the same as UpdatePortfolio with the addition of +// the ability to pass a context and additional request options. +// +// See UpdatePortfolio for details on how to use this API operation. +// +// 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 *ServiceCatalog) UpdatePortfolioWithContext(ctx aws.Context, input *UpdatePortfolioInput, opts ...request.Option) (*UpdatePortfolioOutput, error) { + req, out := c.UpdatePortfolioRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateProduct = "UpdateProduct" + +// UpdateProductRequest generates a "aws/request.Request" representing the +// client's request for the UpdateProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateProduct for more information on using the UpdateProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateProductRequest method. +// req, resp := client.UpdateProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProduct +func (c *ServiceCatalog) UpdateProductRequest(input *UpdateProductInput) (req *request.Request, output *UpdateProductOutput) { + op := &request.Operation{ + Name: opUpdateProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateProductInput{} + } + + output = &UpdateProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateProduct API operation for AWS Service Catalog. +// +// Updates an existing product. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation UpdateProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProduct +func (c *ServiceCatalog) UpdateProduct(input *UpdateProductInput) (*UpdateProductOutput, error) { + req, out := c.UpdateProductRequest(input) + return out, req.Send() +} + +// UpdateProductWithContext is the same as UpdateProduct with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) UpdateProductWithContext(ctx aws.Context, input *UpdateProductInput, opts ...request.Option) (*UpdateProductOutput, error) { + req, out := c.UpdateProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateProvisionedProduct = "UpdateProvisionedProduct" + +// UpdateProvisionedProductRequest generates a "aws/request.Request" representing the +// client's request for the UpdateProvisionedProduct operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateProvisionedProduct for more information on using the UpdateProvisionedProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateProvisionedProductRequest method. +// req, resp := client.UpdateProvisionedProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisionedProduct +func (c *ServiceCatalog) UpdateProvisionedProductRequest(input *UpdateProvisionedProductInput) (req *request.Request, output *UpdateProvisionedProductOutput) { + op := &request.Operation{ + Name: opUpdateProvisionedProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateProvisionedProductInput{} + } + + output = &UpdateProvisionedProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateProvisionedProduct API operation for AWS Service Catalog. +// +// Requests updates to the configuration of an existing ProvisionedProduct object. +// If there are tags associated with the object, they cannot be updated or added +// with this operation. Depending on the specific updates requested, this operation +// may update with no interruption, with some interruption, or replace the ProvisionedProduct +// object entirely. +// +// You can check the status of this request using the DescribeRecord operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation UpdateProvisionedProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisionedProduct +func (c *ServiceCatalog) UpdateProvisionedProduct(input *UpdateProvisionedProductInput) (*UpdateProvisionedProductOutput, error) { + req, out := c.UpdateProvisionedProductRequest(input) + return out, req.Send() +} + +// UpdateProvisionedProductWithContext is the same as UpdateProvisionedProduct with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateProvisionedProduct for details on how to use this API operation. +// +// 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 *ServiceCatalog) UpdateProvisionedProductWithContext(ctx aws.Context, input *UpdateProvisionedProductInput, opts ...request.Option) (*UpdateProvisionedProductOutput, error) { + req, out := c.UpdateProvisionedProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateProvisioningArtifact = "UpdateProvisioningArtifact" + +// UpdateProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the UpdateProvisioningArtifact operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateProvisioningArtifact for more information on using the UpdateProvisioningArtifact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateProvisioningArtifactRequest method. +// req, resp := client.UpdateProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisioningArtifact +func (c *ServiceCatalog) UpdateProvisioningArtifactRequest(input *UpdateProvisioningArtifactInput) (req *request.Request, output *UpdateProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opUpdateProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateProvisioningArtifactInput{} + } + + output = &UpdateProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateProvisioningArtifact API operation for AWS Service Catalog. +// +// Updates an existing provisioning artifact's information. This operation does +// not work on a provisioning artifact associated with a product that has been +// shared with you. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation UpdateProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisioningArtifact +func (c *ServiceCatalog) UpdateProvisioningArtifact(input *UpdateProvisioningArtifactInput) (*UpdateProvisioningArtifactOutput, error) { + req, out := c.UpdateProvisioningArtifactRequest(input) + return out, req.Send() +} + +// UpdateProvisioningArtifactWithContext is the same as UpdateProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateProvisioningArtifact for details on how to use this API operation. +// +// 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 *ServiceCatalog) UpdateProvisioningArtifactWithContext(ctx aws.Context, input *UpdateProvisioningArtifactInput, opts ...request.Option) (*UpdateProvisioningArtifactOutput, error) { + req, out := c.UpdateProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateTagOption = "UpdateTagOption" + +// UpdateTagOptionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTagOption operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTagOption for more information on using the UpdateTagOption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTagOptionRequest method. +// req, resp := client.UpdateTagOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption +func (c *ServiceCatalog) UpdateTagOptionRequest(input *UpdateTagOptionInput) (req *request.Request, output *UpdateTagOptionOutput) { + op := &request.Operation{ + Name: opUpdateTagOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTagOptionInput{} + } + + output = &UpdateTagOptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTagOption API operation for AWS Service Catalog. +// +// Updates an existing TagOption. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation UpdateTagOption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption +func (c *ServiceCatalog) UpdateTagOption(input *UpdateTagOptionInput) (*UpdateTagOptionOutput, error) { + req, out := c.UpdateTagOptionRequest(input) + return out, req.Send() +} + +// UpdateTagOptionWithContext is the same as UpdateTagOption with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTagOption for details on how to use this API operation. +// +// 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 *ServiceCatalog) UpdateTagOptionWithContext(ctx aws.Context, input *UpdateTagOptionInput, opts ...request.Option) (*UpdateTagOptionOutput, error) { + req, out := c.UpdateTagOptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AcceptPortfolioShareInput +type AcceptPortfolioShareInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AcceptPortfolioShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptPortfolioShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcceptPortfolioShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcceptPortfolioShareInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *AcceptPortfolioShareInput) SetAcceptLanguage(v string) *AcceptPortfolioShareInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *AcceptPortfolioShareInput) SetPortfolioId(v string) *AcceptPortfolioShareInput { + s.PortfolioId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AcceptPortfolioShareOutput +type AcceptPortfolioShareOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AcceptPortfolioShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptPortfolioShareOutput) GoString() string { + return s.String() +} + +// The access level to limit results. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AccessLevelFilter +type AccessLevelFilter struct { + _ struct{} `type:"structure"` + + // Specifies the access level. + // + // Account allows results at the account level. + // + // Role allows results based on the federated role of the specified user. + // + // User allows results limited to the specified user. + Key *string `type:"string" enum:"AccessLevelFilterKey"` + + // Specifies the user to which the access level applies. A value of Self is + // currently supported. + Value *string `type:"string"` +} + +// String returns the string representation +func (s AccessLevelFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessLevelFilter) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *AccessLevelFilter) SetKey(v string) *AccessLevelFilter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *AccessLevelFilter) SetValue(v string) *AccessLevelFilter { + s.Value = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociatePrincipalWithPortfolioInput +type AssociatePrincipalWithPortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` + + // The ARN representing the principal (IAM user, role, or group). + // + // PrincipalARN is a required field + PrincipalARN *string `min:"1" type:"string" required:"true"` + + // The principal type. Must be IAM + // + // PrincipalType is a required field + PrincipalType *string `type:"string" required:"true" enum:"PrincipalType"` +} + +// String returns the string representation +func (s AssociatePrincipalWithPortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociatePrincipalWithPortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociatePrincipalWithPortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociatePrincipalWithPortfolioInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + if s.PrincipalARN == nil { + invalidParams.Add(request.NewErrParamRequired("PrincipalARN")) + } + if s.PrincipalARN != nil && len(*s.PrincipalARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PrincipalARN", 1)) + } + if s.PrincipalType == nil { + invalidParams.Add(request.NewErrParamRequired("PrincipalType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *AssociatePrincipalWithPortfolioInput) SetAcceptLanguage(v string) *AssociatePrincipalWithPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *AssociatePrincipalWithPortfolioInput) SetPortfolioId(v string) *AssociatePrincipalWithPortfolioInput { + s.PortfolioId = &v + return s +} + +// SetPrincipalARN sets the PrincipalARN field's value. +func (s *AssociatePrincipalWithPortfolioInput) SetPrincipalARN(v string) *AssociatePrincipalWithPortfolioInput { + s.PrincipalARN = &v + return s +} + +// SetPrincipalType sets the PrincipalType field's value. +func (s *AssociatePrincipalWithPortfolioInput) SetPrincipalType(v string) *AssociatePrincipalWithPortfolioInput { + s.PrincipalType = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociatePrincipalWithPortfolioOutput +type AssociatePrincipalWithPortfolioOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociatePrincipalWithPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociatePrincipalWithPortfolioOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateProductWithPortfolioInput +type AssociateProductWithPortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the source portfolio to use with this association. + SourcePortfolioId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s AssociateProductWithPortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateProductWithPortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateProductWithPortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateProductWithPortfolioInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.SourcePortfolioId != nil && len(*s.SourcePortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourcePortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *AssociateProductWithPortfolioInput) SetAcceptLanguage(v string) *AssociateProductWithPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *AssociateProductWithPortfolioInput) SetPortfolioId(v string) *AssociateProductWithPortfolioInput { + s.PortfolioId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *AssociateProductWithPortfolioInput) SetProductId(v string) *AssociateProductWithPortfolioInput { + s.ProductId = &v + return s +} + +// SetSourcePortfolioId sets the SourcePortfolioId field's value. +func (s *AssociateProductWithPortfolioInput) SetSourcePortfolioId(v string) *AssociateProductWithPortfolioInput { + s.SourcePortfolioId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateProductWithPortfolioOutput +type AssociateProductWithPortfolioOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateProductWithPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateProductWithPortfolioOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateTagOptionWithResourceInput +type AssociateTagOptionWithResourceInput struct { + _ struct{} `type:"structure"` + + // The resource identifier. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // The TagOption identifier. + // + // TagOptionId is a required field + TagOptionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateTagOptionWithResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateTagOptionWithResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateTagOptionWithResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateTagOptionWithResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagOptionId == nil { + invalidParams.Add(request.NewErrParamRequired("TagOptionId")) + } + if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *AssociateTagOptionWithResourceInput) SetResourceId(v string) *AssociateTagOptionWithResourceInput { + s.ResourceId = &v + return s +} + +// SetTagOptionId sets the TagOptionId field's value. +func (s *AssociateTagOptionWithResourceInput) SetTagOptionId(v string) *AssociateTagOptionWithResourceInput { + s.TagOptionId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateTagOptionWithResourceOutput +type AssociateTagOptionWithResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateTagOptionWithResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateTagOptionWithResourceOutput) GoString() string { + return s.String() +} + +// Detailed constraint information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ConstraintDetail +type ConstraintDetail struct { + _ struct{} `type:"structure"` + + // The identifier of the constraint. + ConstraintId *string `min:"1" type:"string"` + + // The text description of the constraint. + Description *string `type:"string"` + + // The owner of the constraint. + Owner *string `type:"string"` + + // The type of the constraint. + Type *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ConstraintDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConstraintDetail) GoString() string { + return s.String() +} + +// SetConstraintId sets the ConstraintId field's value. +func (s *ConstraintDetail) SetConstraintId(v string) *ConstraintDetail { + s.ConstraintId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ConstraintDetail) SetDescription(v string) *ConstraintDetail { + s.Description = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *ConstraintDetail) SetOwner(v string) *ConstraintDetail { + s.Owner = &v + return s +} + +// SetType sets the Type field's value. +func (s *ConstraintDetail) SetType(v string) *ConstraintDetail { + s.Type = &v + return s +} + +// An administrator-specified constraint to apply when provisioning a product. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ConstraintSummary +type ConstraintSummary struct { + _ struct{} `type:"structure"` + + // The text description of the constraint. + Description *string `type:"string"` + + // The type of the constraint. + Type *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ConstraintSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConstraintSummary) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *ConstraintSummary) SetDescription(v string) *ConstraintSummary { + s.Description = &v + return s +} + +// SetType sets the Type field's value. +func (s *ConstraintSummary) SetType(v string) *ConstraintSummary { + s.Type = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CopyProductInput +type CopyProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The copy options. If the value is CopyTags, the tags from the source product + // are copied to the target product. + CopyOptions []*string `type:"list"` + + // A token to disambiguate duplicate requests. You can use the same input in + // multiple requests, provided that you also specify a different idempotency + // token for each request. + // + // IdempotencyToken is a required field + IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + + // The Amazon Resource Name (ARN) of the source product. + // + // SourceProductArn is a required field + SourceProductArn *string `min:"1" type:"string" required:"true"` + + // The IDs of the product versions to copy. By default, all provisioning artifacts + // are copied. + SourceProvisioningArtifactIdentifiers []map[string]*string `type:"list"` + + // The ID of the target product. By default, a new product is created. + TargetProductId *string `min:"1" type:"string"` + + // A name for the target product. The default is the name of the source product. + TargetProductName *string `type:"string"` +} + +// String returns the string representation +func (s CopyProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyProductInput"} + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.SourceProductArn == nil { + invalidParams.Add(request.NewErrParamRequired("SourceProductArn")) + } + if s.SourceProductArn != nil && len(*s.SourceProductArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceProductArn", 1)) + } + if s.TargetProductId != nil && len(*s.TargetProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetProductId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *CopyProductInput) SetAcceptLanguage(v string) *CopyProductInput { + s.AcceptLanguage = &v + return s +} + +// SetCopyOptions sets the CopyOptions field's value. +func (s *CopyProductInput) SetCopyOptions(v []*string) *CopyProductInput { + s.CopyOptions = v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CopyProductInput) SetIdempotencyToken(v string) *CopyProductInput { + s.IdempotencyToken = &v + return s +} + +// SetSourceProductArn sets the SourceProductArn field's value. +func (s *CopyProductInput) SetSourceProductArn(v string) *CopyProductInput { + s.SourceProductArn = &v + return s +} + +// SetSourceProvisioningArtifactIdentifiers sets the SourceProvisioningArtifactIdentifiers field's value. +func (s *CopyProductInput) SetSourceProvisioningArtifactIdentifiers(v []map[string]*string) *CopyProductInput { + s.SourceProvisioningArtifactIdentifiers = v + return s +} + +// SetTargetProductId sets the TargetProductId field's value. +func (s *CopyProductInput) SetTargetProductId(v string) *CopyProductInput { + s.TargetProductId = &v + return s +} + +// SetTargetProductName sets the TargetProductName field's value. +func (s *CopyProductInput) SetTargetProductName(v string) *CopyProductInput { + s.TargetProductName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CopyProductOutput +type CopyProductOutput struct { + _ struct{} `type:"structure"` + + // A unique token to pass to DescribeCopyProductStatus to track the progress + // of the operation. + CopyProductToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CopyProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyProductOutput) GoString() string { + return s.String() +} + +// SetCopyProductToken sets the CopyProductToken field's value. +func (s *CopyProductOutput) SetCopyProductToken(v string) *CopyProductOutput { + s.CopyProductToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateConstraintInput +type CreateConstraintInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The text description of the constraint. + Description *string `type:"string"` + + // A token to disambiguate duplicate requests. You can use the same input in + // multiple requests, provided that you also specify a different idempotency + // token for each request. + // + // IdempotencyToken is a required field + IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + + // The constraint parameters. Expected values vary depending on which Type is + // specified. For more information, see the Examples section. + // + // For Type LAUNCH, the RoleArn property is required. + // + // For Type NOTIFICATION, the NotificationArns property is required. + // + // For Type TEMPLATE, the Rules property is required. + // + // Parameters is a required field + Parameters *string `type:"string" required:"true"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The type of the constraint. Case-sensitive valid values are: LAUNCH, NOTIFICATION, + // or TEMPLATE. + // + // Type is a required field + Type *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateConstraintInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConstraintInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateConstraintInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateConstraintInput"} + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Type != nil && len(*s.Type) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Type", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *CreateConstraintInput) SetAcceptLanguage(v string) *CreateConstraintInput { + s.AcceptLanguage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateConstraintInput) SetDescription(v string) *CreateConstraintInput { + s.Description = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateConstraintInput) SetIdempotencyToken(v string) *CreateConstraintInput { + s.IdempotencyToken = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *CreateConstraintInput) SetParameters(v string) *CreateConstraintInput { + s.Parameters = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *CreateConstraintInput) SetPortfolioId(v string) *CreateConstraintInput { + s.PortfolioId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *CreateConstraintInput) SetProductId(v string) *CreateConstraintInput { + s.ProductId = &v + return s +} + +// SetType sets the Type field's value. +func (s *CreateConstraintInput) SetType(v string) *CreateConstraintInput { + s.Type = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateConstraintOutput +type CreateConstraintOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed constraint information. + ConstraintDetail *ConstraintDetail `type:"structure"` + + // The resulting constraint parameters. + ConstraintParameters *string `type:"string"` + + // The status of the current request. + Status *string `type:"string" enum:"Status"` +} + +// String returns the string representation +func (s CreateConstraintOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConstraintOutput) GoString() string { + return s.String() +} + +// SetConstraintDetail sets the ConstraintDetail field's value. +func (s *CreateConstraintOutput) SetConstraintDetail(v *ConstraintDetail) *CreateConstraintOutput { + s.ConstraintDetail = v + return s +} + +// SetConstraintParameters sets the ConstraintParameters field's value. +func (s *CreateConstraintOutput) SetConstraintParameters(v string) *CreateConstraintOutput { + s.ConstraintParameters = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CreateConstraintOutput) SetStatus(v string) *CreateConstraintOutput { + s.Status = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioInput +type CreatePortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The text description of the portfolio. + Description *string `type:"string"` + + // The name to use for display purposes. + // + // DisplayName is a required field + DisplayName *string `min:"1" type:"string" required:"true"` + + // A token to disambiguate duplicate requests. You can use the same input in + // multiple requests, provided that you also specify a different idempotency + // token for each request. + // + // IdempotencyToken is a required field + IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + + // The name of the portfolio provider. + // + // ProviderName is a required field + ProviderName *string `min:"1" type:"string" required:"true"` + + // Tags to associate with the new portfolio. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreatePortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePortfolioInput"} + if s.DisplayName == nil { + invalidParams.Add(request.NewErrParamRequired("DisplayName")) + } + if s.DisplayName != nil && len(*s.DisplayName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DisplayName", 1)) + } + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.ProviderName == nil { + invalidParams.Add(request.NewErrParamRequired("ProviderName")) + } + if s.ProviderName != nil && len(*s.ProviderName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *CreatePortfolioInput) SetAcceptLanguage(v string) *CreatePortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreatePortfolioInput) SetDescription(v string) *CreatePortfolioInput { + s.Description = &v + return s +} + +// SetDisplayName sets the DisplayName field's value. +func (s *CreatePortfolioInput) SetDisplayName(v string) *CreatePortfolioInput { + s.DisplayName = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreatePortfolioInput) SetIdempotencyToken(v string) *CreatePortfolioInput { + s.IdempotencyToken = &v + return s +} + +// SetProviderName sets the ProviderName field's value. +func (s *CreatePortfolioInput) SetProviderName(v string) *CreatePortfolioInput { + s.ProviderName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreatePortfolioInput) SetTags(v []*Tag) *CreatePortfolioInput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioOutput +type CreatePortfolioOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed portfolio information. + PortfolioDetail *PortfolioDetail `type:"structure"` + + // Tags successfully associated with the new portfolio. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreatePortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePortfolioOutput) GoString() string { + return s.String() +} + +// SetPortfolioDetail sets the PortfolioDetail field's value. +func (s *CreatePortfolioOutput) SetPortfolioDetail(v *PortfolioDetail) *CreatePortfolioOutput { + s.PortfolioDetail = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreatePortfolioOutput) SetTags(v []*Tag) *CreatePortfolioOutput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioShareInput +type CreatePortfolioShareInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The account ID with which to share the portfolio. + // + // AccountId is a required field + AccountId *string `type:"string" required:"true"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreatePortfolioShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePortfolioShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePortfolioShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePortfolioShareInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *CreatePortfolioShareInput) SetAcceptLanguage(v string) *CreatePortfolioShareInput { + s.AcceptLanguage = &v + return s +} + +// SetAccountId sets the AccountId field's value. +func (s *CreatePortfolioShareInput) SetAccountId(v string) *CreatePortfolioShareInput { + s.AccountId = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *CreatePortfolioShareInput) SetPortfolioId(v string) *CreatePortfolioShareInput { + s.PortfolioId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioShareOutput +type CreatePortfolioShareOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreatePortfolioShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePortfolioShareOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProductInput +type CreateProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The text description of the product. + Description *string `type:"string"` + + // The distributor of the product. + Distributor *string `type:"string"` + + // A token to disambiguate duplicate requests. You can use the same input in + // multiple requests, provided that you also specify a different idempotency + // token for each request. + // + // IdempotencyToken is a required field + IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + + // The name of the product. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // The owner of the product. + // + // Owner is a required field + Owner *string `type:"string" required:"true"` + + // The type of the product to create. + // + // ProductType is a required field + ProductType *string `type:"string" required:"true" enum:"ProductType"` + + // Parameters for the provisioning artifact. + // + // ProvisioningArtifactParameters is a required field + ProvisioningArtifactParameters *ProvisioningArtifactProperties `type:"structure" required:"true"` + + // Support information about the product. + SupportDescription *string `type:"string"` + + // Contact email for product support. + SupportEmail *string `type:"string"` + + // Contact URL for product support. + SupportUrl *string `type:"string"` + + // Tags to associate with the new product. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateProductInput"} + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Owner == nil { + invalidParams.Add(request.NewErrParamRequired("Owner")) + } + if s.ProductType == nil { + invalidParams.Add(request.NewErrParamRequired("ProductType")) + } + if s.ProvisioningArtifactParameters == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactParameters")) + } + if s.ProvisioningArtifactParameters != nil { + if err := s.ProvisioningArtifactParameters.Validate(); err != nil { + invalidParams.AddNested("ProvisioningArtifactParameters", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *CreateProductInput) SetAcceptLanguage(v string) *CreateProductInput { + s.AcceptLanguage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateProductInput) SetDescription(v string) *CreateProductInput { + s.Description = &v + return s +} + +// SetDistributor sets the Distributor field's value. +func (s *CreateProductInput) SetDistributor(v string) *CreateProductInput { + s.Distributor = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateProductInput) SetIdempotencyToken(v string) *CreateProductInput { + s.IdempotencyToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateProductInput) SetName(v string) *CreateProductInput { + s.Name = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *CreateProductInput) SetOwner(v string) *CreateProductInput { + s.Owner = &v + return s +} + +// SetProductType sets the ProductType field's value. +func (s *CreateProductInput) SetProductType(v string) *CreateProductInput { + s.ProductType = &v + return s +} + +// SetProvisioningArtifactParameters sets the ProvisioningArtifactParameters field's value. +func (s *CreateProductInput) SetProvisioningArtifactParameters(v *ProvisioningArtifactProperties) *CreateProductInput { + s.ProvisioningArtifactParameters = v + return s +} + +// SetSupportDescription sets the SupportDescription field's value. +func (s *CreateProductInput) SetSupportDescription(v string) *CreateProductInput { + s.SupportDescription = &v + return s +} + +// SetSupportEmail sets the SupportEmail field's value. +func (s *CreateProductInput) SetSupportEmail(v string) *CreateProductInput { + s.SupportEmail = &v + return s +} + +// SetSupportUrl sets the SupportUrl field's value. +func (s *CreateProductInput) SetSupportUrl(v string) *CreateProductInput { + s.SupportUrl = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateProductInput) SetTags(v []*Tag) *CreateProductInput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProductOutput +type CreateProductOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed product view information. + ProductViewDetail *ProductViewDetail `type:"structure"` + + // The resulting detailed provisioning artifact information. + ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` + + // Tags successfully associated with the new product. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateProductOutput) GoString() string { + return s.String() +} + +// SetProductViewDetail sets the ProductViewDetail field's value. +func (s *CreateProductOutput) SetProductViewDetail(v *ProductViewDetail) *CreateProductOutput { + s.ProductViewDetail = v + return s +} + +// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. +func (s *CreateProductOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *CreateProductOutput { + s.ProvisioningArtifactDetail = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateProductOutput) SetTags(v []*Tag) *CreateProductOutput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProvisioningArtifactInput +type CreateProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // A token to disambiguate duplicate requests. You can use the same input in + // multiple requests, provided that you also specify a different idempotency + // token for each request. + // + // IdempotencyToken is a required field + IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + + // The parameters to use when creating the new provisioning artifact. + // + // Parameters is a required field + Parameters *ProvisioningArtifactProperties `type:"structure" required:"true"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateProvisioningArtifactInput"} + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.Parameters != nil { + if err := s.Parameters.Validate(); err != nil { + invalidParams.AddNested("Parameters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *CreateProvisioningArtifactInput) SetAcceptLanguage(v string) *CreateProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateProvisioningArtifactInput) SetIdempotencyToken(v string) *CreateProvisioningArtifactInput { + s.IdempotencyToken = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *CreateProvisioningArtifactInput) SetParameters(v *ProvisioningArtifactProperties) *CreateProvisioningArtifactInput { + s.Parameters = v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *CreateProvisioningArtifactInput) SetProductId(v string) *CreateProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateProvisioningArtifactOutput +type CreateProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` + + // Additional information about the creation request for the provisioning artifact. + Info map[string]*string `min:"1" type:"map"` + + // The resulting detailed provisioning artifact information. + ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` + + // The status of the current request. + Status *string `type:"string" enum:"Status"` +} + +// String returns the string representation +func (s CreateProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateProvisioningArtifactOutput) GoString() string { + return s.String() +} + +// SetInfo sets the Info field's value. +func (s *CreateProvisioningArtifactOutput) SetInfo(v map[string]*string) *CreateProvisioningArtifactOutput { + s.Info = v + return s +} + +// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. +func (s *CreateProvisioningArtifactOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *CreateProvisioningArtifactOutput { + s.ProvisioningArtifactDetail = v + return s +} + +// SetStatus sets the Status field's value. +func (s *CreateProvisioningArtifactOutput) SetStatus(v string) *CreateProvisioningArtifactOutput { + s.Status = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateTagOptionInput +type CreateTagOptionInput struct { + _ struct{} `type:"structure"` + + // The TagOption key. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The TagOption value. + // + // Value is a required field + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateTagOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTagOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTagOptionInput"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *CreateTagOptionInput) SetKey(v string) *CreateTagOptionInput { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *CreateTagOptionInput) SetValue(v string) *CreateTagOptionInput { + s.Value = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateTagOptionOutput +type CreateTagOptionOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed TagOption information. + TagOptionDetail *TagOptionDetail `type:"structure"` +} + +// String returns the string representation +func (s CreateTagOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagOptionOutput) GoString() string { + return s.String() +} + +// SetTagOptionDetail sets the TagOptionDetail field's value. +func (s *CreateTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *CreateTagOptionOutput { + s.TagOptionDetail = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteConstraintInput +type DeleteConstraintInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The identifier of the constraint to delete. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteConstraintInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConstraintInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteConstraintInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteConstraintInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DeleteConstraintInput) SetAcceptLanguage(v string) *DeleteConstraintInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DeleteConstraintInput) SetId(v string) *DeleteConstraintInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteConstraintOutput +type DeleteConstraintOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteConstraintOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConstraintOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioInput +type DeletePortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The identifier of the portfolio for the delete request. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePortfolioInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DeletePortfolioInput) SetAcceptLanguage(v string) *DeletePortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DeletePortfolioInput) SetId(v string) *DeletePortfolioInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioOutput +type DeletePortfolioOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePortfolioOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioShareInput +type DeletePortfolioShareInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The account ID associated with the share to delete. + // + // AccountId is a required field + AccountId *string `type:"string" required:"true"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePortfolioShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePortfolioShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePortfolioShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePortfolioShareInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DeletePortfolioShareInput) SetAcceptLanguage(v string) *DeletePortfolioShareInput { + s.AcceptLanguage = &v + return s +} + +// SetAccountId sets the AccountId field's value. +func (s *DeletePortfolioShareInput) SetAccountId(v string) *DeletePortfolioShareInput { + s.AccountId = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *DeletePortfolioShareInput) SetPortfolioId(v string) *DeletePortfolioShareInput { + s.PortfolioId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioShareOutput +type DeletePortfolioShareOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePortfolioShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePortfolioShareOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProductInput +type DeleteProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The identifier of the product for the delete request. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteProductInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DeleteProductInput) SetAcceptLanguage(v string) *DeleteProductInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DeleteProductInput) SetId(v string) *DeleteProductInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProductOutput +type DeleteProductOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteProductOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProvisioningArtifactInput +type DeleteProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact for the delete request. This + // is sometimes referred to as the product version. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteProvisioningArtifactInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DeleteProvisioningArtifactInput) SetAcceptLanguage(v string) *DeleteProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *DeleteProvisioningArtifactInput) SetProductId(v string) *DeleteProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *DeleteProvisioningArtifactInput) SetProvisioningArtifactId(v string) *DeleteProvisioningArtifactInput { + s.ProvisioningArtifactId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteProvisioningArtifactOutput +type DeleteProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteProvisioningArtifactOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeConstraintInput +type DescribeConstraintInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The identifier of the constraint. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeConstraintInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConstraintInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeConstraintInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeConstraintInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeConstraintInput) SetAcceptLanguage(v string) *DescribeConstraintInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeConstraintInput) SetId(v string) *DescribeConstraintInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeConstraintOutput +type DescribeConstraintOutput struct { + _ struct{} `type:"structure"` + + // Detailed constraint information. + ConstraintDetail *ConstraintDetail `type:"structure"` + + // The current parameters associated with the specified constraint. + ConstraintParameters *string `type:"string"` + + // The status of the current request. + Status *string `type:"string" enum:"Status"` +} + +// String returns the string representation +func (s DescribeConstraintOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConstraintOutput) GoString() string { + return s.String() +} + +// SetConstraintDetail sets the ConstraintDetail field's value. +func (s *DescribeConstraintOutput) SetConstraintDetail(v *ConstraintDetail) *DescribeConstraintOutput { + s.ConstraintDetail = v + return s +} + +// SetConstraintParameters sets the ConstraintParameters field's value. +func (s *DescribeConstraintOutput) SetConstraintParameters(v string) *DescribeConstraintOutput { + s.ConstraintParameters = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeConstraintOutput) SetStatus(v string) *DescribeConstraintOutput { + s.Status = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeCopyProductStatusInput +type DescribeCopyProductStatusInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The token returned from the call to CopyProduct that initiated the operation. + // + // CopyProductToken is a required field + CopyProductToken *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCopyProductStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCopyProductStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCopyProductStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCopyProductStatusInput"} + if s.CopyProductToken == nil { + invalidParams.Add(request.NewErrParamRequired("CopyProductToken")) + } + if s.CopyProductToken != nil && len(*s.CopyProductToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CopyProductToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeCopyProductStatusInput) SetAcceptLanguage(v string) *DescribeCopyProductStatusInput { + s.AcceptLanguage = &v + return s +} + +// SetCopyProductToken sets the CopyProductToken field's value. +func (s *DescribeCopyProductStatusInput) SetCopyProductToken(v string) *DescribeCopyProductStatusInput { + s.CopyProductToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeCopyProductStatusOutput +type DescribeCopyProductStatusOutput struct { + _ struct{} `type:"structure"` + + // The status of the copy product operation. + CopyProductStatus *string `type:"string" enum:"CopyProductStatus"` + + // The status message. + StatusDetail *string `type:"string"` + + // The ID of the copied product. + TargetProductId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeCopyProductStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCopyProductStatusOutput) GoString() string { + return s.String() +} + +// SetCopyProductStatus sets the CopyProductStatus field's value. +func (s *DescribeCopyProductStatusOutput) SetCopyProductStatus(v string) *DescribeCopyProductStatusOutput { + s.CopyProductStatus = &v + return s +} + +// SetStatusDetail sets the StatusDetail field's value. +func (s *DescribeCopyProductStatusOutput) SetStatusDetail(v string) *DescribeCopyProductStatusOutput { + s.StatusDetail = &v + return s +} + +// SetTargetProductId sets the TargetProductId field's value. +func (s *DescribeCopyProductStatusOutput) SetTargetProductId(v string) *DescribeCopyProductStatusOutput { + s.TargetProductId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolioInput +type DescribePortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The identifier of the portfolio for which to retrieve information. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribePortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePortfolioInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribePortfolioInput) SetAcceptLanguage(v string) *DescribePortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribePortfolioInput) SetId(v string) *DescribePortfolioInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolioOutput +type DescribePortfolioOutput struct { + _ struct{} `type:"structure"` + + // Detailed portfolio information. + PortfolioDetail *PortfolioDetail `type:"structure"` + + // TagOptions associated with the portfolio. + TagOptions []*TagOptionDetail `type:"list"` + + // Tags associated with the portfolio. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s DescribePortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePortfolioOutput) GoString() string { + return s.String() +} + +// SetPortfolioDetail sets the PortfolioDetail field's value. +func (s *DescribePortfolioOutput) SetPortfolioDetail(v *PortfolioDetail) *DescribePortfolioOutput { + s.PortfolioDetail = v + return s +} + +// SetTagOptions sets the TagOptions field's value. +func (s *DescribePortfolioOutput) SetTagOptions(v []*TagOptionDetail) *DescribePortfolioOutput { + s.TagOptions = v + return s +} + +// SetTags sets the Tags field's value. +func (s *DescribePortfolioOutput) SetTags(v []*Tag) *DescribePortfolioOutput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductAsAdminInput +type DescribeProductAsAdminInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The identifier of the product for which to retrieve information. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeProductAsAdminInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProductAsAdminInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeProductAsAdminInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeProductAsAdminInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeProductAsAdminInput) SetAcceptLanguage(v string) *DescribeProductAsAdminInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeProductAsAdminInput) SetId(v string) *DescribeProductAsAdminInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductAsAdminOutput +type DescribeProductAsAdminOutput struct { + _ struct{} `type:"structure"` + + // Detailed product view information. + ProductViewDetail *ProductViewDetail `type:"structure"` + + // A list of provisioning artifact summaries for the product. + ProvisioningArtifactSummaries []*ProvisioningArtifactSummary `type:"list"` + + // List of TagOptions associated with the product. + TagOptions []*TagOptionDetail `type:"list"` + + // Tags associated with the product. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s DescribeProductAsAdminOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProductAsAdminOutput) GoString() string { + return s.String() +} + +// SetProductViewDetail sets the ProductViewDetail field's value. +func (s *DescribeProductAsAdminOutput) SetProductViewDetail(v *ProductViewDetail) *DescribeProductAsAdminOutput { + s.ProductViewDetail = v + return s +} + +// SetProvisioningArtifactSummaries sets the ProvisioningArtifactSummaries field's value. +func (s *DescribeProductAsAdminOutput) SetProvisioningArtifactSummaries(v []*ProvisioningArtifactSummary) *DescribeProductAsAdminOutput { + s.ProvisioningArtifactSummaries = v + return s +} + +// SetTagOptions sets the TagOptions field's value. +func (s *DescribeProductAsAdminOutput) SetTagOptions(v []*TagOptionDetail) *DescribeProductAsAdminOutput { + s.TagOptions = v + return s +} + +// SetTags sets the Tags field's value. +func (s *DescribeProductAsAdminOutput) SetTags(v []*Tag) *DescribeProductAsAdminOutput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductInput +type DescribeProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The ProductId of the product to describe. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeProductInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeProductInput) SetAcceptLanguage(v string) *DescribeProductInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeProductInput) SetId(v string) *DescribeProductInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductOutput +type DescribeProductOutput struct { + _ struct{} `type:"structure"` + + // The summary metadata about the specified product. + ProductViewSummary *ProductViewSummary `type:"structure"` + + // A list of provisioning artifact objects for the specified product. The ProvisioningArtifacts + // parameter represent the ways the specified product can be provisioned. + ProvisioningArtifacts []*ProvisioningArtifact `type:"list"` +} + +// String returns the string representation +func (s DescribeProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProductOutput) GoString() string { + return s.String() +} + +// SetProductViewSummary sets the ProductViewSummary field's value. +func (s *DescribeProductOutput) SetProductViewSummary(v *ProductViewSummary) *DescribeProductOutput { + s.ProductViewSummary = v + return s +} + +// SetProvisioningArtifacts sets the ProvisioningArtifacts field's value. +func (s *DescribeProductOutput) SetProvisioningArtifacts(v []*ProvisioningArtifact) *DescribeProductOutput { + s.ProvisioningArtifacts = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductViewInput +type DescribeProductViewInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The ProductViewId of the product to describe. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeProductViewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProductViewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeProductViewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeProductViewInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeProductViewInput) SetAcceptLanguage(v string) *DescribeProductViewInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeProductViewInput) SetId(v string) *DescribeProductViewInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProductViewOutput +type DescribeProductViewOutput struct { + _ struct{} `type:"structure"` + + // The summary metadata about the specified product. + ProductViewSummary *ProductViewSummary `type:"structure"` + + // A list of provisioning artifact objects for the specified product. The ProvisioningArtifacts + // represent the ways in which the specified product can be provisioned. + ProvisioningArtifacts []*ProvisioningArtifact `type:"list"` +} + +// String returns the string representation +func (s DescribeProductViewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProductViewOutput) GoString() string { + return s.String() +} + +// SetProductViewSummary sets the ProductViewSummary field's value. +func (s *DescribeProductViewOutput) SetProductViewSummary(v *ProductViewSummary) *DescribeProductViewOutput { + s.ProductViewSummary = v + return s +} + +// SetProvisioningArtifacts sets the ProvisioningArtifacts field's value. +func (s *DescribeProductViewOutput) SetProvisioningArtifacts(v []*ProvisioningArtifact) *DescribeProductViewOutput { + s.ProvisioningArtifacts = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisionedProductInput +type DescribeProvisionedProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The provisioned product identifier. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeProvisionedProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProvisionedProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeProvisionedProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeProvisionedProductInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeProvisionedProductInput) SetAcceptLanguage(v string) *DescribeProvisionedProductInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeProvisionedProductInput) SetId(v string) *DescribeProvisionedProductInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisionedProductOutput +type DescribeProvisionedProductOutput struct { + _ struct{} `type:"structure"` + + // Detailed provisioned product information. + ProvisionedProductDetail *ProvisionedProductDetail `type:"structure"` +} + +// String returns the string representation +func (s DescribeProvisionedProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProvisionedProductOutput) GoString() string { + return s.String() +} + +// SetProvisionedProductDetail sets the ProvisionedProductDetail field's value. +func (s *DescribeProvisionedProductOutput) SetProvisionedProductDetail(v *ProvisionedProductDetail) *DescribeProvisionedProductOutput { + s.ProvisionedProductDetail = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningArtifactInput +type DescribeProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. This is sometimes referred to + // as the product version. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` + + // Enable a verbose level of details for the provisioning artifact. + Verbose *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeProvisioningArtifactInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeProvisioningArtifactInput) SetAcceptLanguage(v string) *DescribeProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *DescribeProvisioningArtifactInput) SetProductId(v string) *DescribeProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *DescribeProvisioningArtifactInput) SetProvisioningArtifactId(v string) *DescribeProvisioningArtifactInput { + s.ProvisioningArtifactId = &v + return s +} + +// SetVerbose sets the Verbose field's value. +func (s *DescribeProvisioningArtifactInput) SetVerbose(v bool) *DescribeProvisioningArtifactInput { + s.Verbose = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningArtifactOutput +type DescribeProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` + + // Additional information about the provisioning artifact. + Info map[string]*string `min:"1" type:"map"` + + // Detailed provisioning artifact information. + ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` + + // The status of the current request. + Status *string `type:"string" enum:"Status"` +} + +// String returns the string representation +func (s DescribeProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProvisioningArtifactOutput) GoString() string { + return s.String() +} + +// SetInfo sets the Info field's value. +func (s *DescribeProvisioningArtifactOutput) SetInfo(v map[string]*string) *DescribeProvisioningArtifactOutput { + s.Info = v + return s +} + +// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. +func (s *DescribeProvisioningArtifactOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *DescribeProvisioningArtifactOutput { + s.ProvisioningArtifactDetail = v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeProvisioningArtifactOutput) SetStatus(v string) *DescribeProvisioningArtifactOutput { + s.Status = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningParametersInput +type DescribeProvisioningParametersInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The identifier of the path for this product's provisioning. This value is + // optional if the product has a default path, and is required if there is more + // than one path for the specified product. + PathId *string `min:"1" type:"string"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The provisioning artifact identifier for this product. This is sometimes + // referred to as the product version. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeProvisioningParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProvisioningParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeProvisioningParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeProvisioningParametersInput"} + if s.PathId != nil && len(*s.PathId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathId", 1)) + } + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeProvisioningParametersInput) SetAcceptLanguage(v string) *DescribeProvisioningParametersInput { + s.AcceptLanguage = &v + return s +} + +// SetPathId sets the PathId field's value. +func (s *DescribeProvisioningParametersInput) SetPathId(v string) *DescribeProvisioningParametersInput { + s.PathId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *DescribeProvisioningParametersInput) SetProductId(v string) *DescribeProvisioningParametersInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *DescribeProvisioningParametersInput) SetProvisioningArtifactId(v string) *DescribeProvisioningParametersInput { + s.ProvisioningArtifactId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeProvisioningParametersOutput +type DescribeProvisioningParametersOutput struct { + _ struct{} `type:"structure"` + + // The list of constraint summaries that apply to provisioning this product. + ConstraintSummaries []*ConstraintSummary `type:"list"` + + // The list of parameters used to successfully provision the product. Each parameter + // includes a list of allowable values and additional metadata about each parameter. + ProvisioningArtifactParameters []*ProvisioningArtifactParameter `type:"list"` + + // List of TagOptions associated with the provisioned provisioning parameters. + TagOptions []*TagOptionSummary `type:"list"` + + // Any additional metadata specifically related to the provisioning of the product. + // For example, see the Version field of the CloudFormation template. + UsageInstructions []*UsageInstruction `type:"list"` +} + +// String returns the string representation +func (s DescribeProvisioningParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProvisioningParametersOutput) GoString() string { + return s.String() +} + +// SetConstraintSummaries sets the ConstraintSummaries field's value. +func (s *DescribeProvisioningParametersOutput) SetConstraintSummaries(v []*ConstraintSummary) *DescribeProvisioningParametersOutput { + s.ConstraintSummaries = v + return s +} + +// SetProvisioningArtifactParameters sets the ProvisioningArtifactParameters field's value. +func (s *DescribeProvisioningParametersOutput) SetProvisioningArtifactParameters(v []*ProvisioningArtifactParameter) *DescribeProvisioningParametersOutput { + s.ProvisioningArtifactParameters = v + return s +} + +// SetTagOptions sets the TagOptions field's value. +func (s *DescribeProvisioningParametersOutput) SetTagOptions(v []*TagOptionSummary) *DescribeProvisioningParametersOutput { + s.TagOptions = v + return s +} + +// SetUsageInstructions sets the UsageInstructions field's value. +func (s *DescribeProvisioningParametersOutput) SetUsageInstructions(v []*UsageInstruction) *DescribeProvisioningParametersOutput { + s.UsageInstructions = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeRecordInput +type DescribeRecordInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The record identifier of the ProvisionedProduct object for which to retrieve + // output information. This is the RecordDetail.RecordId obtained from the request + // operation's response. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeRecordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRecordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRecordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRecordInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeRecordInput) SetAcceptLanguage(v string) *DescribeRecordInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeRecordInput) SetId(v string) *DescribeRecordInput { + s.Id = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *DescribeRecordInput) SetPageSize(v int64) *DescribeRecordInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *DescribeRecordInput) SetPageToken(v string) *DescribeRecordInput { + s.PageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeRecordOutput +type DescribeRecordOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // Detailed record information for the specified product. + RecordDetail *RecordDetail `type:"structure"` + + // A list of outputs for the specified Product object created as the result + // of a request. For example, a CloudFormation-backed product that creates an + // S3 bucket would have an output for the S3 bucket URL. + RecordOutputs []*RecordOutput `type:"list"` +} + +// String returns the string representation +func (s DescribeRecordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRecordOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *DescribeRecordOutput) SetNextPageToken(v string) *DescribeRecordOutput { + s.NextPageToken = &v + return s +} + +// SetRecordDetail sets the RecordDetail field's value. +func (s *DescribeRecordOutput) SetRecordDetail(v *RecordDetail) *DescribeRecordOutput { + s.RecordDetail = v + return s +} + +// SetRecordOutputs sets the RecordOutputs field's value. +func (s *DescribeRecordOutput) SetRecordOutputs(v []*RecordOutput) *DescribeRecordOutput { + s.RecordOutputs = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeTagOptionInput +type DescribeTagOptionInput struct { + _ struct{} `type:"structure"` + + // The identifier of the TagOption. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTagOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTagOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTagOptionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DescribeTagOptionInput) SetId(v string) *DescribeTagOptionInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeTagOptionOutput +type DescribeTagOptionOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed TagOption information. + TagOptionDetail *TagOptionDetail `type:"structure"` +} + +// String returns the string representation +func (s DescribeTagOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagOptionOutput) GoString() string { + return s.String() +} + +// SetTagOptionDetail sets the TagOptionDetail field's value. +func (s *DescribeTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *DescribeTagOptionOutput { + s.TagOptionDetail = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociatePrincipalFromPortfolioInput +type DisassociatePrincipalFromPortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` + + // The ARN representing the principal (IAM user, role, or group). + // + // PrincipalARN is a required field + PrincipalARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociatePrincipalFromPortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociatePrincipalFromPortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociatePrincipalFromPortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociatePrincipalFromPortfolioInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + if s.PrincipalARN == nil { + invalidParams.Add(request.NewErrParamRequired("PrincipalARN")) + } + if s.PrincipalARN != nil && len(*s.PrincipalARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PrincipalARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DisassociatePrincipalFromPortfolioInput) SetAcceptLanguage(v string) *DisassociatePrincipalFromPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *DisassociatePrincipalFromPortfolioInput) SetPortfolioId(v string) *DisassociatePrincipalFromPortfolioInput { + s.PortfolioId = &v + return s +} + +// SetPrincipalARN sets the PrincipalARN field's value. +func (s *DisassociatePrincipalFromPortfolioInput) SetPrincipalARN(v string) *DisassociatePrincipalFromPortfolioInput { + s.PrincipalARN = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociatePrincipalFromPortfolioOutput +type DisassociatePrincipalFromPortfolioOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociatePrincipalFromPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociatePrincipalFromPortfolioOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateProductFromPortfolioInput +type DisassociateProductFromPortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateProductFromPortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateProductFromPortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateProductFromPortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateProductFromPortfolioInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DisassociateProductFromPortfolioInput) SetAcceptLanguage(v string) *DisassociateProductFromPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *DisassociateProductFromPortfolioInput) SetPortfolioId(v string) *DisassociateProductFromPortfolioInput { + s.PortfolioId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *DisassociateProductFromPortfolioInput) SetProductId(v string) *DisassociateProductFromPortfolioInput { + s.ProductId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateProductFromPortfolioOutput +type DisassociateProductFromPortfolioOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateProductFromPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateProductFromPortfolioOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateTagOptionFromResourceInput +type DisassociateTagOptionFromResourceInput struct { + _ struct{} `type:"structure"` + + // Identifier of the resource from which to disassociate the TagOption. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // Identifier of the TagOption to disassociate from the resource. + // + // TagOptionId is a required field + TagOptionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateTagOptionFromResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateTagOptionFromResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateTagOptionFromResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateTagOptionFromResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagOptionId == nil { + invalidParams.Add(request.NewErrParamRequired("TagOptionId")) + } + if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *DisassociateTagOptionFromResourceInput) SetResourceId(v string) *DisassociateTagOptionFromResourceInput { + s.ResourceId = &v + return s +} + +// SetTagOptionId sets the TagOptionId field's value. +func (s *DisassociateTagOptionFromResourceInput) SetTagOptionId(v string) *DisassociateTagOptionFromResourceInput { + s.TagOptionId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateTagOptionFromResourceOutput +type DisassociateTagOptionFromResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateTagOptionFromResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateTagOptionFromResourceOutput) GoString() string { + return s.String() +} + +// Summary information about a path for a user to have access to a specified +// product. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/LaunchPathSummary +type LaunchPathSummary struct { + _ struct{} `type:"structure"` + + // List of constraints on the portfolio-product relationship. + ConstraintSummaries []*ConstraintSummary `type:"list"` + + // The unique identifier of the product path. + Id *string `min:"1" type:"string"` + + // Corresponds to the name of the portfolio to which the user was assigned. + Name *string `type:"string"` + + // List of tags used by this launch path. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s LaunchPathSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchPathSummary) GoString() string { + return s.String() +} + +// SetConstraintSummaries sets the ConstraintSummaries field's value. +func (s *LaunchPathSummary) SetConstraintSummaries(v []*ConstraintSummary) *LaunchPathSummary { + s.ConstraintSummaries = v + return s +} + +// SetId sets the Id field's value. +func (s *LaunchPathSummary) SetId(v string) *LaunchPathSummary { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *LaunchPathSummary) SetName(v string) *LaunchPathSummary { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *LaunchPathSummary) SetTags(v []*Tag) *LaunchPathSummary { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListAcceptedPortfolioSharesInput +type ListAcceptedPortfolioSharesInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` +} + +// String returns the string representation +func (s ListAcceptedPortfolioSharesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAcceptedPortfolioSharesInput) GoString() string { + return s.String() +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListAcceptedPortfolioSharesInput) SetAcceptLanguage(v string) *ListAcceptedPortfolioSharesInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListAcceptedPortfolioSharesInput) SetPageSize(v int64) *ListAcceptedPortfolioSharesInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListAcceptedPortfolioSharesInput) SetPageToken(v string) *ListAcceptedPortfolioSharesInput { + s.PageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListAcceptedPortfolioSharesOutput +type ListAcceptedPortfolioSharesOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // List of detailed portfolio information objects. + PortfolioDetails []*PortfolioDetail `type:"list"` +} + +// String returns the string representation +func (s ListAcceptedPortfolioSharesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAcceptedPortfolioSharesOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListAcceptedPortfolioSharesOutput) SetNextPageToken(v string) *ListAcceptedPortfolioSharesOutput { + s.NextPageToken = &v + return s +} + +// SetPortfolioDetails sets the PortfolioDetails field's value. +func (s *ListAcceptedPortfolioSharesOutput) SetPortfolioDetails(v []*PortfolioDetail) *ListAcceptedPortfolioSharesOutput { + s.PortfolioDetails = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListConstraintsForPortfolioInput +type ListConstraintsForPortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` + + // The product identifier. + ProductId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListConstraintsForPortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListConstraintsForPortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListConstraintsForPortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListConstraintsForPortfolioInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListConstraintsForPortfolioInput) SetAcceptLanguage(v string) *ListConstraintsForPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListConstraintsForPortfolioInput) SetPageSize(v int64) *ListConstraintsForPortfolioInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListConstraintsForPortfolioInput) SetPageToken(v string) *ListConstraintsForPortfolioInput { + s.PageToken = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *ListConstraintsForPortfolioInput) SetPortfolioId(v string) *ListConstraintsForPortfolioInput { + s.PortfolioId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ListConstraintsForPortfolioInput) SetProductId(v string) *ListConstraintsForPortfolioInput { + s.ProductId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListConstraintsForPortfolioOutput +type ListConstraintsForPortfolioOutput struct { + _ struct{} `type:"structure"` + + // List of detailed constraint information objects. + ConstraintDetails []*ConstraintDetail `type:"list"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` +} + +// String returns the string representation +func (s ListConstraintsForPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListConstraintsForPortfolioOutput) GoString() string { + return s.String() +} + +// SetConstraintDetails sets the ConstraintDetails field's value. +func (s *ListConstraintsForPortfolioOutput) SetConstraintDetails(v []*ConstraintDetail) *ListConstraintsForPortfolioOutput { + s.ConstraintDetails = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListConstraintsForPortfolioOutput) SetNextPageToken(v string) *ListConstraintsForPortfolioOutput { + s.NextPageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListLaunchPathsInput +type ListLaunchPathsInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The product identifier. Identifies the product for which to retrieve LaunchPathSummaries + // information. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListLaunchPathsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLaunchPathsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLaunchPathsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLaunchPathsInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListLaunchPathsInput) SetAcceptLanguage(v string) *ListLaunchPathsInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListLaunchPathsInput) SetPageSize(v int64) *ListLaunchPathsInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListLaunchPathsInput) SetPageToken(v string) *ListLaunchPathsInput { + s.PageToken = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ListLaunchPathsInput) SetProductId(v string) *ListLaunchPathsInput { + s.ProductId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListLaunchPathsOutput +type ListLaunchPathsOutput struct { + _ struct{} `type:"structure"` + + // List of launch path information summaries for the specified PageToken. + LaunchPathSummaries []*LaunchPathSummary `type:"list"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLaunchPathsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLaunchPathsOutput) GoString() string { + return s.String() +} + +// SetLaunchPathSummaries sets the LaunchPathSummaries field's value. +func (s *ListLaunchPathsOutput) SetLaunchPathSummaries(v []*LaunchPathSummary) *ListLaunchPathsOutput { + s.LaunchPathSummaries = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListLaunchPathsOutput) SetNextPageToken(v string) *ListLaunchPathsOutput { + s.NextPageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolioAccessInput +type ListPortfolioAccessInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListPortfolioAccessInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPortfolioAccessInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPortfolioAccessInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPortfolioAccessInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListPortfolioAccessInput) SetAcceptLanguage(v string) *ListPortfolioAccessInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *ListPortfolioAccessInput) SetPortfolioId(v string) *ListPortfolioAccessInput { + s.PortfolioId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolioAccessOutput +type ListPortfolioAccessOutput struct { + _ struct{} `type:"structure"` + + // List of account IDs associated with access to the portfolio. + AccountIds []*string `type:"list"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` +} + +// String returns the string representation +func (s ListPortfolioAccessOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPortfolioAccessOutput) GoString() string { + return s.String() +} + +// SetAccountIds sets the AccountIds field's value. +func (s *ListPortfolioAccessOutput) SetAccountIds(v []*string) *ListPortfolioAccessOutput { + s.AccountIds = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListPortfolioAccessOutput) SetNextPageToken(v string) *ListPortfolioAccessOutput { + s.NextPageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfoliosForProductInput +type ListPortfoliosForProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListPortfoliosForProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPortfoliosForProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPortfoliosForProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPortfoliosForProductInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListPortfoliosForProductInput) SetAcceptLanguage(v string) *ListPortfoliosForProductInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListPortfoliosForProductInput) SetPageSize(v int64) *ListPortfoliosForProductInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListPortfoliosForProductInput) SetPageToken(v string) *ListPortfoliosForProductInput { + s.PageToken = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ListPortfoliosForProductInput) SetProductId(v string) *ListPortfoliosForProductInput { + s.ProductId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfoliosForProductOutput +type ListPortfoliosForProductOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // List of detailed portfolio information objects. + PortfolioDetails []*PortfolioDetail `type:"list"` +} + +// String returns the string representation +func (s ListPortfoliosForProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPortfoliosForProductOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListPortfoliosForProductOutput) SetNextPageToken(v string) *ListPortfoliosForProductOutput { + s.NextPageToken = &v + return s +} + +// SetPortfolioDetails sets the PortfolioDetails field's value. +func (s *ListPortfoliosForProductOutput) SetPortfolioDetails(v []*PortfolioDetail) *ListPortfoliosForProductOutput { + s.PortfolioDetails = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfoliosInput +type ListPortfoliosInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` +} + +// String returns the string representation +func (s ListPortfoliosInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPortfoliosInput) GoString() string { + return s.String() +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListPortfoliosInput) SetAcceptLanguage(v string) *ListPortfoliosInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListPortfoliosInput) SetPageSize(v int64) *ListPortfoliosInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListPortfoliosInput) SetPageToken(v string) *ListPortfoliosInput { + s.PageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfoliosOutput +type ListPortfoliosOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // List of detailed portfolio information objects. + PortfolioDetails []*PortfolioDetail `type:"list"` +} + +// String returns the string representation +func (s ListPortfoliosOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPortfoliosOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListPortfoliosOutput) SetNextPageToken(v string) *ListPortfoliosOutput { + s.NextPageToken = &v + return s +} + +// SetPortfolioDetails sets the PortfolioDetails field's value. +func (s *ListPortfoliosOutput) SetPortfolioDetails(v []*PortfolioDetail) *ListPortfoliosOutput { + s.PortfolioDetails = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPrincipalsForPortfolioInput +type ListPrincipalsForPortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListPrincipalsForPortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPrincipalsForPortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPrincipalsForPortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPrincipalsForPortfolioInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListPrincipalsForPortfolioInput) SetAcceptLanguage(v string) *ListPrincipalsForPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListPrincipalsForPortfolioInput) SetPageSize(v int64) *ListPrincipalsForPortfolioInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListPrincipalsForPortfolioInput) SetPageToken(v string) *ListPrincipalsForPortfolioInput { + s.PageToken = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *ListPrincipalsForPortfolioInput) SetPortfolioId(v string) *ListPrincipalsForPortfolioInput { + s.PortfolioId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPrincipalsForPortfolioOutput +type ListPrincipalsForPortfolioOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // The IAM principals (users or roles) associated with the portfolio. + Principals []*Principal `type:"list"` +} + +// String returns the string representation +func (s ListPrincipalsForPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPrincipalsForPortfolioOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListPrincipalsForPortfolioOutput) SetNextPageToken(v string) *ListPrincipalsForPortfolioOutput { + s.NextPageToken = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *ListPrincipalsForPortfolioOutput) SetPrincipals(v []*Principal) *ListPrincipalsForPortfolioOutput { + s.Principals = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifactsInput +type ListProvisioningArtifactsInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListProvisioningArtifactsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListProvisioningArtifactsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListProvisioningArtifactsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListProvisioningArtifactsInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListProvisioningArtifactsInput) SetAcceptLanguage(v string) *ListProvisioningArtifactsInput { + s.AcceptLanguage = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ListProvisioningArtifactsInput) SetProductId(v string) *ListProvisioningArtifactsInput { + s.ProductId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifactsOutput +type ListProvisioningArtifactsOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // List of detailed provisioning artifact information objects. + ProvisioningArtifactDetails []*ProvisioningArtifactDetail `type:"list"` +} + +// String returns the string representation +func (s ListProvisioningArtifactsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListProvisioningArtifactsOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListProvisioningArtifactsOutput) SetNextPageToken(v string) *ListProvisioningArtifactsOutput { + s.NextPageToken = &v + return s +} + +// SetProvisioningArtifactDetails sets the ProvisioningArtifactDetails field's value. +func (s *ListProvisioningArtifactsOutput) SetProvisioningArtifactDetails(v []*ProvisioningArtifactDetail) *ListProvisioningArtifactsOutput { + s.ProvisioningArtifactDetails = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListRecordHistoryInput +type ListRecordHistoryInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The access level for obtaining results. If left unspecified, User level access + // is used. + AccessLevelFilter *AccessLevelFilter `type:"structure"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The filter to limit search results. + SearchFilter *ListRecordHistorySearchFilter `type:"structure"` +} + +// String returns the string representation +func (s ListRecordHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecordHistoryInput) GoString() string { + return s.String() +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListRecordHistoryInput) SetAcceptLanguage(v string) *ListRecordHistoryInput { + s.AcceptLanguage = &v + return s +} + +// SetAccessLevelFilter sets the AccessLevelFilter field's value. +func (s *ListRecordHistoryInput) SetAccessLevelFilter(v *AccessLevelFilter) *ListRecordHistoryInput { + s.AccessLevelFilter = v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListRecordHistoryInput) SetPageSize(v int64) *ListRecordHistoryInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListRecordHistoryInput) SetPageToken(v string) *ListRecordHistoryInput { + s.PageToken = &v + return s +} + +// SetSearchFilter sets the SearchFilter field's value. +func (s *ListRecordHistoryInput) SetSearchFilter(v *ListRecordHistorySearchFilter) *ListRecordHistoryInput { + s.SearchFilter = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListRecordHistoryOutput +type ListRecordHistoryOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // A list of record detail objects, listed in reverse chronological order. + RecordDetails []*RecordDetail `type:"list"` +} + +// String returns the string representation +func (s ListRecordHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecordHistoryOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListRecordHistoryOutput) SetNextPageToken(v string) *ListRecordHistoryOutput { + s.NextPageToken = &v + return s +} + +// SetRecordDetails sets the RecordDetails field's value. +func (s *ListRecordHistoryOutput) SetRecordDetails(v []*RecordDetail) *ListRecordHistoryOutput { + s.RecordDetails = v + return s +} + +// The search filter to limit results when listing request history records. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListRecordHistorySearchFilter +type ListRecordHistorySearchFilter struct { + _ struct{} `type:"structure"` + + // The filter key. + Key *string `type:"string"` + + // The filter value for Key. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ListRecordHistorySearchFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecordHistorySearchFilter) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *ListRecordHistorySearchFilter) SetKey(v string) *ListRecordHistorySearchFilter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ListRecordHistorySearchFilter) SetValue(v string) *ListRecordHistorySearchFilter { + s.Value = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListResourcesForTagOptionInput +type ListResourcesForTagOptionInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // Resource type. + ResourceType *string `type:"string"` + + // Identifier of the TagOption. + // + // TagOptionId is a required field + TagOptionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListResourcesForTagOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourcesForTagOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResourcesForTagOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResourcesForTagOptionInput"} + if s.TagOptionId == nil { + invalidParams.Add(request.NewErrParamRequired("TagOptionId")) + } + if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPageSize sets the PageSize field's value. +func (s *ListResourcesForTagOptionInput) SetPageSize(v int64) *ListResourcesForTagOptionInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListResourcesForTagOptionInput) SetPageToken(v string) *ListResourcesForTagOptionInput { + s.PageToken = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListResourcesForTagOptionInput) SetResourceType(v string) *ListResourcesForTagOptionInput { + s.ResourceType = &v + return s +} + +// SetTagOptionId sets the TagOptionId field's value. +func (s *ListResourcesForTagOptionInput) SetTagOptionId(v string) *ListResourcesForTagOptionInput { + s.TagOptionId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListResourcesForTagOptionOutput +type ListResourcesForTagOptionOutput struct { + _ struct{} `type:"structure"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The resulting detailed resource information. + ResourceDetails []*ResourceDetail `type:"list"` +} + +// String returns the string representation +func (s ListResourcesForTagOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourcesForTagOptionOutput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *ListResourcesForTagOptionOutput) SetPageToken(v string) *ListResourcesForTagOptionOutput { + s.PageToken = &v + return s +} + +// SetResourceDetails sets the ResourceDetails field's value. +func (s *ListResourcesForTagOptionOutput) SetResourceDetails(v []*ResourceDetail) *ListResourcesForTagOptionOutput { + s.ResourceDetails = v + return s +} + +// The ListTagOptions filters. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptionsFilters +type ListTagOptionsFilters struct { + _ struct{} `type:"structure"` + + // The ListTagOptionsFilters active state. + Active *bool `type:"boolean"` + + // The ListTagOptionsFilters key. + Key *string `min:"1" type:"string"` + + // The ListTagOptionsFilters value. + Value *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListTagOptionsFilters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagOptionsFilters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagOptionsFilters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagOptionsFilters"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActive sets the Active field's value. +func (s *ListTagOptionsFilters) SetActive(v bool) *ListTagOptionsFilters { + s.Active = &v + return s +} + +// SetKey sets the Key field's value. +func (s *ListTagOptionsFilters) SetKey(v string) *ListTagOptionsFilters { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ListTagOptionsFilters) SetValue(v string) *ListTagOptionsFilters { + s.Value = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptionsInput +type ListTagOptionsInput struct { + _ struct{} `type:"structure"` + + // The list of filters with which to limit search results. If no search filters + // are specified, the output is all TagOptions. + Filters *ListTagOptionsFilters `type:"structure"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` +} + +// String returns the string representation +func (s ListTagOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagOptionsInput"} + if s.Filters != nil { + if err := s.Filters.Validate(); err != nil { + invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListTagOptionsInput) SetFilters(v *ListTagOptionsFilters) *ListTagOptionsInput { + s.Filters = v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListTagOptionsInput) SetPageSize(v int64) *ListTagOptionsInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListTagOptionsInput) SetPageToken(v string) *ListTagOptionsInput { + s.PageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptionsOutput +type ListTagOptionsOutput struct { + _ struct{} `type:"structure"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The resulting detailed TagOption information. + TagOptionDetails []*TagOptionDetail `type:"list"` +} + +// String returns the string representation +func (s ListTagOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagOptionsOutput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *ListTagOptionsOutput) SetPageToken(v string) *ListTagOptionsOutput { + s.PageToken = &v + return s +} + +// SetTagOptionDetails sets the TagOptionDetails field's value. +func (s *ListTagOptionsOutput) SetTagOptionDetails(v []*TagOptionDetail) *ListTagOptionsOutput { + s.TagOptionDetails = v + return s +} + +// The constraints that the administrator has put on the parameter. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ParameterConstraints +type ParameterConstraints struct { + _ struct{} `type:"structure"` + + // The values that the administrator has allowed for the parameter. + AllowedValues []*string `type:"list"` +} + +// String returns the string representation +func (s ParameterConstraints) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterConstraints) GoString() string { + return s.String() +} + +// SetAllowedValues sets the AllowedValues field's value. +func (s *ParameterConstraints) SetAllowedValues(v []*string) *ParameterConstraints { + s.AllowedValues = v + return s +} + +// Detailed portfolio information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/PortfolioDetail +type PortfolioDetail struct { + _ struct{} `type:"structure"` + + // The ARN assigned to the portfolio. + ARN *string `min:"1" type:"string"` + + // The UTC timestamp of the creation time. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The text description of the portfolio. + Description *string `type:"string"` + + // The name to use for display purposes. + DisplayName *string `min:"1" type:"string"` + + // The identifier for the portfolio. + Id *string `min:"1" type:"string"` + + // The name of the portfolio provider. + ProviderName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PortfolioDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PortfolioDetail) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *PortfolioDetail) SetARN(v string) *PortfolioDetail { + s.ARN = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *PortfolioDetail) SetCreatedTime(v time.Time) *PortfolioDetail { + s.CreatedTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *PortfolioDetail) SetDescription(v string) *PortfolioDetail { + s.Description = &v + return s +} + +// SetDisplayName sets the DisplayName field's value. +func (s *PortfolioDetail) SetDisplayName(v string) *PortfolioDetail { + s.DisplayName = &v + return s +} + +// SetId sets the Id field's value. +func (s *PortfolioDetail) SetId(v string) *PortfolioDetail { + s.Id = &v + return s +} + +// SetProviderName sets the ProviderName field's value. +func (s *PortfolioDetail) SetProviderName(v string) *PortfolioDetail { + s.ProviderName = &v + return s +} + +// A principal's ARN and type. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/Principal +type Principal struct { + _ struct{} `type:"structure"` + + // The ARN representing the principal (IAM user, role, or group). + PrincipalARN *string `min:"1" type:"string"` + + // The principal type. Must be IAM + PrincipalType *string `type:"string" enum:"PrincipalType"` +} + +// String returns the string representation +func (s Principal) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Principal) GoString() string { + return s.String() +} + +// SetPrincipalARN sets the PrincipalARN field's value. +func (s *Principal) SetPrincipalARN(v string) *Principal { + s.PrincipalARN = &v + return s +} + +// SetPrincipalType sets the PrincipalType field's value. +func (s *Principal) SetPrincipalType(v string) *Principal { + s.PrincipalType = &v + return s +} + +// A single product view aggregation value/count pair, containing metadata about +// each product to which the calling user has access. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProductViewAggregationValue +type ProductViewAggregationValue struct { + _ struct{} `type:"structure"` + + // An approximate count of the products that match the value. + ApproximateCount *int64 `type:"integer"` + + // The value of the product view aggregation. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ProductViewAggregationValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProductViewAggregationValue) GoString() string { + return s.String() +} + +// SetApproximateCount sets the ApproximateCount field's value. +func (s *ProductViewAggregationValue) SetApproximateCount(v int64) *ProductViewAggregationValue { + s.ApproximateCount = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ProductViewAggregationValue) SetValue(v string) *ProductViewAggregationValue { + s.Value = &v + return s +} + +// Detailed product view information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProductViewDetail +type ProductViewDetail struct { + _ struct{} `type:"structure"` + + // The UTC timestamp of the creation time. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The ARN associated with the product. + ProductARN *string `min:"1" type:"string"` + + // The summary metadata about the specified product view. + ProductViewSummary *ProductViewSummary `type:"structure"` + + // Current status of the product. + // + // AVAILABLE - Product is available for use. + // + // CREATING - Creation of product started, not ready for use. + // + // FAILED - Action on product failed. + Status *string `type:"string" enum:"Status"` +} + +// String returns the string representation +func (s ProductViewDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProductViewDetail) GoString() string { + return s.String() +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *ProductViewDetail) SetCreatedTime(v time.Time) *ProductViewDetail { + s.CreatedTime = &v + return s +} + +// SetProductARN sets the ProductARN field's value. +func (s *ProductViewDetail) SetProductARN(v string) *ProductViewDetail { + s.ProductARN = &v + return s +} + +// SetProductViewSummary sets the ProductViewSummary field's value. +func (s *ProductViewDetail) SetProductViewSummary(v *ProductViewSummary) *ProductViewDetail { + s.ProductViewSummary = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ProductViewDetail) SetStatus(v string) *ProductViewDetail { + s.Status = &v + return s +} + +// The summary metadata about the specified product. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProductViewSummary +type ProductViewSummary struct { + _ struct{} `type:"structure"` + + // The distributor of the product. Contact the product administrator for the + // significance of this value. + Distributor *string `type:"string"` + + // A value of false indicates that the product does not have a default path, + // while a value of true indicates that it does. If it's false, call ListLaunchPaths + // to disambiguate between paths. If true, ListLaunchPaths is not required, + // and the output of the ProductViewSummary operation can be used directly with + // DescribeProvisioningParameters. + HasDefaultPath *bool `type:"boolean"` + + // The product view identifier. + Id *string `min:"1" type:"string"` + + // The name of the product. + Name *string `type:"string"` + + // The owner of the product. Contact the product administrator for the significance + // of this value. + Owner *string `type:"string"` + + // The product identifier. + ProductId *string `min:"1" type:"string"` + + // Short description of the product. + ShortDescription *string `type:"string"` + + // The description of the support for this Product. + SupportDescription *string `type:"string"` + + // The email contact information to obtain support for this Product. + SupportEmail *string `type:"string"` + + // The URL information to obtain support for this Product. + SupportUrl *string `type:"string"` + + // The product type. Contact the product administrator for the significance + // of this value. If this value is MARKETPLACE, the product was created by AWS + // Marketplace. + Type *string `type:"string" enum:"ProductType"` +} + +// String returns the string representation +func (s ProductViewSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProductViewSummary) GoString() string { + return s.String() +} + +// SetDistributor sets the Distributor field's value. +func (s *ProductViewSummary) SetDistributor(v string) *ProductViewSummary { + s.Distributor = &v + return s +} + +// SetHasDefaultPath sets the HasDefaultPath field's value. +func (s *ProductViewSummary) SetHasDefaultPath(v bool) *ProductViewSummary { + s.HasDefaultPath = &v + return s +} + +// SetId sets the Id field's value. +func (s *ProductViewSummary) SetId(v string) *ProductViewSummary { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ProductViewSummary) SetName(v string) *ProductViewSummary { + s.Name = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *ProductViewSummary) SetOwner(v string) *ProductViewSummary { + s.Owner = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ProductViewSummary) SetProductId(v string) *ProductViewSummary { + s.ProductId = &v + return s +} + +// SetShortDescription sets the ShortDescription field's value. +func (s *ProductViewSummary) SetShortDescription(v string) *ProductViewSummary { + s.ShortDescription = &v + return s +} + +// SetSupportDescription sets the SupportDescription field's value. +func (s *ProductViewSummary) SetSupportDescription(v string) *ProductViewSummary { + s.SupportDescription = &v + return s +} + +// SetSupportEmail sets the SupportEmail field's value. +func (s *ProductViewSummary) SetSupportEmail(v string) *ProductViewSummary { + s.SupportEmail = &v + return s +} + +// SetSupportUrl sets the SupportUrl field's value. +func (s *ProductViewSummary) SetSupportUrl(v string) *ProductViewSummary { + s.SupportUrl = &v + return s +} + +// SetType sets the Type field's value. +func (s *ProductViewSummary) SetType(v string) *ProductViewSummary { + s.Type = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProductInput +type ProvisionProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related + // events. + NotificationArns []*string `type:"list"` + + // The identifier of the path for this product's provisioning. This value is + // optional if the product has a default path, and is required if there is more + // than one path for the specified product. + PathId *string `min:"1" type:"string"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // An idempotency token that uniquely identifies the provisioning request. + // + // ProvisionToken is a required field + ProvisionToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + + // A user-friendly name to identify the ProvisionedProduct object. This value + // must be unique for the AWS account and cannot be updated after the product + // is provisioned. + // + // ProvisionedProductName is a required field + ProvisionedProductName *string `min:"1" type:"string" required:"true"` + + // The provisioning artifact identifier for this product. This is sometimes + // referred to as the product version. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` + + // Parameters specified by the administrator that are required for provisioning + // the product. + ProvisioningParameters []*ProvisioningParameter `type:"list"` + + // A list of tags to use as provisioning options. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ProvisionProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisionProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvisionProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisionProductInput"} + if s.PathId != nil && len(*s.PathId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathId", 1)) + } + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisionToken == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisionToken")) + } + if s.ProvisionToken != nil && len(*s.ProvisionToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionToken", 1)) + } + if s.ProvisionedProductName == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisionedProductName")) + } + if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + if s.ProvisioningParameters != nil { + for i, v := range s.ProvisioningParameters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProvisioningParameters", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ProvisionProductInput) SetAcceptLanguage(v string) *ProvisionProductInput { + s.AcceptLanguage = &v + return s +} + +// SetNotificationArns sets the NotificationArns field's value. +func (s *ProvisionProductInput) SetNotificationArns(v []*string) *ProvisionProductInput { + s.NotificationArns = v + return s +} + +// SetPathId sets the PathId field's value. +func (s *ProvisionProductInput) SetPathId(v string) *ProvisionProductInput { + s.PathId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ProvisionProductInput) SetProductId(v string) *ProvisionProductInput { + s.ProductId = &v + return s +} + +// SetProvisionToken sets the ProvisionToken field's value. +func (s *ProvisionProductInput) SetProvisionToken(v string) *ProvisionProductInput { + s.ProvisionToken = &v + return s +} + +// SetProvisionedProductName sets the ProvisionedProductName field's value. +func (s *ProvisionProductInput) SetProvisionedProductName(v string) *ProvisionProductInput { + s.ProvisionedProductName = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *ProvisionProductInput) SetProvisioningArtifactId(v string) *ProvisionProductInput { + s.ProvisioningArtifactId = &v + return s +} + +// SetProvisioningParameters sets the ProvisioningParameters field's value. +func (s *ProvisionProductInput) SetProvisioningParameters(v []*ProvisioningParameter) *ProvisionProductInput { + s.ProvisioningParameters = v + return s +} + +// SetTags sets the Tags field's value. +func (s *ProvisionProductInput) SetTags(v []*Tag) *ProvisionProductInput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProductOutput +type ProvisionProductOutput struct { + _ struct{} `type:"structure"` + + // The detailed result of the ProvisionProduct request, containing the inputs + // made to that request, the current state of the request, a pointer to the + // ProvisionedProduct object of the request, and a list of any errors that the + // request encountered. + RecordDetail *RecordDetail `type:"structure"` +} + +// String returns the string representation +func (s ProvisionProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisionProductOutput) GoString() string { + return s.String() +} + +// SetRecordDetail sets the RecordDetail field's value. +func (s *ProvisionProductOutput) SetRecordDetail(v *RecordDetail) *ProvisionProductOutput { + s.RecordDetail = v + return s +} + +// Detailed information about a ProvisionedProduct object. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionedProductDetail +type ProvisionedProductDetail struct { + _ struct{} `type:"structure"` + + // The ARN associated with the ProvisionedProduct object. + Arn *string `min:"1" type:"string"` + + // The UTC timestamp of the creation time. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The identifier of the ProvisionedProduct object. + Id *string `type:"string"` + + // A token to disambiguate duplicate requests. You can use the same input in + // multiple requests, provided that you also specify a different idempotency + // token for each request. + IdempotencyToken *string `min:"1" type:"string"` + + // The record identifier of the last request performed on this ProvisionedProduct + // object. + LastRecordId *string `type:"string"` + + // The user-friendly name of the ProvisionedProduct object. + Name *string `min:"1" type:"string"` + + // The current status of the ProvisionedProduct. + // + // AVAILABLE - Stable state, ready to perform any operation. The most recent + // action request succeeded and completed. + // + // UNDER_CHANGE - Transitive state, operations performed may or may not have + // valid results. Wait for an AVAILABLE status before performing operations. + // + // TAINTED - Stable state, ready to perform any operation. The stack has completed + // the requested operation but is not exactly what was requested. For example, + // a request to update to a new version failed and the stack rolled back to + // the current version. + // + // ERROR - Something unexpected happened such that the provisioned product exists + // but the stack is not running. For example, CloudFormation received an invalid + // parameter value and could not launch the stack. + Status *string `type:"string" enum:"ProvisionedProductStatus"` + + // The current status message of the ProvisionedProduct. + StatusMessage *string `type:"string"` + + // The type of the ProvisionedProduct object. + Type *string `type:"string"` +} + +// String returns the string representation +func (s ProvisionedProductDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisionedProductDetail) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ProvisionedProductDetail) SetArn(v string) *ProvisionedProductDetail { + s.Arn = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *ProvisionedProductDetail) SetCreatedTime(v time.Time) *ProvisionedProductDetail { + s.CreatedTime = &v + return s +} + +// SetId sets the Id field's value. +func (s *ProvisionedProductDetail) SetId(v string) *ProvisionedProductDetail { + s.Id = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *ProvisionedProductDetail) SetIdempotencyToken(v string) *ProvisionedProductDetail { + s.IdempotencyToken = &v + return s +} + +// SetLastRecordId sets the LastRecordId field's value. +func (s *ProvisionedProductDetail) SetLastRecordId(v string) *ProvisionedProductDetail { + s.LastRecordId = &v + return s +} + +// SetName sets the Name field's value. +func (s *ProvisionedProductDetail) SetName(v string) *ProvisionedProductDetail { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ProvisionedProductDetail) SetStatus(v string) *ProvisionedProductDetail { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ProvisionedProductDetail) SetStatusMessage(v string) *ProvisionedProductDetail { + s.StatusMessage = &v + return s +} + +// SetType sets the Type field's value. +func (s *ProvisionedProductDetail) SetType(v string) *ProvisionedProductDetail { + s.Type = &v + return s +} + +// Contains information indicating the ways in which a product can be provisioned. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisioningArtifact +type ProvisioningArtifact struct { + _ struct{} `type:"structure"` + + // The UTC timestamp of the creation time. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The text description of the artifact. + Description *string `type:"string"` + + // The identifier for the artifact. This is sometimes referred to as the product + // version. + Id *string `min:"1" type:"string"` + + // The name of the artifact. + Name *string `type:"string"` +} + +// String returns the string representation +func (s ProvisioningArtifact) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningArtifact) GoString() string { + return s.String() +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *ProvisioningArtifact) SetCreatedTime(v time.Time) *ProvisioningArtifact { + s.CreatedTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ProvisioningArtifact) SetDescription(v string) *ProvisioningArtifact { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *ProvisioningArtifact) SetId(v string) *ProvisioningArtifact { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ProvisioningArtifact) SetName(v string) *ProvisioningArtifact { + s.Name = &v + return s +} + +// Detailed provisioning artifact information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisioningArtifactDetail +type ProvisioningArtifactDetail struct { + _ struct{} `type:"structure"` + + // The UTC timestamp of the creation time. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The text description of the provisioning artifact. + Description *string `type:"string"` + + // The identifier of the provisioning artifact. This is sometimes referred to + // as the product version. + Id *string `min:"1" type:"string"` + + // The name assigned to the provisioning artifact. + Name *string `type:"string"` + + // The type of the provisioning artifact. The following provisioning artifact + // types are used by AWS Marketplace products: + // + // MARKETPLACE_AMI - AMI products. + // + // MARKETPLACE_CAR - CAR (Cluster and AWS Resources) products. + Type *string `type:"string" enum:"ProvisioningArtifactType"` +} + +// String returns the string representation +func (s ProvisioningArtifactDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningArtifactDetail) GoString() string { + return s.String() +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *ProvisioningArtifactDetail) SetCreatedTime(v time.Time) *ProvisioningArtifactDetail { + s.CreatedTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ProvisioningArtifactDetail) SetDescription(v string) *ProvisioningArtifactDetail { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *ProvisioningArtifactDetail) SetId(v string) *ProvisioningArtifactDetail { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ProvisioningArtifactDetail) SetName(v string) *ProvisioningArtifactDetail { + s.Name = &v + return s +} + +// SetType sets the Type field's value. +func (s *ProvisioningArtifactDetail) SetType(v string) *ProvisioningArtifactDetail { + s.Type = &v + return s +} + +// A parameter used to successfully provision the product. This value includes +// a list of allowable values and additional metadata. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisioningArtifactParameter +type ProvisioningArtifactParameter struct { + _ struct{} `type:"structure"` + + // The default value for this parameter. + DefaultValue *string `type:"string"` + + // The text description of the parameter. + Description *string `type:"string"` + + // If this value is true, the value for this parameter is obfuscated from view + // when the parameter is retrieved. This parameter is used to hide sensitive + // information. + IsNoEcho *bool `type:"boolean"` + + // The list of constraints that the administrator has put on the parameter. + ParameterConstraints *ParameterConstraints `type:"structure"` + + // The parameter key. + ParameterKey *string `min:"1" type:"string"` + + // The parameter type. + ParameterType *string `type:"string"` +} + +// String returns the string representation +func (s ProvisioningArtifactParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningArtifactParameter) GoString() string { + return s.String() +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *ProvisioningArtifactParameter) SetDefaultValue(v string) *ProvisioningArtifactParameter { + s.DefaultValue = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ProvisioningArtifactParameter) SetDescription(v string) *ProvisioningArtifactParameter { + s.Description = &v + return s +} + +// SetIsNoEcho sets the IsNoEcho field's value. +func (s *ProvisioningArtifactParameter) SetIsNoEcho(v bool) *ProvisioningArtifactParameter { + s.IsNoEcho = &v + return s +} + +// SetParameterConstraints sets the ParameterConstraints field's value. +func (s *ProvisioningArtifactParameter) SetParameterConstraints(v *ParameterConstraints) *ProvisioningArtifactParameter { + s.ParameterConstraints = v + return s +} + +// SetParameterKey sets the ParameterKey field's value. +func (s *ProvisioningArtifactParameter) SetParameterKey(v string) *ProvisioningArtifactParameter { + s.ParameterKey = &v + return s +} + +// SetParameterType sets the ParameterType field's value. +func (s *ProvisioningArtifactParameter) SetParameterType(v string) *ProvisioningArtifactParameter { + s.ParameterType = &v + return s +} + +// Provisioning artifact properties. For example request JSON, see CreateProvisioningArtifact. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisioningArtifactProperties +type ProvisioningArtifactProperties struct { + _ struct{} `type:"structure"` + + // The text description of the provisioning artifact properties. + Description *string `type:"string"` + + // Additional information about the provisioning artifact properties. When using + // this element in a request, you must specify LoadTemplateFromURL. For more + // information, see CreateProvisioningArtifact. + // + // Info is a required field + Info map[string]*string `min:"1" type:"map" required:"true"` + + // The name assigned to the provisioning artifact properties. + Name *string `type:"string"` + + // The type of the provisioning artifact properties. The following provisioning + // artifact property types are used by AWS Marketplace products: + // + // MARKETPLACE_AMI - AMI products. + // + // MARKETPLACE_CAR - CAR (Cluster and AWS Resources) products. + Type *string `type:"string" enum:"ProvisioningArtifactType"` +} + +// String returns the string representation +func (s ProvisioningArtifactProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningArtifactProperties) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvisioningArtifactProperties) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisioningArtifactProperties"} + if s.Info == nil { + invalidParams.Add(request.NewErrParamRequired("Info")) + } + if s.Info != nil && len(s.Info) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Info", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *ProvisioningArtifactProperties) SetDescription(v string) *ProvisioningArtifactProperties { + s.Description = &v + return s +} + +// SetInfo sets the Info field's value. +func (s *ProvisioningArtifactProperties) SetInfo(v map[string]*string) *ProvisioningArtifactProperties { + s.Info = v + return s +} + +// SetName sets the Name field's value. +func (s *ProvisioningArtifactProperties) SetName(v string) *ProvisioningArtifactProperties { + s.Name = &v + return s +} + +// SetType sets the Type field's value. +func (s *ProvisioningArtifactProperties) SetType(v string) *ProvisioningArtifactProperties { + s.Type = &v + return s +} + +// Stores summary information about a provisioning artifact. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisioningArtifactSummary +type ProvisioningArtifactSummary struct { + _ struct{} `type:"structure"` + + // The UTC timestamp of the creation time. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The description of the provisioning artifact. + Description *string `type:"string"` + + // The identifier of the provisioning artifact. + Id *string `min:"1" type:"string"` + + // The name of the provisioning artifact. + Name *string `type:"string"` + + // The provisioning artifact metadata. This data is used with products created + // by AWS Marketplace. + ProvisioningArtifactMetadata map[string]*string `min:"1" type:"map"` +} + +// String returns the string representation +func (s ProvisioningArtifactSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningArtifactSummary) GoString() string { + return s.String() +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *ProvisioningArtifactSummary) SetCreatedTime(v time.Time) *ProvisioningArtifactSummary { + s.CreatedTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ProvisioningArtifactSummary) SetDescription(v string) *ProvisioningArtifactSummary { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *ProvisioningArtifactSummary) SetId(v string) *ProvisioningArtifactSummary { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ProvisioningArtifactSummary) SetName(v string) *ProvisioningArtifactSummary { + s.Name = &v + return s +} + +// SetProvisioningArtifactMetadata sets the ProvisioningArtifactMetadata field's value. +func (s *ProvisioningArtifactSummary) SetProvisioningArtifactMetadata(v map[string]*string) *ProvisioningArtifactSummary { + s.ProvisioningArtifactMetadata = v + return s +} + +// The parameter key-value pairs used to provision a product. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisioningParameter +type ProvisioningParameter struct { + _ struct{} `type:"structure"` + + // The ProvisioningArtifactParameter.ParameterKey parameter from DescribeProvisioningParameters. + Key *string `min:"1" type:"string"` + + // The value to use for provisioning. Any constraints on this value can be found + // in ProvisioningArtifactParameter for Key. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ProvisioningParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningParameter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvisioningParameter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisioningParameter"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *ProvisioningParameter) SetKey(v string) *ProvisioningParameter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ProvisioningParameter) SetValue(v string) *ProvisioningParameter { + s.Value = &v + return s +} + +// The full details of a specific ProvisionedProduct object. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RecordDetail +type RecordDetail struct { + _ struct{} `type:"structure"` + + // The UTC timestamp of the creation time. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The identifier of the path for this product's provisioning. + PathId *string `min:"1" type:"string"` + + // The product identifier. + ProductId *string `min:"1" type:"string"` + + // The identifier of the ProvisionedProduct object. + ProvisionedProductId *string `min:"1" type:"string"` + + // The user-friendly name of the ProvisionedProduct object. + ProvisionedProductName *string `min:"1" type:"string"` + + // The type of the ProvisionedProduct object. + ProvisionedProductType *string `type:"string"` + + // The provisioning artifact identifier for this product. This is sometimes + // referred to as the product version. + ProvisioningArtifactId *string `min:"1" type:"string"` + + // A list of errors that occurred while processing the request. + RecordErrors []*RecordError `type:"list"` + + // The identifier of the ProvisionedProduct object record. + RecordId *string `min:"1" type:"string"` + + // List of tags associated with this record. + RecordTags []*RecordTag `type:"list"` + + // The record type for this record. + RecordType *string `type:"string"` + + // The status of the ProvisionedProduct object. + // + // CREATED - Request created but the operation has not yet started. + // + // IN_PROGRESS - The requested operation is in-progress. + // + // IN_PROGRESS_IN_ERROR - The provisioned product is under change but the requested + // operation failed and some remediation is occurring. For example, a rollback. + // + // SUCCEEDED - The requested operation has successfully completed. + // + // FAILED - The requested operation has completed but has failed. Investigate + // using the error messages returned. + Status *string `type:"string" enum:"RecordStatus"` + + // The time when the record for the ProvisionedProduct object was last updated. + UpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s RecordDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordDetail) GoString() string { + return s.String() +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *RecordDetail) SetCreatedTime(v time.Time) *RecordDetail { + s.CreatedTime = &v + return s +} + +// SetPathId sets the PathId field's value. +func (s *RecordDetail) SetPathId(v string) *RecordDetail { + s.PathId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *RecordDetail) SetProductId(v string) *RecordDetail { + s.ProductId = &v + return s +} + +// SetProvisionedProductId sets the ProvisionedProductId field's value. +func (s *RecordDetail) SetProvisionedProductId(v string) *RecordDetail { + s.ProvisionedProductId = &v + return s +} + +// SetProvisionedProductName sets the ProvisionedProductName field's value. +func (s *RecordDetail) SetProvisionedProductName(v string) *RecordDetail { + s.ProvisionedProductName = &v + return s +} + +// SetProvisionedProductType sets the ProvisionedProductType field's value. +func (s *RecordDetail) SetProvisionedProductType(v string) *RecordDetail { + s.ProvisionedProductType = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *RecordDetail) SetProvisioningArtifactId(v string) *RecordDetail { + s.ProvisioningArtifactId = &v + return s +} + +// SetRecordErrors sets the RecordErrors field's value. +func (s *RecordDetail) SetRecordErrors(v []*RecordError) *RecordDetail { + s.RecordErrors = v + return s +} + +// SetRecordId sets the RecordId field's value. +func (s *RecordDetail) SetRecordId(v string) *RecordDetail { + s.RecordId = &v + return s +} + +// SetRecordTags sets the RecordTags field's value. +func (s *RecordDetail) SetRecordTags(v []*RecordTag) *RecordDetail { + s.RecordTags = v + return s +} + +// SetRecordType sets the RecordType field's value. +func (s *RecordDetail) SetRecordType(v string) *RecordDetail { + s.RecordType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *RecordDetail) SetStatus(v string) *RecordDetail { + s.Status = &v + return s +} + +// SetUpdatedTime sets the UpdatedTime field's value. +func (s *RecordDetail) SetUpdatedTime(v time.Time) *RecordDetail { + s.UpdatedTime = &v + return s +} + +// The error code and description resulting from an operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RecordError +type RecordError struct { + _ struct{} `type:"structure"` + + // The numeric value of the error. + Code *string `type:"string"` + + // The text description of the error. + Description *string `type:"string"` +} + +// String returns the string representation +func (s RecordError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordError) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *RecordError) SetCode(v string) *RecordError { + s.Code = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RecordError) SetDescription(v string) *RecordError { + s.Description = &v + return s +} + +// An output for the specified Product object created as the result of a request. +// For example, a CloudFormation-backed product that creates an S3 bucket would +// have an output for the S3 bucket URL. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RecordOutput +type RecordOutput struct { + _ struct{} `type:"structure"` + + // The text description of the output. + Description *string `type:"string"` + + // The output key. + OutputKey *string `type:"string"` + + // The output value. + OutputValue *string `type:"string"` +} + +// String returns the string representation +func (s RecordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordOutput) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *RecordOutput) SetDescription(v string) *RecordOutput { + s.Description = &v + return s +} + +// SetOutputKey sets the OutputKey field's value. +func (s *RecordOutput) SetOutputKey(v string) *RecordOutput { + s.OutputKey = &v + return s +} + +// SetOutputValue sets the OutputValue field's value. +func (s *RecordOutput) SetOutputValue(v string) *RecordOutput { + s.OutputValue = &v + return s +} + +// A tag associated with the record, stored as a key-value pair. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RecordTag +type RecordTag struct { + _ struct{} `type:"structure"` + + // The key for this tag. + Key *string `min:"1" type:"string"` + + // The value for this tag. + Value *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s RecordTag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordTag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *RecordTag) SetKey(v string) *RecordTag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *RecordTag) SetValue(v string) *RecordTag { + s.Value = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RejectPortfolioShareInput +type RejectPortfolioShareInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RejectPortfolioShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectPortfolioShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RejectPortfolioShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectPortfolioShareInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *RejectPortfolioShareInput) SetAcceptLanguage(v string) *RejectPortfolioShareInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *RejectPortfolioShareInput) SetPortfolioId(v string) *RejectPortfolioShareInput { + s.PortfolioId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RejectPortfolioShareOutput +type RejectPortfolioShareOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RejectPortfolioShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectPortfolioShareOutput) GoString() string { + return s.String() +} + +// Detailed resource information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ResourceDetail +type ResourceDetail struct { + _ struct{} `type:"structure"` + + // ARN of the resource. + ARN *string `type:"string"` + + // Creation time of the resource. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Description of the resource. + Description *string `type:"string"` + + // Identifier of the resource. + Id *string `type:"string"` + + // Name of the resource. + Name *string `type:"string"` +} + +// String returns the string representation +func (s ResourceDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceDetail) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *ResourceDetail) SetARN(v string) *ResourceDetail { + s.ARN = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *ResourceDetail) SetCreatedTime(v time.Time) *ResourceDetail { + s.CreatedTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ResourceDetail) SetDescription(v string) *ResourceDetail { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *ResourceDetail) SetId(v string) *ResourceDetail { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ResourceDetail) SetName(v string) *ResourceDetail { + s.Name = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ScanProvisionedProductsInput +type ScanProvisionedProductsInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The access level for obtaining results. If left unspecified, User level access + // is used. + AccessLevelFilter *AccessLevelFilter `type:"structure"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` +} + +// String returns the string representation +func (s ScanProvisionedProductsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScanProvisionedProductsInput) GoString() string { + return s.String() +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ScanProvisionedProductsInput) SetAcceptLanguage(v string) *ScanProvisionedProductsInput { + s.AcceptLanguage = &v + return s +} + +// SetAccessLevelFilter sets the AccessLevelFilter field's value. +func (s *ScanProvisionedProductsInput) SetAccessLevelFilter(v *AccessLevelFilter) *ScanProvisionedProductsInput { + s.AccessLevelFilter = v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ScanProvisionedProductsInput) SetPageSize(v int64) *ScanProvisionedProductsInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ScanProvisionedProductsInput) SetPageToken(v string) *ScanProvisionedProductsInput { + s.PageToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ScanProvisionedProductsOutput +type ScanProvisionedProductsOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // A list of ProvisionedProduct detail objects. + ProvisionedProducts []*ProvisionedProductDetail `type:"list"` +} + +// String returns the string representation +func (s ScanProvisionedProductsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScanProvisionedProductsOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ScanProvisionedProductsOutput) SetNextPageToken(v string) *ScanProvisionedProductsOutput { + s.NextPageToken = &v + return s +} + +// SetProvisionedProducts sets the ProvisionedProducts field's value. +func (s *ScanProvisionedProductsOutput) SetProvisionedProducts(v []*ProvisionedProductDetail) *ScanProvisionedProductsOutput { + s.ProvisionedProducts = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProductsAsAdminInput +type SearchProductsAsAdminInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The list of filters with which to limit search results. If no search filters + // are specified, the output is all the products to which the administrator + // has access. + Filters map[string][]*string `type:"map"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The portfolio identifier. + PortfolioId *string `min:"1" type:"string"` + + // Access level of the source of the product. + ProductSource *string `type:"string" enum:"ProductSource"` + + // The sort field specifier. If no value is specified, results are not sorted. + SortBy *string `type:"string" enum:"ProductViewSortBy"` + + // The sort order specifier. If no value is specified, results are not sorted. + SortOrder *string `type:"string" enum:"SortOrder"` +} + +// String returns the string representation +func (s SearchProductsAsAdminInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchProductsAsAdminInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SearchProductsAsAdminInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SearchProductsAsAdminInput"} + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *SearchProductsAsAdminInput) SetAcceptLanguage(v string) *SearchProductsAsAdminInput { + s.AcceptLanguage = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *SearchProductsAsAdminInput) SetFilters(v map[string][]*string) *SearchProductsAsAdminInput { + s.Filters = v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *SearchProductsAsAdminInput) SetPageSize(v int64) *SearchProductsAsAdminInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *SearchProductsAsAdminInput) SetPageToken(v string) *SearchProductsAsAdminInput { + s.PageToken = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *SearchProductsAsAdminInput) SetPortfolioId(v string) *SearchProductsAsAdminInput { + s.PortfolioId = &v + return s +} + +// SetProductSource sets the ProductSource field's value. +func (s *SearchProductsAsAdminInput) SetProductSource(v string) *SearchProductsAsAdminInput { + s.ProductSource = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *SearchProductsAsAdminInput) SetSortBy(v string) *SearchProductsAsAdminInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *SearchProductsAsAdminInput) SetSortOrder(v string) *SearchProductsAsAdminInput { + s.SortOrder = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProductsAsAdminOutput +type SearchProductsAsAdminOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // List of detailed product view information objects. + ProductViewDetails []*ProductViewDetail `type:"list"` +} + +// String returns the string representation +func (s SearchProductsAsAdminOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchProductsAsAdminOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *SearchProductsAsAdminOutput) SetNextPageToken(v string) *SearchProductsAsAdminOutput { + s.NextPageToken = &v + return s +} + +// SetProductViewDetails sets the ProductViewDetails field's value. +func (s *SearchProductsAsAdminOutput) SetProductViewDetails(v []*ProductViewDetail) *SearchProductsAsAdminOutput { + s.ProductViewDetails = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProductsInput +type SearchProductsInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The list of filters with which to limit search results. If no search filters + // are specified, the output is all the products to which the calling user has + // access. + Filters map[string][]*string `type:"map"` + + // The maximum number of items to return in the results. If more results exist + // than fit in the specified PageSize, the value of NextPageToken in the response + // is non-null. + PageSize *int64 `type:"integer"` + + // The page token of the first page retrieved. If null, this retrieves the first + // page of size PageSize. + PageToken *string `type:"string"` + + // The sort field specifier. If no value is specified, results are not sorted. + SortBy *string `type:"string" enum:"ProductViewSortBy"` + + // The sort order specifier. If no value is specified, results are not sorted. + SortOrder *string `type:"string" enum:"SortOrder"` +} + +// String returns the string representation +func (s SearchProductsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchProductsInput) GoString() string { + return s.String() +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *SearchProductsInput) SetAcceptLanguage(v string) *SearchProductsInput { + s.AcceptLanguage = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *SearchProductsInput) SetFilters(v map[string][]*string) *SearchProductsInput { + s.Filters = v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *SearchProductsInput) SetPageSize(v int64) *SearchProductsInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *SearchProductsInput) SetPageToken(v string) *SearchProductsInput { + s.PageToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *SearchProductsInput) SetSortBy(v string) *SearchProductsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *SearchProductsInput) SetSortOrder(v string) *SearchProductsInput { + s.SortOrder = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/SearchProductsOutput +type SearchProductsOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextPageToken *string `type:"string"` + + // A list of the product view aggregation value objects. + ProductViewAggregations map[string][]*ProductViewAggregationValue `type:"map"` + + // A list of the product view summary objects. + ProductViewSummaries []*ProductViewSummary `type:"list"` +} + +// String returns the string representation +func (s SearchProductsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchProductsOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *SearchProductsOutput) SetNextPageToken(v string) *SearchProductsOutput { + s.NextPageToken = &v + return s +} + +// SetProductViewAggregations sets the ProductViewAggregations field's value. +func (s *SearchProductsOutput) SetProductViewAggregations(v map[string][]*ProductViewAggregationValue) *SearchProductsOutput { + s.ProductViewAggregations = v + return s +} + +// SetProductViewSummaries sets the ProductViewSummaries field's value. +func (s *SearchProductsOutput) SetProductViewSummaries(v []*ProductViewSummary) *SearchProductsOutput { + s.ProductViewSummaries = v + return s +} + +// Key-value pairs to associate with this provisioning. These tags are entirely +// discretionary and are propagated to the resources created in the provisioning. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/Tag +type Tag struct { + _ struct{} `type:"structure"` + + // The ProvisioningArtifactParameter.TagKey parameter from DescribeProvisioningParameters. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The desired value for this key. + // + // Value is a required field + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// The TagOption details. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/TagOptionDetail +type TagOptionDetail struct { + _ struct{} `type:"structure"` + + // The TagOptionDetail active state. + Active *bool `type:"boolean"` + + // The TagOptionDetail identifier. + Id *string `min:"1" type:"string"` + + // The TagOptionDetail key. + Key *string `min:"1" type:"string"` + + // The TagOptionDetail value. + Value *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s TagOptionDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagOptionDetail) GoString() string { + return s.String() +} + +// SetActive sets the Active field's value. +func (s *TagOptionDetail) SetActive(v bool) *TagOptionDetail { + s.Active = &v + return s +} + +// SetId sets the Id field's value. +func (s *TagOptionDetail) SetId(v string) *TagOptionDetail { + s.Id = &v + return s +} + +// SetKey sets the Key field's value. +func (s *TagOptionDetail) SetKey(v string) *TagOptionDetail { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *TagOptionDetail) SetValue(v string) *TagOptionDetail { + s.Value = &v + return s +} + +// The TagOption summary key-value pair. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/TagOptionSummary +type TagOptionSummary struct { + _ struct{} `type:"structure"` + + // The TagOptionSummary key. + Key *string `min:"1" type:"string"` + + // The TagOptionSummary value. + Values []*string `type:"list"` +} + +// String returns the string representation +func (s TagOptionSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagOptionSummary) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *TagOptionSummary) SetKey(v string) *TagOptionSummary { + s.Key = &v + return s +} + +// SetValues sets the Values field's value. +func (s *TagOptionSummary) SetValues(v []*string) *TagOptionSummary { + s.Values = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/TerminateProvisionedProductInput +type TerminateProvisionedProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // If set to true, AWS Service Catalog stops managing the specified ProvisionedProduct + // object even if it cannot delete the underlying resources. + IgnoreErrors *bool `type:"boolean"` + + // The identifier of the ProvisionedProduct object to terminate. Specify either + // ProvisionedProductName or ProvisionedProductId, but not both. + ProvisionedProductId *string `min:"1" type:"string"` + + // The name of the ProvisionedProduct object to terminate. Specify either ProvisionedProductName + // or ProvisionedProductId, but not both. + ProvisionedProductName *string `min:"1" type:"string"` + + // An idempotency token that uniquely identifies the termination request. This + // token is only valid during the termination process. After the ProvisionedProduct + // object is terminated, further requests to terminate the same ProvisionedProduct + // object always return ResourceNotFound regardless of the value of TerminateToken. + // + // TerminateToken is a required field + TerminateToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` +} + +// String returns the string representation +func (s TerminateProvisionedProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateProvisionedProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateProvisionedProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateProvisionedProductInput"} + if s.ProvisionedProductId != nil && len(*s.ProvisionedProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductId", 1)) + } + if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) + } + if s.TerminateToken == nil { + invalidParams.Add(request.NewErrParamRequired("TerminateToken")) + } + if s.TerminateToken != nil && len(*s.TerminateToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TerminateToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *TerminateProvisionedProductInput) SetAcceptLanguage(v string) *TerminateProvisionedProductInput { + s.AcceptLanguage = &v + return s +} + +// SetIgnoreErrors sets the IgnoreErrors field's value. +func (s *TerminateProvisionedProductInput) SetIgnoreErrors(v bool) *TerminateProvisionedProductInput { + s.IgnoreErrors = &v + return s +} + +// SetProvisionedProductId sets the ProvisionedProductId field's value. +func (s *TerminateProvisionedProductInput) SetProvisionedProductId(v string) *TerminateProvisionedProductInput { + s.ProvisionedProductId = &v + return s +} + +// SetProvisionedProductName sets the ProvisionedProductName field's value. +func (s *TerminateProvisionedProductInput) SetProvisionedProductName(v string) *TerminateProvisionedProductInput { + s.ProvisionedProductName = &v + return s +} + +// SetTerminateToken sets the TerminateToken field's value. +func (s *TerminateProvisionedProductInput) SetTerminateToken(v string) *TerminateProvisionedProductInput { + s.TerminateToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/TerminateProvisionedProductOutput +type TerminateProvisionedProductOutput struct { + _ struct{} `type:"structure"` + + // The detailed result of the TerminateProvisionedProduct request, containing + // the inputs made to that request, the current state of the request, a pointer + // to the ProvisionedProduct object that the request is modifying, and a list + // of any errors that the request encountered. + RecordDetail *RecordDetail `type:"structure"` +} + +// String returns the string representation +func (s TerminateProvisionedProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateProvisionedProductOutput) GoString() string { + return s.String() +} + +// SetRecordDetail sets the RecordDetail field's value. +func (s *TerminateProvisionedProductOutput) SetRecordDetail(v *RecordDetail) *TerminateProvisionedProductOutput { + s.RecordDetail = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateConstraintInput +type UpdateConstraintInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The updated text description of the constraint. + Description *string `type:"string"` + + // The identifier of the constraint to update. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateConstraintInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConstraintInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateConstraintInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateConstraintInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *UpdateConstraintInput) SetAcceptLanguage(v string) *UpdateConstraintInput { + s.AcceptLanguage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateConstraintInput) SetDescription(v string) *UpdateConstraintInput { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateConstraintInput) SetId(v string) *UpdateConstraintInput { + s.Id = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateConstraintOutput +type UpdateConstraintOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed constraint information. + ConstraintDetail *ConstraintDetail `type:"structure"` + + // The resulting updated constraint parameters. + ConstraintParameters *string `type:"string"` + + // The status of the current request. + Status *string `type:"string" enum:"Status"` +} + +// String returns the string representation +func (s UpdateConstraintOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConstraintOutput) GoString() string { + return s.String() +} + +// SetConstraintDetail sets the ConstraintDetail field's value. +func (s *UpdateConstraintOutput) SetConstraintDetail(v *ConstraintDetail) *UpdateConstraintOutput { + s.ConstraintDetail = v + return s +} + +// SetConstraintParameters sets the ConstraintParameters field's value. +func (s *UpdateConstraintOutput) SetConstraintParameters(v string) *UpdateConstraintOutput { + s.ConstraintParameters = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *UpdateConstraintOutput) SetStatus(v string) *UpdateConstraintOutput { + s.Status = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdatePortfolioInput +type UpdatePortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // Tags to add to the existing list of tags associated with the portfolio. + AddTags []*Tag `type:"list"` + + // The updated text description of the portfolio. + Description *string `type:"string"` + + // The name to use for display purposes. + DisplayName *string `min:"1" type:"string"` + + // The identifier of the portfolio for the update request. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // The updated name of the portfolio provider. + ProviderName *string `min:"1" type:"string"` + + // Tags to remove from the existing list of tags associated with the portfolio. + RemoveTags []*string `type:"list"` +} + +// String returns the string representation +func (s UpdatePortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdatePortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdatePortfolioInput"} + if s.DisplayName != nil && len(*s.DisplayName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DisplayName", 1)) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.ProviderName != nil && len(*s.ProviderName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1)) + } + if s.AddTags != nil { + for i, v := range s.AddTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddTags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *UpdatePortfolioInput) SetAcceptLanguage(v string) *UpdatePortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetAddTags sets the AddTags field's value. +func (s *UpdatePortfolioInput) SetAddTags(v []*Tag) *UpdatePortfolioInput { + s.AddTags = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdatePortfolioInput) SetDescription(v string) *UpdatePortfolioInput { + s.Description = &v + return s +} + +// SetDisplayName sets the DisplayName field's value. +func (s *UpdatePortfolioInput) SetDisplayName(v string) *UpdatePortfolioInput { + s.DisplayName = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdatePortfolioInput) SetId(v string) *UpdatePortfolioInput { + s.Id = &v + return s +} + +// SetProviderName sets the ProviderName field's value. +func (s *UpdatePortfolioInput) SetProviderName(v string) *UpdatePortfolioInput { + s.ProviderName = &v + return s +} + +// SetRemoveTags sets the RemoveTags field's value. +func (s *UpdatePortfolioInput) SetRemoveTags(v []*string) *UpdatePortfolioInput { + s.RemoveTags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdatePortfolioOutput +type UpdatePortfolioOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed portfolio information. + PortfolioDetail *PortfolioDetail `type:"structure"` + + // Tags associated with the portfolio. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s UpdatePortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePortfolioOutput) GoString() string { + return s.String() +} + +// SetPortfolioDetail sets the PortfolioDetail field's value. +func (s *UpdatePortfolioOutput) SetPortfolioDetail(v *PortfolioDetail) *UpdatePortfolioOutput { + s.PortfolioDetail = v + return s +} + +// SetTags sets the Tags field's value. +func (s *UpdatePortfolioOutput) SetTags(v []*Tag) *UpdatePortfolioOutput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProductInput +type UpdateProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // Tags to add to the existing list of tags associated with the product. + AddTags []*Tag `type:"list"` + + // The updated text description of the product. + Description *string `type:"string"` + + // The updated distributor of the product. + Distributor *string `type:"string"` + + // The identifier of the product for the update request. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // The updated product name. + Name *string `type:"string"` + + // The updated owner of the product. + Owner *string `type:"string"` + + // Tags to remove from the existing list of tags associated with the product. + RemoveTags []*string `type:"list"` + + // The updated support description for the product. + SupportDescription *string `type:"string"` + + // The updated support email for the product. + SupportEmail *string `type:"string"` + + // The updated support URL for the product. + SupportUrl *string `type:"string"` +} + +// String returns the string representation +func (s UpdateProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateProductInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.AddTags != nil { + for i, v := range s.AddTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddTags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *UpdateProductInput) SetAcceptLanguage(v string) *UpdateProductInput { + s.AcceptLanguage = &v + return s +} + +// SetAddTags sets the AddTags field's value. +func (s *UpdateProductInput) SetAddTags(v []*Tag) *UpdateProductInput { + s.AddTags = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateProductInput) SetDescription(v string) *UpdateProductInput { + s.Description = &v + return s +} + +// SetDistributor sets the Distributor field's value. +func (s *UpdateProductInput) SetDistributor(v string) *UpdateProductInput { + s.Distributor = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateProductInput) SetId(v string) *UpdateProductInput { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateProductInput) SetName(v string) *UpdateProductInput { + s.Name = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *UpdateProductInput) SetOwner(v string) *UpdateProductInput { + s.Owner = &v + return s +} + +// SetRemoveTags sets the RemoveTags field's value. +func (s *UpdateProductInput) SetRemoveTags(v []*string) *UpdateProductInput { + s.RemoveTags = v + return s +} + +// SetSupportDescription sets the SupportDescription field's value. +func (s *UpdateProductInput) SetSupportDescription(v string) *UpdateProductInput { + s.SupportDescription = &v + return s +} + +// SetSupportEmail sets the SupportEmail field's value. +func (s *UpdateProductInput) SetSupportEmail(v string) *UpdateProductInput { + s.SupportEmail = &v + return s +} + +// SetSupportUrl sets the SupportUrl field's value. +func (s *UpdateProductInput) SetSupportUrl(v string) *UpdateProductInput { + s.SupportUrl = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProductOutput +type UpdateProductOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed product view information. + ProductViewDetail *ProductViewDetail `type:"structure"` + + // Tags associated with the product. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s UpdateProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateProductOutput) GoString() string { + return s.String() +} + +// SetProductViewDetail sets the ProductViewDetail field's value. +func (s *UpdateProductOutput) SetProductViewDetail(v *ProductViewDetail) *UpdateProductOutput { + s.ProductViewDetail = v + return s +} + +// SetTags sets the Tags field's value. +func (s *UpdateProductOutput) SetTags(v []*Tag) *UpdateProductOutput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisionedProductInput +type UpdateProvisionedProductInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The identifier of the path to use in the updated ProvisionedProduct object. + // This value is optional if the product has a default path, and is required + // if there is more than one path for the specified product. + PathId *string `min:"1" type:"string"` + + // The identifier of the ProvisionedProduct object. + ProductId *string `min:"1" type:"string"` + + // The identifier of the ProvisionedProduct object to update. Specify either + // ProvisionedProductName or ProvisionedProductId, but not both. + ProvisionedProductId *string `min:"1" type:"string"` + + // The updated name of the ProvisionedProduct object. Specify either ProvisionedProductName + // or ProvisionedProductId, but not both. + ProvisionedProductName *string `min:"1" type:"string"` + + // The provisioning artifact identifier for this product. This is sometimes + // referred to as the product version. + ProvisioningArtifactId *string `min:"1" type:"string"` + + // A list of ProvisioningParameter objects used to update the ProvisionedProduct + // object. + ProvisioningParameters []*UpdateProvisioningParameter `type:"list"` + + // The idempotency token that uniquely identifies the provisioning update request. + // + // UpdateToken is a required field + UpdateToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` +} + +// String returns the string representation +func (s UpdateProvisionedProductInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateProvisionedProductInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateProvisionedProductInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateProvisionedProductInput"} + if s.PathId != nil && len(*s.PathId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathId", 1)) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisionedProductId != nil && len(*s.ProvisionedProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductId", 1)) + } + if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + if s.UpdateToken == nil { + invalidParams.Add(request.NewErrParamRequired("UpdateToken")) + } + if s.UpdateToken != nil && len(*s.UpdateToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UpdateToken", 1)) + } + if s.ProvisioningParameters != nil { + for i, v := range s.ProvisioningParameters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProvisioningParameters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *UpdateProvisionedProductInput) SetAcceptLanguage(v string) *UpdateProvisionedProductInput { + s.AcceptLanguage = &v + return s +} + +// SetPathId sets the PathId field's value. +func (s *UpdateProvisionedProductInput) SetPathId(v string) *UpdateProvisionedProductInput { + s.PathId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *UpdateProvisionedProductInput) SetProductId(v string) *UpdateProvisionedProductInput { + s.ProductId = &v + return s +} + +// SetProvisionedProductId sets the ProvisionedProductId field's value. +func (s *UpdateProvisionedProductInput) SetProvisionedProductId(v string) *UpdateProvisionedProductInput { + s.ProvisionedProductId = &v + return s +} + +// SetProvisionedProductName sets the ProvisionedProductName field's value. +func (s *UpdateProvisionedProductInput) SetProvisionedProductName(v string) *UpdateProvisionedProductInput { + s.ProvisionedProductName = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *UpdateProvisionedProductInput) SetProvisioningArtifactId(v string) *UpdateProvisionedProductInput { + s.ProvisioningArtifactId = &v + return s +} + +// SetProvisioningParameters sets the ProvisioningParameters field's value. +func (s *UpdateProvisionedProductInput) SetProvisioningParameters(v []*UpdateProvisioningParameter) *UpdateProvisionedProductInput { + s.ProvisioningParameters = v + return s +} + +// SetUpdateToken sets the UpdateToken field's value. +func (s *UpdateProvisionedProductInput) SetUpdateToken(v string) *UpdateProvisionedProductInput { + s.UpdateToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisionedProductOutput +type UpdateProvisionedProductOutput struct { + _ struct{} `type:"structure"` + + // The detailed result of the UpdateProvisionedProduct request, containing the + // inputs made to that request, the current state of the request, a pointer + // to the ProvisionedProduct object that the request is modifying, and a list + // of any errors that the request encountered. + RecordDetail *RecordDetail `type:"structure"` +} + +// String returns the string representation +func (s UpdateProvisionedProductOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateProvisionedProductOutput) GoString() string { + return s.String() +} + +// SetRecordDetail sets the RecordDetail field's value. +func (s *UpdateProvisionedProductOutput) SetRecordDetail(v *RecordDetail) *UpdateProvisionedProductOutput { + s.RecordDetail = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisioningArtifactInput +type UpdateProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The updated text description of the provisioning artifact. + Description *string `type:"string"` + + // The updated name of the provisioning artifact. + Name *string `type:"string"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact for the update request. This + // is sometimes referred to as the product version. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateProvisioningArtifactInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *UpdateProvisioningArtifactInput) SetAcceptLanguage(v string) *UpdateProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateProvisioningArtifactInput) SetDescription(v string) *UpdateProvisioningArtifactInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateProvisioningArtifactInput) SetName(v string) *UpdateProvisioningArtifactInput { + s.Name = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *UpdateProvisioningArtifactInput) SetProductId(v string) *UpdateProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *UpdateProvisioningArtifactInput) SetProvisioningArtifactId(v string) *UpdateProvisioningArtifactInput { + s.ProvisioningArtifactId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisioningArtifactOutput +type UpdateProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` + + // Additional information about the provisioning artifact update request. + Info map[string]*string `min:"1" type:"map"` + + // The resulting detailed provisioning artifact information. + ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` + + // The status of the current request. + Status *string `type:"string" enum:"Status"` +} + +// String returns the string representation +func (s UpdateProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateProvisioningArtifactOutput) GoString() string { + return s.String() +} + +// SetInfo sets the Info field's value. +func (s *UpdateProvisioningArtifactOutput) SetInfo(v map[string]*string) *UpdateProvisioningArtifactOutput { + s.Info = v + return s +} + +// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. +func (s *UpdateProvisioningArtifactOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *UpdateProvisioningArtifactOutput { + s.ProvisioningArtifactDetail = v + return s +} + +// SetStatus sets the Status field's value. +func (s *UpdateProvisioningArtifactOutput) SetStatus(v string) *UpdateProvisioningArtifactOutput { + s.Status = &v + return s +} + +// The parameter key-value pair used to update a ProvisionedProduct object. +// If UsePreviousValue is set to true, Value is ignored and the value for Key +// is kept as previously set (current value). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateProvisioningParameter +type UpdateProvisioningParameter struct { + _ struct{} `type:"structure"` + + // The ProvisioningArtifactParameter.ParameterKey parameter from DescribeProvisioningParameters. + Key *string `min:"1" type:"string"` + + // If true, uses the currently set value for Key, ignoring UpdateProvisioningParameter.Value. + UsePreviousValue *bool `type:"boolean"` + + // The value to use for updating the product provisioning. Any constraints on + // this value can be found in the ProvisioningArtifactParameter parameter for + // Key. + Value *string `type:"string"` +} + +// String returns the string representation +func (s UpdateProvisioningParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateProvisioningParameter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateProvisioningParameter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateProvisioningParameter"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *UpdateProvisioningParameter) SetKey(v string) *UpdateProvisioningParameter { + s.Key = &v + return s +} + +// SetUsePreviousValue sets the UsePreviousValue field's value. +func (s *UpdateProvisioningParameter) SetUsePreviousValue(v bool) *UpdateProvisioningParameter { + s.UsePreviousValue = &v + return s +} + +// SetValue sets the Value field's value. +func (s *UpdateProvisioningParameter) SetValue(v string) *UpdateProvisioningParameter { + s.Value = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOptionInput +type UpdateTagOptionInput struct { + _ struct{} `type:"structure"` + + // The updated active state. + Active *bool `type:"boolean"` + + // The identifier of the constraint to update. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // The updated value. + Value *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateTagOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTagOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTagOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTagOptionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActive sets the Active field's value. +func (s *UpdateTagOptionInput) SetActive(v bool) *UpdateTagOptionInput { + s.Active = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateTagOptionInput) SetId(v string) *UpdateTagOptionInput { + s.Id = &v + return s +} + +// SetValue sets the Value field's value. +func (s *UpdateTagOptionInput) SetValue(v string) *UpdateTagOptionInput { + s.Value = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOptionOutput +type UpdateTagOptionOutput struct { + _ struct{} `type:"structure"` + + // The resulting detailed TagOption information. + TagOptionDetail *TagOptionDetail `type:"structure"` +} + +// String returns the string representation +func (s UpdateTagOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTagOptionOutput) GoString() string { + return s.String() +} + +// SetTagOptionDetail sets the TagOptionDetail field's value. +func (s *UpdateTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *UpdateTagOptionOutput { + s.TagOptionDetail = v + return s +} + +// Additional information provided by the administrator. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UsageInstruction +type UsageInstruction struct { + _ struct{} `type:"structure"` + + // The usage instruction type for the value. + Type *string `type:"string"` + + // The usage instruction value for this type. + Value *string `type:"string"` +} + +// String returns the string representation +func (s UsageInstruction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UsageInstruction) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *UsageInstruction) SetType(v string) *UsageInstruction { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *UsageInstruction) SetValue(v string) *UsageInstruction { + s.Value = &v + return s +} + +const ( + // AccessLevelFilterKeyAccount is a AccessLevelFilterKey enum value + AccessLevelFilterKeyAccount = "Account" + + // AccessLevelFilterKeyRole is a AccessLevelFilterKey enum value + AccessLevelFilterKeyRole = "Role" + + // AccessLevelFilterKeyUser is a AccessLevelFilterKey enum value + AccessLevelFilterKeyUser = "User" +) + +const ( + // CopyOptionCopyTags is a CopyOption enum value + CopyOptionCopyTags = "CopyTags" +) + +const ( + // CopyProductStatusSucceeded is a CopyProductStatus enum value + CopyProductStatusSucceeded = "SUCCEEDED" + + // CopyProductStatusInProgress is a CopyProductStatus enum value + CopyProductStatusInProgress = "IN_PROGRESS" + + // CopyProductStatusFailed is a CopyProductStatus enum value + CopyProductStatusFailed = "FAILED" +) + +const ( + // PrincipalTypeIam is a PrincipalType enum value + PrincipalTypeIam = "IAM" +) + +const ( + // ProductSourceAccount is a ProductSource enum value + ProductSourceAccount = "ACCOUNT" +) + +const ( + // ProductTypeCloudFormationTemplate is a ProductType enum value + ProductTypeCloudFormationTemplate = "CLOUD_FORMATION_TEMPLATE" + + // ProductTypeMarketplace is a ProductType enum value + ProductTypeMarketplace = "MARKETPLACE" +) + +const ( + // ProductViewFilterByFullTextSearch is a ProductViewFilterBy enum value + ProductViewFilterByFullTextSearch = "FullTextSearch" + + // ProductViewFilterByOwner is a ProductViewFilterBy enum value + ProductViewFilterByOwner = "Owner" + + // ProductViewFilterByProductType is a ProductViewFilterBy enum value + ProductViewFilterByProductType = "ProductType" + + // ProductViewFilterBySourceProductId is a ProductViewFilterBy enum value + ProductViewFilterBySourceProductId = "SourceProductId" +) + +const ( + // ProductViewSortByTitle is a ProductViewSortBy enum value + ProductViewSortByTitle = "Title" + + // ProductViewSortByVersionCount is a ProductViewSortBy enum value + ProductViewSortByVersionCount = "VersionCount" + + // ProductViewSortByCreationDate is a ProductViewSortBy enum value + ProductViewSortByCreationDate = "CreationDate" +) + +const ( + // ProvisionedProductStatusAvailable is a ProvisionedProductStatus enum value + ProvisionedProductStatusAvailable = "AVAILABLE" + + // ProvisionedProductStatusUnderChange is a ProvisionedProductStatus enum value + ProvisionedProductStatusUnderChange = "UNDER_CHANGE" + + // ProvisionedProductStatusTainted is a ProvisionedProductStatus enum value + ProvisionedProductStatusTainted = "TAINTED" + + // ProvisionedProductStatusError is a ProvisionedProductStatus enum value + ProvisionedProductStatusError = "ERROR" +) + +const ( + // ProvisioningArtifactPropertyNameId is a ProvisioningArtifactPropertyName enum value + ProvisioningArtifactPropertyNameId = "Id" +) + +const ( + // ProvisioningArtifactTypeCloudFormationTemplate is a ProvisioningArtifactType enum value + ProvisioningArtifactTypeCloudFormationTemplate = "CLOUD_FORMATION_TEMPLATE" + + // ProvisioningArtifactTypeMarketplaceAmi is a ProvisioningArtifactType enum value + ProvisioningArtifactTypeMarketplaceAmi = "MARKETPLACE_AMI" + + // ProvisioningArtifactTypeMarketplaceCar is a ProvisioningArtifactType enum value + ProvisioningArtifactTypeMarketplaceCar = "MARKETPLACE_CAR" +) + +const ( + // RecordStatusCreated is a RecordStatus enum value + RecordStatusCreated = "CREATED" + + // RecordStatusInProgress is a RecordStatus enum value + RecordStatusInProgress = "IN_PROGRESS" + + // RecordStatusInProgressInError is a RecordStatus enum value + RecordStatusInProgressInError = "IN_PROGRESS_IN_ERROR" + + // RecordStatusSucceeded is a RecordStatus enum value + RecordStatusSucceeded = "SUCCEEDED" + + // RecordStatusFailed is a RecordStatus enum value + RecordStatusFailed = "FAILED" +) + +const ( + // SortOrderAscending is a SortOrder enum value + SortOrderAscending = "ASCENDING" + + // SortOrderDescending is a SortOrder enum value + SortOrderDescending = "DESCENDING" +) + +const ( + // StatusAvailable is a Status enum value + StatusAvailable = "AVAILABLE" + + // StatusCreating is a Status enum value + StatusCreating = "CREATING" + + // StatusFailed is a Status enum value + StatusFailed = "FAILED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/doc.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/doc.go new file mode 100644 index 000000000..4301b4058 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/doc.go @@ -0,0 +1,40 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package servicecatalog provides the client and types for making API +// requests to AWS Service Catalog. +// +// Overview +// +// AWS Service Catalog (https://aws.amazon.com/servicecatalog/) allows organizations +// to create and manage catalogs of IT services that are approved for use on +// AWS. This documentation provides reference material for the AWS Service Catalog +// end user API. To get the most out of this documentation, be familiar with +// the terminology discussed in AWS Service Catalog Concepts (http://docs.aws.amazon.com/servicecatalog/latest/adminguide/what-is_concepts.html). +// +// Additional Resources +// +// * AWS Service Catalog Administrator Guide (http://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html) +// +// * AWS Service Catalog User Guide (http://docs.aws.amazon.com/servicecatalog/latest/userguide/introduction.html) +// +// See https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10 for more information on this service. +// +// See servicecatalog package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/servicecatalog/ +// +// Using the Client +// +// To contact AWS Service Catalog with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Service Catalog client ServiceCatalog for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/servicecatalog/#New +package servicecatalog diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go new file mode 100644 index 000000000..c7bd5bca1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go @@ -0,0 +1,54 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package servicecatalog + +const ( + + // ErrCodeDuplicateResourceException for service response error code + // "DuplicateResourceException". + // + // The specified resource is a duplicate. + ErrCodeDuplicateResourceException = "DuplicateResourceException" + + // ErrCodeInvalidParametersException for service response error code + // "InvalidParametersException". + // + // One or more parameters provided to the operation are invalid. + ErrCodeInvalidParametersException = "InvalidParametersException" + + // ErrCodeInvalidStateException for service response error code + // "InvalidStateException". + // + // An attempt was made to modify a resource that is in an invalid state. Inspect + // the resource you are using for this operation to ensure that all resource + // states are valid before retrying the operation. + ErrCodeInvalidStateException = "InvalidStateException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The current limits of the service would have been exceeded by this operation. + // Reduce the resource use or increase the service limits and retry the operation. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeResourceInUseException for service response error code + // "ResourceInUseException". + // + // The operation was requested against a resource that is currently in use. + // Free the resource from use and retry the operation. + ErrCodeResourceInUseException = "ResourceInUseException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource was not found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeTagOptionNotMigratedException for service response error code + // "TagOptionNotMigratedException". + // + // An operation requiring TagOptions failed because the TagOptions migration + // process has not been performed for this account. Please use the AWS console + // to perform the migration process before retrying the operation. + ErrCodeTagOptionNotMigratedException = "TagOptionNotMigratedException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go new file mode 100644 index 000000000..05ced0ca3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go @@ -0,0 +1,95 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package servicecatalog + +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" +) + +// ServiceCatalog provides the API operation methods for making requests to +// AWS Service Catalog. See this package's package overview docs +// for details on the service. +// +// ServiceCatalog methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type ServiceCatalog 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 = "servicecatalog" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the ServiceCatalog 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 ServiceCatalog client from just a session. +// svc := servicecatalog.New(mySession) +// +// // Create a ServiceCatalog client with additional configuration +// svc := servicecatalog.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *ServiceCatalog { + 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) *ServiceCatalog { + svc := &ServiceCatalog{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2015-12-10", + JSONVersion: "1.1", + TargetPrefix: "AWS242ServiceCatalogService", + }, + 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 ServiceCatalog operation and runs any +// custom request initialization. +func (c *ServiceCatalog) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go index 2a3f9f678..96d8bd526 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go @@ -64,7 +64,7 @@ func (c *SES) CloneReceiptRuleSetRequest(input *CloneReceiptRuleSetInput) (req * // For information about setting up rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -155,7 +155,7 @@ func (c *SES) CreateConfigurationSetRequest(input *CreateConfigurationSetInput) // Configuration sets enable you to publish email sending events. For information // about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -253,7 +253,7 @@ func (c *SES) CreateConfigurationSetEventDestinationRequest(input *CreateConfigu // email sending events associated with a configuration set. For information // about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -308,6 +308,104 @@ func (c *SES) CreateConfigurationSetEventDestinationWithContext(ctx aws.Context, return out, req.Send() } +const opCreateConfigurationSetTrackingOptions = "CreateConfigurationSetTrackingOptions" + +// CreateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the +// client's request for the CreateConfigurationSetTrackingOptions operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateConfigurationSetTrackingOptions for more information on using the CreateConfigurationSetTrackingOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateConfigurationSetTrackingOptionsRequest method. +// req, resp := client.CreateConfigurationSetTrackingOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetTrackingOptions +func (c *SES) CreateConfigurationSetTrackingOptionsRequest(input *CreateConfigurationSetTrackingOptionsInput) (req *request.Request, output *CreateConfigurationSetTrackingOptionsOutput) { + op := &request.Operation{ + Name: opCreateConfigurationSetTrackingOptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateConfigurationSetTrackingOptionsInput{} + } + + output = &CreateConfigurationSetTrackingOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateConfigurationSetTrackingOptions API operation for Amazon Simple Email Service. +// +// Creates an association between a configuration set and a custom domain for +// open and click event tracking. +// +// By default, images and links used for tracking open and click events are +// hosted on domains operated by Amazon SES. You can configure a subdomain of +// your own to handle these events. For information about using configuration +// sets, see Configuring Custom Domains to Handle Open and Click Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) +// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation CreateConfigurationSetTrackingOptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" +// Indicates that the configuration set does not exist. +// +// * ErrCodeTrackingOptionsAlreadyExistsException "TrackingOptionsAlreadyExistsException" +// Indicates that the configuration set you specified already contains a TrackingOptions +// object. +// +// * ErrCodeInvalidTrackingOptionsException "InvalidTrackingOptions" +// Indicates that the custom domain to be used for open and click tracking redirects +// is invalid. This error appears most often in the following situations: +// +// * When the tracking domain you specified is not verified in Amazon SES. +// +// * When the tracking domain you specified is not a valid domain or subdomain. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetTrackingOptions +func (c *SES) CreateConfigurationSetTrackingOptions(input *CreateConfigurationSetTrackingOptionsInput) (*CreateConfigurationSetTrackingOptionsOutput, error) { + req, out := c.CreateConfigurationSetTrackingOptionsRequest(input) + return out, req.Send() +} + +// CreateConfigurationSetTrackingOptionsWithContext is the same as CreateConfigurationSetTrackingOptions with the addition of +// the ability to pass a context and additional request options. +// +// See CreateConfigurationSetTrackingOptions for details on how to use this API operation. +// +// 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 *SES) CreateConfigurationSetTrackingOptionsWithContext(ctx aws.Context, input *CreateConfigurationSetTrackingOptionsInput, opts ...request.Option) (*CreateConfigurationSetTrackingOptionsOutput, error) { + req, out := c.CreateConfigurationSetTrackingOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateReceiptFilter = "CreateReceiptFilter" // CreateReceiptFilterRequest generates a "aws/request.Request" representing the @@ -357,7 +455,7 @@ func (c *SES) CreateReceiptFilterRequest(input *CreateReceiptFilterInput) (req * // For information about setting up IP address filters, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -445,7 +543,7 @@ func (c *SES) CreateReceiptRuleRequest(input *CreateReceiptRuleInput) (req *requ // For information about setting up receipt rules, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -556,7 +654,7 @@ func (c *SES) CreateReceiptRuleSetRequest(input *CreateReceiptRuleSetInput) (req // For information about setting up receipt rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -595,6 +693,97 @@ func (c *SES) CreateReceiptRuleSetWithContext(ctx aws.Context, input *CreateRece return out, req.Send() } +const opCreateTemplate = "CreateTemplate" + +// CreateTemplateRequest generates a "aws/request.Request" representing the +// client's request for the CreateTemplate operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTemplate for more information on using the CreateTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTemplateRequest method. +// req, resp := client.CreateTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateTemplate +func (c *SES) CreateTemplateRequest(input *CreateTemplateInput) (req *request.Request, output *CreateTemplateOutput) { + op := &request.Operation{ + Name: opCreateTemplate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTemplateInput{} + } + + output = &CreateTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTemplate API operation for Amazon Simple Email Service. +// +// Creates an email template. Email templates enable you to send personalized +// email to one or more destinations in a single API operation. For more information, +// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). +// +// You can execute this operation no more than once per second. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation CreateTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAlreadyExistsException "AlreadyExists" +// Indicates that a resource could not be created because of a naming conflict. +// +// * ErrCodeInvalidTemplateException "InvalidTemplate" +// Indicates that a template could not be created because it contained invalid +// JSON. +// +// * ErrCodeLimitExceededException "LimitExceeded" +// Indicates that a resource could not be created because of service limits. +// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html). +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateTemplate +func (c *SES) CreateTemplate(input *CreateTemplateInput) (*CreateTemplateOutput, error) { + req, out := c.CreateTemplateRequest(input) + return out, req.Send() +} + +// CreateTemplateWithContext is the same as CreateTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTemplate for details on how to use this API operation. +// +// 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 *SES) CreateTemplateWithContext(ctx aws.Context, input *CreateTemplateInput, opts ...request.Option) (*CreateTemplateOutput, error) { + req, out := c.CreateTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteConfigurationSet = "DeleteConfigurationSet" // DeleteConfigurationSetRequest generates a "aws/request.Request" representing the @@ -639,12 +828,11 @@ func (c *SES) DeleteConfigurationSetRequest(input *DeleteConfigurationSetInput) // DeleteConfigurationSet API operation for Amazon Simple Email Service. // -// Deletes a configuration set. +// Deletes a configuration set. Configuration sets enable you to publish email +// sending events. For information about using configuration sets, see the Amazon +// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). // -// Configuration sets enable you to publish email sending events. For information -// about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -723,13 +911,12 @@ func (c *SES) DeleteConfigurationSetEventDestinationRequest(input *DeleteConfigu // DeleteConfigurationSetEventDestination API operation for Amazon Simple Email Service. // -// Deletes a configuration set event destination. +// Deletes a configuration set event destination. Configuration set event destinations +// are associated with configuration sets, which enable you to publish email +// sending events. For information about using configuration sets, see the Amazon +// SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). // -// Configuration set event destinations are associated with configuration sets, -// which enable you to publish email sending events. For information about using -// configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -767,6 +954,99 @@ func (c *SES) DeleteConfigurationSetEventDestinationWithContext(ctx aws.Context, return out, req.Send() } +const opDeleteConfigurationSetTrackingOptions = "DeleteConfigurationSetTrackingOptions" + +// DeleteConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteConfigurationSetTrackingOptions operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteConfigurationSetTrackingOptions for more information on using the DeleteConfigurationSetTrackingOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteConfigurationSetTrackingOptionsRequest method. +// req, resp := client.DeleteConfigurationSetTrackingOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetTrackingOptions +func (c *SES) DeleteConfigurationSetTrackingOptionsRequest(input *DeleteConfigurationSetTrackingOptionsInput) (req *request.Request, output *DeleteConfigurationSetTrackingOptionsOutput) { + op := &request.Operation{ + Name: opDeleteConfigurationSetTrackingOptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteConfigurationSetTrackingOptionsInput{} + } + + output = &DeleteConfigurationSetTrackingOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteConfigurationSetTrackingOptions API operation for Amazon Simple Email Service. +// +// Deletes an association between a configuration set and a custom domain for +// open and click event tracking. +// +// By default, images and links used for tracking open and click events are +// hosted on domains operated by Amazon SES. You can configure a subdomain of +// your own to handle these events. For information about using configuration +// sets, see Configuring Custom Domains to Handle Open and Click Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) +// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// +// Deleting this kind of association will result in emails sent using the specified +// configuration set to capture open and click events using the standard, Amazon +// SES-operated domains. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation DeleteConfigurationSetTrackingOptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" +// Indicates that the configuration set does not exist. +// +// * ErrCodeTrackingOptionsDoesNotExistException "TrackingOptionsDoesNotExistException" +// Indicates that the TrackingOptions object you specified does not exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetTrackingOptions +func (c *SES) DeleteConfigurationSetTrackingOptions(input *DeleteConfigurationSetTrackingOptionsInput) (*DeleteConfigurationSetTrackingOptionsOutput, error) { + req, out := c.DeleteConfigurationSetTrackingOptionsRequest(input) + return out, req.Send() +} + +// DeleteConfigurationSetTrackingOptionsWithContext is the same as DeleteConfigurationSetTrackingOptions with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteConfigurationSetTrackingOptions for details on how to use this API operation. +// +// 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 *SES) DeleteConfigurationSetTrackingOptionsWithContext(ctx aws.Context, input *DeleteConfigurationSetTrackingOptionsInput, opts ...request.Option) (*DeleteConfigurationSetTrackingOptionsOutput, error) { + req, out := c.DeleteConfigurationSetTrackingOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteIdentity = "DeleteIdentity" // DeleteIdentityRequest generates a "aws/request.Request" representing the @@ -814,7 +1094,7 @@ func (c *SES) DeleteIdentityRequest(input *DeleteIdentityInput) (req *request.Re // Deletes the specified identity (an email address or a domain) from the list // of verified identities. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -899,7 +1179,7 @@ func (c *SES) DeleteIdentityPolicyRequest(input *DeleteIdentityPolicyInput) (req // other senders to use its identities. For information about using sending // authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -978,7 +1258,7 @@ func (c *SES) DeleteReceiptFilterRequest(input *DeleteReceiptFilterInput) (req * // For information about managing IP address filters, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1057,7 +1337,7 @@ func (c *SES) DeleteReceiptRuleRequest(input *DeleteReceiptRuleInput) (req *requ // For information about managing receipt rules, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1143,7 +1423,7 @@ func (c *SES) DeleteReceiptRuleSetRequest(input *DeleteReceiptRuleSetInput) (req // For information about managing receipt rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1178,6 +1458,82 @@ func (c *SES) DeleteReceiptRuleSetWithContext(ctx aws.Context, input *DeleteRece return out, req.Send() } +const opDeleteTemplate = "DeleteTemplate" + +// DeleteTemplateRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTemplate operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTemplate for more information on using the DeleteTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTemplateRequest method. +// req, resp := client.DeleteTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteTemplate +func (c *SES) DeleteTemplateRequest(input *DeleteTemplateInput) (req *request.Request, output *DeleteTemplateOutput) { + op := &request.Operation{ + Name: opDeleteTemplate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTemplateInput{} + } + + output = &DeleteTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTemplate API operation for Amazon Simple Email Service. +// +// Deletes an email template. +// +// You can execute this operation no more than once per second. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation DeleteTemplate for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteTemplate +func (c *SES) DeleteTemplate(input *DeleteTemplateInput) (*DeleteTemplateOutput, error) { + req, out := c.DeleteTemplateRequest(input) + return out, req.Send() +} + +// DeleteTemplateWithContext is the same as DeleteTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTemplate for details on how to use this API operation. +// +// 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 *SES) DeleteTemplateWithContext(ctx aws.Context, input *DeleteTemplateInput, opts ...request.Option) (*DeleteTemplateOutput, error) { + req, out := c.DeleteTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteVerifiedEmailAddress = "DeleteVerifiedEmailAddress" // DeleteVerifiedEmailAddressRequest generates a "aws/request.Request" representing the @@ -1224,12 +1580,8 @@ func (c *SES) DeleteVerifiedEmailAddressRequest(input *DeleteVerifiedEmailAddres // DeleteVerifiedEmailAddress API operation for Amazon Simple Email Service. // -// Deletes the specified email address from the list of verified addresses. -// -// The DeleteVerifiedEmailAddress action is deprecated as of the May 15, 2012 -// release of Domain Verification. The DeleteIdentity action is now preferred. -// -// This action is throttled at one request per second. +// Deprecated. Use the DeleteIdentity operation to delete email addresses and +// domains. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1309,7 +1661,7 @@ func (c *SES) DescribeActiveReceiptRuleSetRequest(input *DescribeActiveReceiptRu // For information about setting up receipt rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1383,12 +1735,10 @@ func (c *SES) DescribeConfigurationSetRequest(input *DescribeConfigurationSetInp // DescribeConfigurationSet API operation for Amazon Simple Email Service. // -// Returns the details of the specified configuration set. +// Returns the details of the specified configuration set. For information about +// using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). // -// Configuration sets enable you to publish email sending events. For information -// about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1472,7 +1822,7 @@ func (c *SES) DescribeReceiptRuleRequest(input *DescribeReceiptRuleInput) (req * // For information about setting up receipt rules, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1559,7 +1909,7 @@ func (c *SES) DescribeReceiptRuleSetRequest(input *DescribeReceiptRuleSetInput) // For information about managing receipt rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1639,11 +1989,11 @@ func (c *SES) GetIdentityDkimAttributesRequest(input *GetIdentityDkimAttributesI // GetIdentityDkimAttributes API operation for Amazon Simple Email Service. // // Returns the current status of Easy DKIM signing for an entity. For domain -// name identities, this action also returns the DKIM tokens that are required +// name identities, this operation also returns the DKIM tokens that are required // for Easy DKIM signing, and whether Amazon SES has successfully verified that // these tokens have been published. // -// This action takes a list of identities as input and returns the following +// This operation takes a list of identities as input and returns the following // information for each: // // * Whether Easy DKIM signing is enabled or disabled. @@ -1655,7 +2005,7 @@ func (c *SES) GetIdentityDkimAttributesRequest(input *GetIdentityDkimAttributesI // in the domain's DNS. This information is only returned for domain name // identities, not for email addresses. // -// This action is throttled at one request per second and can only get DKIM +// This operation is throttled at one request per second and can only get DKIM // attributes for up to 100 identities at a time. // // For more information about creating DNS records using DKIM tokens, go to @@ -1734,9 +2084,9 @@ func (c *SES) GetIdentityMailFromDomainAttributesRequest(input *GetIdentityMailF // GetIdentityMailFromDomainAttributes API operation for Amazon Simple Email Service. // // Returns the custom MAIL FROM attributes for a list of identities (email addresses -// and/or domains). +// : domains). // -// This action is throttled at one request per second and can only get custom +// This operation is throttled at one request per second and can only get custom // MAIL FROM attributes for up to 100 identities at a time. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1814,7 +2164,7 @@ func (c *SES) GetIdentityNotificationAttributesRequest(input *GetIdentityNotific // Given a list of verified identities (email addresses and/or domains), returns // a structure describing identity notification attributes. // -// This action is throttled at one request per second and can only get notification +// This operation is throttled at one request per second and can only get notification // attributes for up to 100 identities at a time. // // For more information about using notifications with Amazon SES, see the Amazon @@ -1904,7 +2254,7 @@ func (c *SES) GetIdentityPoliciesRequest(input *GetIdentityPoliciesInput) (req * // other senders to use its identities. For information about using sending // authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1998,7 +2348,7 @@ func (c *SES) GetIdentityVerificationAttributesRequest(input *GetIdentityVerific // still want to verify the domain, you must restart the verification process // from the beginning. // -// This action is throttled at one request per second and can only get verification +// This operation is throttled at one request per second and can only get verification // attributes for up to 100 identities at a time. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2073,9 +2423,9 @@ func (c *SES) GetSendQuotaRequest(input *GetSendQuotaInput) (req *request.Reques // GetSendQuota API operation for Amazon Simple Email Service. // -// Returns the user's current sending limits. +// Provides the sending limits for the Amazon SES account. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2149,12 +2499,11 @@ func (c *SES) GetSendStatisticsRequest(input *GetSendStatisticsInput) (req *requ // GetSendStatistics API operation for Amazon Simple Email Service. // -// Returns the user's sending statistics. The result is a list of data points, -// representing the last two weeks of sending activity. +// Provides sending statistics for the Amazon SES account. The result is a list +// of data points, representing the last two weeks of sending activity. Each +// data point in the list contains statistics for a 15-minute period of time. // -// Each data point in the list contains statistics for a 15-minute interval. -// -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2184,6 +2533,89 @@ func (c *SES) GetSendStatisticsWithContext(ctx aws.Context, input *GetSendStatis return out, req.Send() } +const opGetTemplate = "GetTemplate" + +// GetTemplateRequest generates a "aws/request.Request" representing the +// client's request for the GetTemplate operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetTemplate for more information on using the GetTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetTemplateRequest method. +// req, resp := client.GetTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetTemplate +func (c *SES) GetTemplateRequest(input *GetTemplateInput) (req *request.Request, output *GetTemplateOutput) { + op := &request.Operation{ + Name: opGetTemplate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetTemplateInput{} + } + + output = &GetTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetTemplate API operation for Amazon Simple Email Service. +// +// Displays the template object (which includes the Subject line, HTML part +// and text part) for the template you specify. +// +// You can execute this operation no more than once per second. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation GetTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" +// Indicates that the Template object you specified does not exist in your Amazon +// SES account. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetTemplate +func (c *SES) GetTemplate(input *GetTemplateInput) (*GetTemplateOutput, error) { + req, out := c.GetTemplateRequest(input) + return out, req.Send() +} + +// GetTemplateWithContext is the same as GetTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See GetTemplate for details on how to use this API operation. +// +// 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 *SES) GetTemplateWithContext(ctx aws.Context, input *GetTemplateInput, opts ...request.Option) (*GetTemplateOutput, error) { + req, out := c.GetTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListConfigurationSets = "ListConfigurationSets" // ListConfigurationSetsRequest generates a "aws/request.Request" representing the @@ -2228,13 +2660,17 @@ func (c *SES) ListConfigurationSetsRequest(input *ListConfigurationSetsInput) (r // ListConfigurationSets API operation for Amazon Simple Email Service. // -// Lists the configuration sets associated with your AWS account. +// Provides a list of the configuration sets associated with your Amazon SES +// account. For information about using configuration sets, see Monitoring Your +// Amazon SES Sending Activity (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html) +// in the Amazon SES Developer Guide. // -// Configuration sets enable you to publish email sending events. For information -// about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// This action is throttled at one request per second and can return up to 50 -// configuration sets at a time. +// You can execute this operation no more than once per second. This operation +// will return up to 1,000 configuration sets each time it is run. If your Amazon +// SES account has more than 1,000 configuration sets, this operation will also +// return a NextToken element. You can then execute the ListConfigurationSets +// operation again, passing the NextToken parameter and the value of the NextToken +// element to retrieve additional results. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2317,7 +2753,7 @@ func (c *SES) ListIdentitiesRequest(input *ListIdentitiesInput) (req *request.Re // Returns a list containing all of the identities (email addresses and domains) // for your AWS account, regardless of verification status. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2452,7 +2888,7 @@ func (c *SES) ListIdentityPoliciesRequest(input *ListIdentityPoliciesInput) (req // other senders to use its identities. For information about using sending // authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2531,7 +2967,7 @@ func (c *SES) ListReceiptFiltersRequest(input *ListReceiptFiltersInput) (req *re // For information about managing IP address filters, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2613,7 +3049,7 @@ func (c *SES) ListReceiptRuleSetsRequest(input *ListReceiptRuleSetsInput) (req * // For information about managing receipt rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2643,6 +3079,82 @@ func (c *SES) ListReceiptRuleSetsWithContext(ctx aws.Context, input *ListReceipt return out, req.Send() } +const opListTemplates = "ListTemplates" + +// ListTemplatesRequest generates a "aws/request.Request" representing the +// client's request for the ListTemplates operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTemplates for more information on using the ListTemplates +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTemplatesRequest method. +// req, resp := client.ListTemplatesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListTemplates +func (c *SES) ListTemplatesRequest(input *ListTemplatesInput) (req *request.Request, output *ListTemplatesOutput) { + op := &request.Operation{ + Name: opListTemplates, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTemplatesInput{} + } + + output = &ListTemplatesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTemplates API operation for Amazon Simple Email Service. +// +// Lists the email templates present in your Amazon SES account. +// +// You can execute this operation no more than once per second. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation ListTemplates for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListTemplates +func (c *SES) ListTemplates(input *ListTemplatesInput) (*ListTemplatesOutput, error) { + req, out := c.ListTemplatesRequest(input) + return out, req.Send() +} + +// ListTemplatesWithContext is the same as ListTemplates with the addition of +// the ability to pass a context and additional request options. +// +// See ListTemplates for details on how to use this API operation. +// +// 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 *SES) ListTemplatesWithContext(ctx aws.Context, input *ListTemplatesInput, opts ...request.Option) (*ListTemplatesOutput, error) { + req, out := c.ListTemplatesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListVerifiedEmailAddresses = "ListVerifiedEmailAddresses" // ListVerifiedEmailAddressesRequest generates a "aws/request.Request" representing the @@ -2687,12 +3199,8 @@ func (c *SES) ListVerifiedEmailAddressesRequest(input *ListVerifiedEmailAddresse // ListVerifiedEmailAddresses API operation for Amazon Simple Email Service. // -// Returns a list containing all of the email addresses that have been verified. -// -// The ListVerifiedEmailAddresses action is deprecated as of the May 15, 2012 -// release of Domain Verification. The ListIdentities action is now preferred. -// -// This action is throttled at one request per second. +// Deprecated. Use the ListIdentities operation to list the email addresses +// and domains associated with your account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2776,7 +3284,7 @@ func (c *SES) PutIdentityPolicyRequest(input *PutIdentityPolicyInput) (req *requ // other senders to use its identities. For information about using sending // authorization, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2865,7 +3373,7 @@ func (c *SES) ReorderReceiptRuleSetRequest(input *ReorderReceiptRuleSetInput) (r // For information about managing receipt rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2957,7 +3465,7 @@ func (c *SES) SendBounceRequest(input *SendBounceInput) (req *request.Request, o // For information about receiving email through Amazon SES, see the Amazon // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2993,6 +3501,124 @@ func (c *SES) SendBounceWithContext(ctx aws.Context, input *SendBounceInput, opt return out, req.Send() } +const opSendBulkTemplatedEmail = "SendBulkTemplatedEmail" + +// SendBulkTemplatedEmailRequest generates a "aws/request.Request" representing the +// client's request for the SendBulkTemplatedEmail operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SendBulkTemplatedEmail for more information on using the SendBulkTemplatedEmail +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SendBulkTemplatedEmailRequest method. +// req, resp := client.SendBulkTemplatedEmailRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBulkTemplatedEmail +func (c *SES) SendBulkTemplatedEmailRequest(input *SendBulkTemplatedEmailInput) (req *request.Request, output *SendBulkTemplatedEmailOutput) { + op := &request.Operation{ + Name: opSendBulkTemplatedEmail, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SendBulkTemplatedEmailInput{} + } + + output = &SendBulkTemplatedEmailOutput{} + req = c.newRequest(op, input, output) + return +} + +// SendBulkTemplatedEmail API operation for Amazon Simple Email Service. +// +// Composes an email message to multiple destinations. The message body is created +// using an email template. +// +// In order to send email using the SendBulkTemplatedEmail operation, your call +// to the API must meet the following requirements: +// +// * The call must refer to an existing email template. You can create email +// templates using the CreateTemplate operation. +// +// * The message must be sent from a verified email address or domain. +// +// * If your account is still in the Amazon SES sandbox, you may only send +// to verified addresses or domains, or to email addresses associated with +// the Amazon SES Mailbox Simulator. For more information, see Verifying +// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) +// in the Amazon SES Developer Guide. +// +// * The total size of the message, including attachments, must be less than +// 10 MB. +// +// * Each Destination parameter must include at least one recipient email +// address. The recipient address can be a To: address, a CC: address, or +// a BCC: address. If a recipient email address is invalid (that is, it is +// not in the format UserName@[SubDomain.]Domain.TopLevelDomain), the entire +// message will be rejected, even if the message contains other recipients +// that are valid. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation SendBulkTemplatedEmail for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMessageRejected "MessageRejected" +// Indicates that the action failed, and the message could not be sent. Check +// the error stack for more information about what caused the error. +// +// * ErrCodeMailFromDomainNotVerifiedException "MailFromDomainNotVerifiedException" +// Indicates that the message could not be sent because Amazon SES could not +// read the MX record required to use the specified MAIL FROM domain. For information +// about editing the custom MAIL FROM domain settings for an identity, see the +// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html). +// +// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" +// Indicates that the configuration set does not exist. +// +// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" +// Indicates that the Template object you specified does not exist in your Amazon +// SES account. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBulkTemplatedEmail +func (c *SES) SendBulkTemplatedEmail(input *SendBulkTemplatedEmailInput) (*SendBulkTemplatedEmailOutput, error) { + req, out := c.SendBulkTemplatedEmailRequest(input) + return out, req.Send() +} + +// SendBulkTemplatedEmailWithContext is the same as SendBulkTemplatedEmail with the addition of +// the ability to pass a context and additional request options. +// +// See SendBulkTemplatedEmail for details on how to use this API operation. +// +// 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 *SES) SendBulkTemplatedEmailWithContext(ctx aws.Context, input *SendBulkTemplatedEmailInput, opts ...request.Option) (*SendBulkTemplatedEmailOutput, error) { + req, out := c.SendBulkTemplatedEmailRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opSendEmail = "SendEmail" // SendEmailRequest generates a "aws/request.Request" representing the @@ -3037,35 +3663,41 @@ func (c *SES) SendEmailRequest(input *SendEmailInput) (req *request.Request, out // SendEmail API operation for Amazon Simple Email Service. // -// Composes an email message based on input data, and then immediately queues -// the message for sending. +// Composes an email message and immediately queues it for sending. In order +// to send email using the SendEmail operation, your message must meet the following +// requirements: // -// There are several important points to know about SendEmail: +// * The message must be sent from a verified email address or domain. If +// you attempt to send email using a non-verified address or domain, the +// operation will result in an "Email address not verified" error. // -// * You can only send email from verified email addresses and domains; otherwise, -// you will get an "Email address not verified" error. If your account is -// still in the Amazon SES sandbox, you must also verify every recipient -// email address except for the recipients provided by the Amazon SES mailbox -// simulator. For more information, go to the Amazon SES Developer Guide -// (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). +// * If your account is still in the Amazon SES sandbox, you may only send +// to verified addresses or domains, or to email addresses associated with +// the Amazon SES Mailbox Simulator. For more information, see Verifying +// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) +// in the Amazon SES Developer Guide. // -// * The total size of the message cannot exceed 10 MB. This includes any -// attachments that are part of the message. +// * The total size of the message, including attachments, must be smaller +// than 10 MB. // -// * You must provide at least one recipient email address. The recipient -// address can be a To: address, a CC: address, or a BCC: address. If any -// email address you provide is invalid, Amazon SES rejects the entire email. +// * The message must include at least one recipient email address. The recipient +// address can be a To: address, a CC: address, or a BCC: address. If a recipient +// email address is invalid (that is, it is not in the format UserName@[SubDomain.]Domain.TopLevelDomain), +// the entire message will be rejected, even if the message contains other +// recipients that are valid. // -// * Amazon SES has a limit on the total number of recipients per message. -// The combined number of To:, CC: and BCC: email addresses cannot exceed -// 50. If you need to send an email message to a larger audience, you can -// divide your recipient list into groups of 50 or fewer, and then call Amazon -// SES repeatedly to send the message to each group. +// * The message may not include more than 50 recipients, across the To:, +// CC: and BCC: fields. If you need to send an email message to a larger +// audience, you can divide your recipient list into groups of 50 or fewer, +// and then call the SendEmail operation several times to send the message +// to each group. // -// * For every message that you send, the total number of recipients (To:, -// CC: and BCC:) is counted against your sending quota - the maximum number -// of emails you can send in a 24-hour period. For information about your -// sending quota, go to the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html). +// For every message that you send, the total number of recipients (including +// each recipient in the To:, CC: and BCC: fields) is counted against the maximum +// number of emails you can send in a 24-hour period (your sending quota). For +// more information about sending quotas in Amazon SES, see Managing Your Amazon +// SES Sending Limits (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html) +// in the Amazon SES Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3154,48 +3786,58 @@ func (c *SES) SendRawEmailRequest(input *SendRawEmailInput) (req *request.Reques // SendRawEmail API operation for Amazon Simple Email Service. // -// Sends an email message, with header and content specified by the client. -// The SendRawEmail action is useful for sending multipart MIME emails. The -// raw text of the message must comply with Internet email standards; otherwise, -// the message cannot be sent. +// Composes an email message and immediately queues it for sending. When calling +// this operation, you may specify the message headers as well as the content. +// The SendRawEmail operation is particularly useful for sending multipart MIME +// emails (such as those that contain both a plain-text and an HTML version). // -// There are several important points to know about SendRawEmail: +// In order to send email using the SendRawEmail operation, your message must +// meet the following requirements: // -// * You can only send email from verified email addresses and domains; otherwise, -// you will get an "Email address not verified" error. If your account is -// still in the Amazon SES sandbox, you must also verify every recipient -// email address except for the recipients provided by the Amazon SES mailbox -// simulator. For more information, go to the Amazon SES Developer Guide -// (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). +// * The message must be sent from a verified email address or domain. If +// you attempt to send email using a non-verified address or domain, the +// operation will result in an "Email address not verified" error. // -// * The total size of the message cannot exceed 10 MB. This includes any -// attachments that are part of the message. +// * If your account is still in the Amazon SES sandbox, you may only send +// to verified addresses or domains, or to email addresses associated with +// the Amazon SES Mailbox Simulator. For more information, see Verifying +// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) +// in the Amazon SES Developer Guide. // -// * You must provide at least one recipient email address. The recipient -// address can be a To: address, a CC: address, or a BCC: address. If any -// email address you provide is invalid, Amazon SES rejects the entire email. +// * The total size of the message, including attachments, must be smaller +// than 10 MB. // -// * Amazon SES has a limit on the total number of recipients per message. -// The combined number of To:, CC: and BCC: email addresses cannot exceed -// 50. If you need to send an email message to a larger audience, you can -// divide your recipient list into groups of 50 or fewer, and then call Amazon -// SES repeatedly to send the message to each group. +// * The message must include at least one recipient email address. The recipient +// address can be a To: address, a CC: address, or a BCC: address. If a recipient +// email address is invalid (that is, it is not in the format UserName@[SubDomain.]Domain.TopLevelDomain), +// the entire message will be rejected, even if the message contains other +// recipients that are valid. // -// * The To:, CC:, and BCC: headers in the raw message can contain a group -// list. Note that each recipient in a group list counts towards the 50-recipient -// limit. +// * The message may not include more than 50 recipients, across the To:, +// CC: and BCC: fields. If you need to send an email message to a larger +// audience, you can divide your recipient list into groups of 50 or fewer, +// and then call the SendRawEmail operation several times to send the message +// to each group. // -// * Amazon SES overrides any Message-ID and Date headers you provide. +// For every message that you send, the total number of recipients (including +// each recipient in the To:, CC: and BCC: fields) is counted against the maximum +// number of emails you can send in a 24-hour period (your sending quota). For +// more information about sending quotas in Amazon SES, see Managing Your Amazon +// SES Sending Limits (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html) +// in the Amazon SES Developer Guide. // -// * For every message that you send, the total number of recipients (To:, -// CC: and BCC:) is counted against your sending quota - the maximum number -// of emails you can send in a 24-hour period. For information about your -// sending quota, go to the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html). +// Additionally, keep the following considerations in mind when using the SendRawEmail +// operation: +// +// * Although you can customize the message headers when using the SendRawEmail +// operation, Amazon SES will automatically apply its own Message-ID and +// Date headers; if you passed these headers when creating the message, they +// will be overwritten by the values that Amazon SES provides. // // * If you are using sending authorization to send on behalf of another // user, SendRawEmail enables you to specify the cross-account identity for -// the email's "Source," "From," and "Return-Path" parameters in one of two -// ways: you can pass optional parameters SourceArn, FromArn, and/or ReturnPathArn +// the email's Source, From, and Return-Path parameters in one of two ways: +// you can pass optional parameters SourceArn, FromArn, and/or ReturnPathArn // to the API, or you can include the following X-headers in the header of // your raw email: // @@ -3205,16 +3847,16 @@ func (c *SES) SendRawEmailRequest(input *SendRawEmailInput) (req *request.Reques // // X-SES-RETURN-PATH-ARN // -// Do not include these X-headers in the DKIM signature, because they are removed -// by Amazon SES before sending the email. +// Do not include these X-headers in the DKIM signature; Amazon SES will remove +// them before sending the email. // -// For the most common sending authorization use case, we recommend that you -// specify the SourceIdentityArn and do not specify either the FromIdentityArn -// or ReturnPathIdentityArn. (The same note applies to the corresponding -// X-headers.) If you only specify the SourceIdentityArn, Amazon SES will -// simply set the "From" address and the "Return Path" address to the identity -// specified in SourceIdentityArn. For more information about sending authorization, -// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). +// For most common sending authorization scenarios, we recommend that you specify +// the SourceIdentityArn parameter and not the FromIdentityArn or ReturnPathIdentityArn +// parameters. If you only specify the SourceIdentityArn parameter, Amazon +// SES will set the From and Return Path addresses to the identity specified +// in SourceIdentityArn. For more information about sending authorization, +// see the Using Sending Authorization with Amazon SES (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html) +// in the Amazon SES Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3259,6 +3901,129 @@ func (c *SES) SendRawEmailWithContext(ctx aws.Context, input *SendRawEmailInput, return out, req.Send() } +const opSendTemplatedEmail = "SendTemplatedEmail" + +// SendTemplatedEmailRequest generates a "aws/request.Request" representing the +// client's request for the SendTemplatedEmail operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SendTemplatedEmail for more information on using the SendTemplatedEmail +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SendTemplatedEmailRequest method. +// req, resp := client.SendTemplatedEmailRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendTemplatedEmail +func (c *SES) SendTemplatedEmailRequest(input *SendTemplatedEmailInput) (req *request.Request, output *SendTemplatedEmailOutput) { + op := &request.Operation{ + Name: opSendTemplatedEmail, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SendTemplatedEmailInput{} + } + + output = &SendTemplatedEmailOutput{} + req = c.newRequest(op, input, output) + return +} + +// SendTemplatedEmail API operation for Amazon Simple Email Service. +// +// Composes an email message using an email template and immediately queues +// it for sending. +// +// In order to send email using the SendTemplatedEmail operation, your call +// to the API must meet the following requirements: +// +// * The call must refer to an existing email template. You can create email +// templates using the CreateTemplate operation. +// +// * The message must be sent from a verified email address or domain. +// +// * If your account is still in the Amazon SES sandbox, you may only send +// to verified addresses or domains, or to email addresses associated with +// the Amazon SES Mailbox Simulator. For more information, see Verifying +// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) +// in the Amazon SES Developer Guide. +// +// * The total size of the message, including attachments, must be less than +// 10 MB. +// +// * Calls to the SendTemplatedEmail operation may only include one Destination +// parameter. A destination is a set of recipients who will receive the same +// version of the email. The Destination parameter can include up to 50 recipients, +// across the To:, CC: and BCC: fields. +// +// * The Destination parameter must include at least one recipient email +// address. The recipient address can be a To: address, a CC: address, or +// a BCC: address. If a recipient email address is invalid (that is, it is +// not in the format UserName@[SubDomain.]Domain.TopLevelDomain), the entire +// message will be rejected, even if the message contains other recipients +// that are valid. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation SendTemplatedEmail for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMessageRejected "MessageRejected" +// Indicates that the action failed, and the message could not be sent. Check +// the error stack for more information about what caused the error. +// +// * ErrCodeMailFromDomainNotVerifiedException "MailFromDomainNotVerifiedException" +// Indicates that the message could not be sent because Amazon SES could not +// read the MX record required to use the specified MAIL FROM domain. For information +// about editing the custom MAIL FROM domain settings for an identity, see the +// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html). +// +// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" +// Indicates that the configuration set does not exist. +// +// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" +// Indicates that the Template object you specified does not exist in your Amazon +// SES account. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendTemplatedEmail +func (c *SES) SendTemplatedEmail(input *SendTemplatedEmailInput) (*SendTemplatedEmailOutput, error) { + req, out := c.SendTemplatedEmailRequest(input) + return out, req.Send() +} + +// SendTemplatedEmailWithContext is the same as SendTemplatedEmail with the addition of +// the ability to pass a context and additional request options. +// +// See SendTemplatedEmail for details on how to use this API operation. +// +// 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 *SES) SendTemplatedEmailWithContext(ctx aws.Context, input *SendTemplatedEmailInput, opts ...request.Option) (*SendTemplatedEmailOutput, error) { + req, out := c.SendTemplatedEmailRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opSetActiveReceiptRuleSet = "SetActiveReceiptRuleSet" // SetActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the @@ -3311,7 +4076,7 @@ func (c *SES) SetActiveReceiptRuleSetRequest(input *SetActiveReceiptRuleSetInput // For information about managing receipt rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3392,18 +4157,19 @@ func (c *SES) SetIdentityDkimEnabledRequest(input *SetIdentityDkimEnabledInput) // // Enables or disables Easy DKIM signing of email sent from an identity: // -// * If Easy DKIM signing is enabled for a domain name identity (e.g., example.com), -// then Amazon SES will DKIM-sign all email sent by addresses under that -// domain name (e.g., user@example.com). +// * If Easy DKIM signing is enabled for a domain name identity (such as +// example.com), then Amazon SES will DKIM-sign all email sent by addresses +// under that domain name (for example, user@example.com). // // * If Easy DKIM signing is enabled for an email address, then Amazon SES // will DKIM-sign all email sent by that email address. // -// For email addresses (e.g., user@example.com), you can only enable Easy DKIM -// signing if the corresponding domain (e.g., example.com) has been set up for -// Easy DKIM using the AWS Console or the VerifyDomainDkim action. +// For email addresses (for example, user@example.com), you can only enable +// Easy DKIM signing if the corresponding domain (in this case, example.com) +// has been set up for Easy DKIM using the AWS Console or the VerifyDomainDkim +// operation. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // For more information about Easy DKIM signing, go to the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html). @@ -3488,7 +4254,7 @@ func (c *SES) SetIdentityFeedbackForwardingEnabledRequest(input *SetIdentityFeed // Feedback forwarding does not apply to delivery notifications. Delivery notifications // are only available through Amazon SNS. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // For more information about using notifications with Amazon SES, see the Amazon // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html). @@ -3569,7 +4335,7 @@ func (c *SES) SetIdentityHeadersInNotificationsEnabledRequest(input *SetIdentity // includes the original email headers in the Amazon Simple Notification Service // (Amazon SNS) notifications of a specified type. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // For more information about using notifications with Amazon SES, see the Amazon // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html). @@ -3654,7 +4420,7 @@ func (c *SES) SetIdentityMailFromDomainRequest(input *SetIdentityMailFromDomainI // Sender Policy Framework (SPF) checks, you must also add or update an SPF // record. For more information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-set.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3736,7 +4502,7 @@ func (c *SES) SetIdentityNotificationTopicRequest(input *SetIdentityNotification // Unless feedback forwarding is enabled, you must specify Amazon SNS topics // for bounce and complaint notifications. For more information, see SetIdentityFeedbackForwardingEnabled. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // For more information about feedback notification, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html). @@ -3818,7 +4584,7 @@ func (c *SES) SetReceiptRulePositionRequest(input *SetReceiptRulePositionInput) // For information about managing receipt rules, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3856,6 +4622,98 @@ func (c *SES) SetReceiptRulePositionWithContext(ctx aws.Context, input *SetRecei return out, req.Send() } +const opTestRenderTemplate = "TestRenderTemplate" + +// TestRenderTemplateRequest generates a "aws/request.Request" representing the +// client's request for the TestRenderTemplate operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TestRenderTemplate for more information on using the TestRenderTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TestRenderTemplateRequest method. +// req, resp := client.TestRenderTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TestRenderTemplate +func (c *SES) TestRenderTemplateRequest(input *TestRenderTemplateInput) (req *request.Request, output *TestRenderTemplateOutput) { + op := &request.Operation{ + Name: opTestRenderTemplate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TestRenderTemplateInput{} + } + + output = &TestRenderTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// TestRenderTemplate API operation for Amazon Simple Email Service. +// +// Creates a preview of the MIME content of an email when provided with a template +// and a set of replacement data. +// +// You can execute this operation no more than once per second. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation TestRenderTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" +// Indicates that the Template object you specified does not exist in your Amazon +// SES account. +// +// * ErrCodeInvalidRenderingParameterException "InvalidRenderingParameter" +// Indicates that one or more of the replacement values you provided is invalid. +// This error may occur when the TemplateData object contains invalid JSON. +// +// * ErrCodeMissingRenderingAttributeException "MissingRenderingAttribute" +// Indicates that one or more of the replacement values for the specified template +// was not specified. Ensure that the TemplateData object contains references +// to all of the replacement tags in the specified template. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TestRenderTemplate +func (c *SES) TestRenderTemplate(input *TestRenderTemplateInput) (*TestRenderTemplateOutput, error) { + req, out := c.TestRenderTemplateRequest(input) + return out, req.Send() +} + +// TestRenderTemplateWithContext is the same as TestRenderTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See TestRenderTemplate for details on how to use this API operation. +// +// 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 *SES) TestRenderTemplateWithContext(ctx aws.Context, input *TestRenderTemplateInput, opts ...request.Option) (*TestRenderTemplateOutput, error) { + req, out := c.TestRenderTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateConfigurationSetEventDestination = "UpdateConfigurationSetEventDestination" // UpdateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the @@ -3900,18 +4758,18 @@ func (c *SES) UpdateConfigurationSetEventDestinationRequest(input *UpdateConfigu // UpdateConfigurationSetEventDestination API operation for Amazon Simple Email Service. // -// Updates the event destination of a configuration set. +// Updates the event destination of a configuration set. Event destinations +// are associated with configuration sets, which enable you to publish email +// sending events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple +// Notification Service (Amazon SNS). For information about using configuration +// sets, see Monitoring Your Amazon SES Sending Activity (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html) +// in the Amazon SES Developer Guide. // // When you create or update an event destination, you must provide one, and // only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis // Firehose, or Amazon Simple Notification Service (Amazon SNS). // -// Event destinations are associated with configuration sets, which enable you -// to publish email sending events to Amazon CloudWatch, Amazon Kinesis Firehose, -// or Amazon Simple Notification Service (Amazon SNS). For information about -// using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). -// -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3961,6 +4819,103 @@ func (c *SES) UpdateConfigurationSetEventDestinationWithContext(ctx aws.Context, return out, req.Send() } +const opUpdateConfigurationSetTrackingOptions = "UpdateConfigurationSetTrackingOptions" + +// UpdateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateConfigurationSetTrackingOptions operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateConfigurationSetTrackingOptions for more information on using the UpdateConfigurationSetTrackingOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateConfigurationSetTrackingOptionsRequest method. +// req, resp := client.UpdateConfigurationSetTrackingOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetTrackingOptions +func (c *SES) UpdateConfigurationSetTrackingOptionsRequest(input *UpdateConfigurationSetTrackingOptionsInput) (req *request.Request, output *UpdateConfigurationSetTrackingOptionsOutput) { + op := &request.Operation{ + Name: opUpdateConfigurationSetTrackingOptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateConfigurationSetTrackingOptionsInput{} + } + + output = &UpdateConfigurationSetTrackingOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateConfigurationSetTrackingOptions API operation for Amazon Simple Email Service. +// +// Modifies an association between a configuration set and a custom domain for +// open and click event tracking. +// +// By default, images and links used for tracking open and click events are +// hosted on domains operated by Amazon SES. You can configure a subdomain of +// your own to handle these events. For information about using configuration +// sets, see Configuring Custom Domains to Handle Open and Click Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) +// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation UpdateConfigurationSetTrackingOptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConfigurationSetDoesNotExistException "ConfigurationSetDoesNotExist" +// Indicates that the configuration set does not exist. +// +// * ErrCodeTrackingOptionsDoesNotExistException "TrackingOptionsDoesNotExistException" +// Indicates that the TrackingOptions object you specified does not exist. +// +// * ErrCodeInvalidTrackingOptionsException "InvalidTrackingOptions" +// Indicates that the custom domain to be used for open and click tracking redirects +// is invalid. This error appears most often in the following situations: +// +// * When the tracking domain you specified is not verified in Amazon SES. +// +// * When the tracking domain you specified is not a valid domain or subdomain. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetTrackingOptions +func (c *SES) UpdateConfigurationSetTrackingOptions(input *UpdateConfigurationSetTrackingOptionsInput) (*UpdateConfigurationSetTrackingOptionsOutput, error) { + req, out := c.UpdateConfigurationSetTrackingOptionsRequest(input) + return out, req.Send() +} + +// UpdateConfigurationSetTrackingOptionsWithContext is the same as UpdateConfigurationSetTrackingOptions with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateConfigurationSetTrackingOptions for details on how to use this API operation. +// +// 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 *SES) UpdateConfigurationSetTrackingOptionsWithContext(ctx aws.Context, input *UpdateConfigurationSetTrackingOptionsInput, opts ...request.Option) (*UpdateConfigurationSetTrackingOptionsOutput, error) { + req, out := c.UpdateConfigurationSetTrackingOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateReceiptRule = "UpdateReceiptRule" // UpdateReceiptRuleRequest generates a "aws/request.Request" representing the @@ -4010,7 +4965,7 @@ func (c *SES) UpdateReceiptRuleRequest(input *UpdateReceiptRuleInput) (req *requ // For information about managing receipt rules, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html). // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4069,6 +5024,94 @@ func (c *SES) UpdateReceiptRuleWithContext(ctx aws.Context, input *UpdateReceipt return out, req.Send() } +const opUpdateTemplate = "UpdateTemplate" + +// UpdateTemplateRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTemplate operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTemplate for more information on using the UpdateTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTemplateRequest method. +// req, resp := client.UpdateTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateTemplate +func (c *SES) UpdateTemplateRequest(input *UpdateTemplateInput) (req *request.Request, output *UpdateTemplateOutput) { + op := &request.Operation{ + Name: opUpdateTemplate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTemplateInput{} + } + + output = &UpdateTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTemplate API operation for Amazon Simple Email Service. +// +// Updates an email template. Email templates enable you to send personalized +// email to one or more destinations in a single API operation. For more information, +// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). +// +// You can execute this operation no more than once per second. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Email Service's +// API operation UpdateTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTemplateDoesNotExistException "TemplateDoesNotExist" +// Indicates that the Template object you specified does not exist in your Amazon +// SES account. +// +// * ErrCodeInvalidTemplateException "InvalidTemplate" +// Indicates that a template could not be created because it contained invalid +// JSON. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateTemplate +func (c *SES) UpdateTemplate(input *UpdateTemplateInput) (*UpdateTemplateOutput, error) { + req, out := c.UpdateTemplateRequest(input) + return out, req.Send() +} + +// UpdateTemplateWithContext is the same as UpdateTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTemplate for details on how to use this API operation. +// +// 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 *SES) UpdateTemplateWithContext(ctx aws.Context, input *UpdateTemplateInput, opts ...request.Option) (*UpdateTemplateOutput, error) { + req, out := c.UpdateTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opVerifyDomainDkim = "VerifyDomainDkim" // VerifyDomainDkimRequest generates a "aws/request.Request" representing the @@ -4121,10 +5164,10 @@ func (c *SES) VerifyDomainDkimRequest(input *VerifyDomainDkimInput) (req *reques // detection, Amazon SES will be able to DKIM-sign email originating from that // domain. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // To enable or disable Easy DKIM signing for a domain, use the SetIdentityDkimEnabled -// action. +// operation. // // For more information about creating DNS records using DKIM tokens, go to // the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html). @@ -4201,9 +5244,12 @@ func (c *SES) VerifyDomainIdentityRequest(input *VerifyDomainIdentityInput) (req // VerifyDomainIdentity API operation for Amazon Simple Email Service. // -// Verifies a domain. +// Adds a domain to the list of identities for your Amazon SES account and attempts +// to verify it. For more information about verifying domains, see Verifying +// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) +// in the Amazon SES Developer Guide. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4279,13 +5325,7 @@ func (c *SES) VerifyEmailAddressRequest(input *VerifyEmailAddressInput) (req *re // VerifyEmailAddress API operation for Amazon Simple Email Service. // -// Verifies an email address. This action causes a confirmation email message -// to be sent to the specified address. -// -// The VerifyEmailAddress action is deprecated as of the May 15, 2012 release -// of Domain Verification. The VerifyEmailIdentity action is now preferred. -// -// This action is throttled at one request per second. +// Deprecated. Use the VerifyEmailIdentity operation to verify a new email address. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4359,10 +5399,11 @@ func (c *SES) VerifyEmailIdentityRequest(input *VerifyEmailIdentityInput) (req * // VerifyEmailIdentity API operation for Amazon Simple Email Service. // -// Verifies an email address. This action causes a confirmation email message +// Adds an email address to the list of identities for your Amazon SES account +// and attempts to verify it. This operation causes a confirmation email message // to be sent to the specified address. // -// This action is throttled at one request per second. +// You can execute this operation no more than once per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4687,6 +5728,166 @@ func (s *BouncedRecipientInfo) SetRecipientDsnFields(v *RecipientDsnFields) *Bou return s } +// An array that contains one or more Destinations, as well as the tags and +// replacement data associated with each of those Destinations. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/BulkEmailDestination +type BulkEmailDestination struct { + _ struct{} `type:"structure"` + + // Represents the destination of the message, consisting of To:, CC:, and BCC: + // fields. + // + // By default, the string must be 7-bit ASCII. If the text must contain any + // other characters, then you must use MIME encoded-word syntax (RFC 2047) instead + // of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. + // For more information, see RFC 2047 (https://tools.ietf.org/html/rfc2047). + // + // Destination is a required field + Destination *Destination `type:"structure" required:"true"` + + // A list of tags, in the form of name/value pairs, to apply to an email that + // you send using SendBulkTemplatedEmail. Tags correspond to characteristics + // of the email that you define, so that you can publish email sending events. + ReplacementTags []*MessageTag `type:"list"` + + // A list of replacement values to apply to the template. This parameter is + // a JSON object, typically consisting of key-value pairs in which the keys + // correspond to replacement tags in the email template. + ReplacementTemplateData *string `type:"string"` +} + +// String returns the string representation +func (s BulkEmailDestination) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BulkEmailDestination) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BulkEmailDestination) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BulkEmailDestination"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.ReplacementTags != nil { + for i, v := range s.ReplacementTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplacementTags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestination sets the Destination field's value. +func (s *BulkEmailDestination) SetDestination(v *Destination) *BulkEmailDestination { + s.Destination = v + return s +} + +// SetReplacementTags sets the ReplacementTags field's value. +func (s *BulkEmailDestination) SetReplacementTags(v []*MessageTag) *BulkEmailDestination { + s.ReplacementTags = v + return s +} + +// SetReplacementTemplateData sets the ReplacementTemplateData field's value. +func (s *BulkEmailDestination) SetReplacementTemplateData(v string) *BulkEmailDestination { + s.ReplacementTemplateData = &v + return s +} + +// An object that contains the response from the SendBulkTemplatedEmail operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/BulkEmailDestinationStatus +type BulkEmailDestinationStatus struct { + _ struct{} `type:"structure"` + + // A description of an error that prevented a message being sent using the SendBulkTemplatedEmail + // operation. + Error *string `type:"string"` + + // The unique message identifier returned from the SendBulkTemplatedEmail operation. + MessageId *string `type:"string"` + + // The status of a message sent using the SendBulkTemplatedEmail operation. + // + // Possible values for this parameter include: + // + // * Success: Amazon SES accepted the message, and will attempt to deliver + // it to the recipients. + // + // * MessageRejected: The message was rejected because it contained a virus. + // + // * MailFromDomainNotVerified: The sender's email address or domain was + // not verified. + // + // * ConfigurationSetDoesNotExist: The configuration set you specified does + // not exist. + // + // * TemplateDoesNotExist: The template you specified does not exist. + // + // * AccountSuspended: Your account has been shut down because of issues + // related to your email sending practices. + // + // * AccountThrottled: The number of emails you can send has been reduced + // because your account has exceeded its allocated sending limit. + // + // * AccountDailyQuotaExceeded: You have reached or exceeded the maximum + // number of emails you can send from your account in a 24-hour period. + // + // * InvalidSendingPoolName: The configuration set you specified refers to + // an IP pool that does not exist. + // + // * InvalidParameterValue: One or more of the parameters you specified when + // calling this operation was invalid. See the error message for additional + // information. + // + // * TransientFailure: Amazon SES was unable to process your request because + // of a temporary issue. + // + // * Failed: Amazon SES was unable to process your request. See the error + // message for additional information. + Status *string `type:"string" enum:"BulkEmailStatus"` +} + +// String returns the string representation +func (s BulkEmailDestinationStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BulkEmailDestinationStatus) GoString() string { + return s.String() +} + +// SetError sets the Error field's value. +func (s *BulkEmailDestinationStatus) SetError(v string) *BulkEmailDestinationStatus { + s.Error = &v + return s +} + +// SetMessageId sets the MessageId field's value. +func (s *BulkEmailDestinationStatus) SetMessageId(v string) *BulkEmailDestinationStatus { + s.MessageId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *BulkEmailDestinationStatus) SetStatus(v string) *BulkEmailDestinationStatus { + s.Status = &v + return s +} + // Represents a request to create a receipt rule set by cloning an existing // one. You use receipt rule sets to receive email with Amazon SES. For more // information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). @@ -4913,18 +6114,20 @@ func (s *CloudWatchDimensionConfiguration) SetDimensionValueSource(v string) *Cl // The name of the configuration set. // -// Configuration sets enable you to publish email sending events. For information -// about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). +// Configuration sets let you create groups of rules that you can apply to the +// emails you send using Amazon SES. For more information about using configuration +// sets, see Using Amazon SES Configuration Sets (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets.html) +// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/). // Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ConfigurationSet type ConfigurationSet struct { _ struct{} `type:"structure"` - // The name of the configuration set. The name must: + // The name of the configuration set. The name must meet the following requirements: // - // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), - // or dashes (-). + // * Contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or + // dashes (-). // - // * Contain less than 64 characters. + // * Contain 64 characters or fewer. // // Name is a required field Name *string `type:"string" required:"true"` @@ -5021,13 +6224,14 @@ func (s *Content) SetData(v string) *Content { type CreateConfigurationSetEventDestinationInput struct { _ struct{} `type:"structure"` - // The name of the configuration set to which to apply the event destination. + // The name of the configuration set that the event destination should be associated + // with. // // ConfigurationSetName is a required field ConfigurationSetName *string `type:"string" required:"true"` - // An object that describes the AWS service to which Amazon SES will publish - // the email sending events associated with the specified configuration set. + // An object that describes the AWS service that email sending event information + // will be published to. // // EventDestination is a required field EventDestination *EventDestination `type:"structure" required:"true"` @@ -5155,6 +6359,84 @@ func (s CreateConfigurationSetOutput) GoString() string { return s.String() } +// Represents a request to create an open and click tracking option object in +// a configuration set. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetTrackingOptionsRequest +type CreateConfigurationSetTrackingOptionsInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration set that the tracking options should be associated + // with. + // + // ConfigurationSetName is a required field + ConfigurationSetName *string `type:"string" required:"true"` + + // A domain that is used to redirect email recipients to an Amazon SES-operated + // domain. This domain captures open and click events generated by Amazon SES + // emails. + // + // For more information, see Configuring Custom Domains to Handle Open and Click + // Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) + // in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). + // + // TrackingOptions is a required field + TrackingOptions *TrackingOptions `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateConfigurationSetTrackingOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConfigurationSetTrackingOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateConfigurationSetTrackingOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateConfigurationSetTrackingOptionsInput"} + if s.ConfigurationSetName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) + } + if s.TrackingOptions == nil { + invalidParams.Add(request.NewErrParamRequired("TrackingOptions")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationSetName sets the ConfigurationSetName field's value. +func (s *CreateConfigurationSetTrackingOptionsInput) SetConfigurationSetName(v string) *CreateConfigurationSetTrackingOptionsInput { + s.ConfigurationSetName = &v + return s +} + +// SetTrackingOptions sets the TrackingOptions field's value. +func (s *CreateConfigurationSetTrackingOptionsInput) SetTrackingOptions(v *TrackingOptions) *CreateConfigurationSetTrackingOptionsInput { + s.TrackingOptions = v + return s +} + +// An empty element returned on a successful request. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetTrackingOptionsResponse +type CreateConfigurationSetTrackingOptionsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateConfigurationSetTrackingOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConfigurationSetTrackingOptionsOutput) GoString() string { + return s.String() +} + // Represents a request to create a new IP address filter. You use IP address // filters when you receive email with Amazon SES. For more information, see // the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). @@ -5237,7 +6519,7 @@ type CreateReceiptRuleInput struct { // Rule is a required field Rule *ReceiptRule `type:"structure" required:"true"` - // The name of the rule set to which to add the rule. + // The name of the rule set that the receipt rule will be added to. // // RuleSetName is a required field RuleSetName *string `type:"string" required:"true"` @@ -5373,6 +6655,68 @@ func (s CreateReceiptRuleSetOutput) GoString() string { return s.String() } +// Represents a request to create an email template. For more information, see +// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateTemplateRequest +type CreateTemplateInput struct { + _ struct{} `type:"structure"` + + // The content of the email, composed of a subject line, an HTML part, and a + // text-only part. + // + // Template is a required field + Template *Template `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTemplateInput"} + if s.Template == nil { + invalidParams.Add(request.NewErrParamRequired("Template")) + } + if s.Template != nil { + if err := s.Template.Validate(); err != nil { + invalidParams.AddNested("Template", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTemplate sets the Template field's value. +func (s *CreateTemplateInput) SetTemplate(v *Template) *CreateTemplateInput { + s.Template = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateTemplateResponse +type CreateTemplateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTemplateOutput) GoString() string { + return s.String() +} + // Represents a request to delete a configuration set event destination. Configuration // set event destinations are associated with configuration sets, which enable // you to publish email sending events. For information about using configuration @@ -5504,6 +6848,64 @@ func (s DeleteConfigurationSetOutput) GoString() string { return s.String() } +// Represents a request to delete open and click tracking options in a configuration +// set. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetTrackingOptionsRequest +type DeleteConfigurationSetTrackingOptionsInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration set from which you want to delete the tracking + // options. + // + // ConfigurationSetName is a required field + ConfigurationSetName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteConfigurationSetTrackingOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConfigurationSetTrackingOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteConfigurationSetTrackingOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationSetTrackingOptionsInput"} + if s.ConfigurationSetName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationSetName sets the ConfigurationSetName field's value. +func (s *DeleteConfigurationSetTrackingOptionsInput) SetConfigurationSetName(v string) *DeleteConfigurationSetTrackingOptionsInput { + s.ConfigurationSetName = &v + return s +} + +// An empty element returned on a successful request. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetTrackingOptionsResponse +type DeleteConfigurationSetTrackingOptionsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteConfigurationSetTrackingOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConfigurationSetTrackingOptionsOutput) GoString() string { + return s.String() +} + // Represents a request to delete one of your Amazon SES identities (an email // address or domain). // Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteIdentityRequest @@ -5829,6 +7231,62 @@ func (s DeleteReceiptRuleSetOutput) GoString() string { return s.String() } +// Represents a request to delete an email template. For more information, see +// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteTemplateRequest +type DeleteTemplateInput struct { + _ struct{} `type:"structure"` + + // The name of the template to be deleted. + // + // TemplateName is a required field + TemplateName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTemplateInput"} + if s.TemplateName == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTemplateName sets the TemplateName field's value. +func (s *DeleteTemplateInput) SetTemplateName(v string) *DeleteTemplateInput { + s.TemplateName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteTemplateResponse +type DeleteTemplateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTemplateOutput) GoString() string { + return s.String() +} + // Represents a request to delete an email address from the list of email addresses // you have attempted to verify under your AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteVerifiedEmailAddressRequest @@ -6004,6 +7462,10 @@ type DescribeConfigurationSetOutput struct { // A list of event destinations associated with the configuration set. EventDestinations []*EventDestination `type:"list"` + + // The name of the custom open and click tracking domain associated with the + // configuration set. + TrackingOptions *TrackingOptions `type:"structure"` } // String returns the string representation @@ -6028,6 +7490,12 @@ func (s *DescribeConfigurationSetOutput) SetEventDestinations(v []*EventDestinat return s } +// SetTrackingOptions sets the TrackingOptions field's value. +func (s *DescribeConfigurationSetOutput) SetTrackingOptions(v *TrackingOptions) *DescribeConfigurationSetOutput { + s.TrackingOptions = v + return s +} + // Represents a request to return the details of a receipt rule. You use receipt // rules to receive email with Amazon SES. For more information, see the Amazon // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). @@ -6040,7 +7508,7 @@ type DescribeReceiptRuleInput struct { // RuleName is a required field RuleName *string `type:"string" required:"true"` - // The name of the receipt rule set to which the receipt rule belongs. + // The name of the receipt rule set that the receipt rule belongs to. // // RuleSetName is a required field RuleSetName *string `type:"string" required:"true"` @@ -6194,7 +7662,7 @@ func (s *DescribeReceiptRuleSetOutput) SetRules(v []*ReceiptRule) *DescribeRecei // By default, the string must be 7-bit ASCII. If the text must contain any // other characters, then you must use MIME encoded-word syntax (RFC 2047) instead // of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. -// For more information, see RFC 2047 (http://tools.ietf.org/html/rfc2047). +// For more information, see RFC 2047 (https://tools.ietf.org/html/rfc2047). // Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/Destination type Destination struct { _ struct{} `type:"structure"` @@ -6237,8 +7705,8 @@ func (s *Destination) SetToAddresses(v []*string) *Destination { return s } -// Contains information about the event destination to which the specified email -// sending events are published. +// Contains information about the event destination that the specified email +// sending events will be published to. // // When you create or update an event destination, you must provide one, and // only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis @@ -6904,6 +8372,70 @@ func (s *GetSendStatisticsOutput) SetSendDataPoints(v []*SendDataPoint) *GetSend return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetTemplateRequest +type GetTemplateInput struct { + _ struct{} `type:"structure"` + + // The name of the template you want to retrieve. + // + // TemplateName is a required field + TemplateName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTemplateInput"} + if s.TemplateName == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTemplateName sets the TemplateName field's value. +func (s *GetTemplateInput) SetTemplateName(v string) *GetTemplateInput { + s.TemplateName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetTemplateResponse +type GetTemplateOutput struct { + _ struct{} `type:"structure"` + + // The content of the email, composed of a subject line, an HTML part, and a + // text-only part. + Template *Template `type:"structure"` +} + +// String returns the string representation +func (s GetTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTemplateOutput) GoString() string { + return s.String() +} + +// SetTemplate sets the Template field's value. +func (s *GetTemplateOutput) SetTemplate(v *Template) *GetTemplateOutput { + s.Template = v + return s +} + // Represents the DKIM attributes of a verified email address or a domain. // Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/IdentityDkimAttributes type IdentityDkimAttributes struct { @@ -7178,8 +8710,8 @@ func (s *IdentityVerificationAttributes) SetVerificationToken(v string) *Identit type KinesisFirehoseDestination struct { _ struct{} `type:"structure"` - // The ARN of the Amazon Kinesis Firehose stream to which to publish email sending - // events. + // The ARN of the Amazon Kinesis Firehose stream that email sending events should + // be published to. // // DeliveryStreamARN is a required field DeliveryStreamARN *string `type:"string" required:"true"` @@ -7653,6 +9185,76 @@ func (s *ListReceiptRuleSetsOutput) SetRuleSets(v []*ReceiptRuleSetMetadata) *Li return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListTemplatesRequest +type ListTemplatesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of templates to return. This value must be at least 1 + // and less than or equal to 10. If you do not specify a value, or if you specify + // a value less than 1 or greater than 10, the operation will return up to 10 + // results. + MaxItems *int64 `type:"integer"` + + // The token to use for pagination. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListTemplatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTemplatesInput) GoString() string { + return s.String() +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListTemplatesInput) SetMaxItems(v int64) *ListTemplatesInput { + s.MaxItems = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTemplatesInput) SetNextToken(v string) *ListTemplatesInput { + s.NextToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListTemplatesResponse +type ListTemplatesOutput struct { + _ struct{} `type:"structure"` + + // The token to use for pagination. + NextToken *string `type:"string"` + + // An array the contains the name of creation time stamp for each template in + // your Amazon SES account. + TemplatesMetadata []*TemplateMetadata `type:"list"` +} + +// String returns the string representation +func (s ListTemplatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTemplatesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTemplatesOutput) SetNextToken(v string) *ListTemplatesOutput { + s.NextToken = &v + return s +} + +// SetTemplatesMetadata sets the TemplatesMetadata field's value. +func (s *ListTemplatesOutput) SetTemplatesMetadata(v []*TemplateMetadata) *ListTemplatesOutput { + s.TemplatesMetadata = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListVerifiedEmailAddressesInput type ListVerifiedEmailAddressesInput struct { _ struct{} `type:"structure"` @@ -7911,8 +9513,8 @@ func (s *MessageTag) SetValue(v string) *MessageTag { type PutIdentityPolicyInput struct { _ struct{} `type:"structure"` - // The identity to which the policy will apply. You can specify an identity - // by using its name or by using its Amazon Resource Name (ARN). Examples: user@example.com, + // The identity that the policy will apply to. You can specify an identity by + // using its name or by using its Amazon Resource Name (ARN). Examples: user@example.com, // example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. // // To successfully call this API, you must own the identity. @@ -8335,8 +9937,8 @@ func (s *ReceiptIpFilter) SetPolicy(v string) *ReceiptIpFilter { // when it receives mail on behalf of one or more email addresses or domains // that you own. // -// Each receipt rule defines a set of email addresses or domains to which it -// applies. If the email addresses or domains match at least one recipient address +// Each receipt rule defines a set of email addresses or domains that it applies +// to. If the email addresses or domains match at least one recipient address // of the message, Amazon SES executes all of the receipt rule's actions on // the message. // @@ -8365,12 +9967,12 @@ type ReceiptRule struct { // Name is a required field Name *string `type:"string" required:"true"` - // The recipient domains and email addresses to which the receipt rule applies. + // The recipient domains and email addresses that the receipt rule applies to. // If this field is not specified, this rule will match all recipients under // all verified domains. Recipients []*string `type:"list"` - // If true, then messages to which this receipt rule applies are scanned for + // If true, then messages that this receipt rule applies to are scanned for // spam and viruses. The default value is false. ScanEnabled *bool `type:"boolean"` @@ -8521,7 +10123,7 @@ type RecipientDsnFields struct { // Additional X-headers to include in the DSN. ExtensionFields []*ExtensionField `type:"list"` - // The email address to which the message was ultimately delivered. This corresponds + // The email address that the message was ultimately delivered to. This corresponds // to the Final-Recipient in the DSN. If not specified, FinalRecipient will // be set to the Recipient specified in the BouncedRecipientInfo structure. // Either FinalRecipient or the recipient in BouncedRecipientInfo must be a @@ -8717,7 +10319,7 @@ func (s ReorderReceiptRuleSetOutput) GoString() string { type S3Action struct { _ struct{} `type:"structure"` - // The name of the Amazon S3 bucket to which to save the received email. + // The name of the Amazon S3 bucket that incoming email will be saved to. // // BucketName is a required field BucketName *string `type:"string" required:"true"` @@ -8750,7 +10352,7 @@ type S3Action struct { // This encryption client is currently available with the AWS Java SDK (http://aws.amazon.com/sdk-for-java/) // and AWS Ruby SDK (http://aws.amazon.com/sdk-for-ruby/) only. For more information // about client-side encryption using AWS KMS master keys, see the Amazon S3 - // Developer Guide (http://alpha-docs-aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html). + // Developer Guide (AmazonS3/latest/dev/UsingClientSideEncryption.html). KmsKeyArn *string `type:"string"` // The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory @@ -8894,10 +10496,10 @@ func (s *SNSAction) SetTopicArn(v string) *SNSAction { type SNSDestination struct { _ struct{} `type:"structure"` - // The ARN of the Amazon SNS topic to which you want to publish email sending - // events. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. + // The ARN of the Amazon SNS topic that email sending events will be published + // to. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. // For more information about Amazon SNS topics, see the Amazon SNS Developer - // Guide (http://docs.aws.amazon.com/http:/alpha-docs-aws.amazon.com/sns/latest/dg/CreateTopic.html). + // Guide (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html). // // TopicARN is a required field TopicARN *string `type:"string" required:"true"` @@ -9077,6 +10679,242 @@ func (s *SendBounceOutput) SetMessageId(v string) *SendBounceOutput { return s } +// Represents a request to send a templated email to multiple destinations using +// Amazon SES. For more information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBulkTemplatedEmailRequest +type SendBulkTemplatedEmailInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration set to use when you send an email using SendBulkTemplatedEmail. + ConfigurationSetName *string `type:"string"` + + // A list of tags, in the form of name/value pairs, to apply to an email that + // you send to a destination using SendBulkTemplatedEmail. + DefaultTags []*MessageTag `type:"list"` + + // A list of replacement values to apply to the template when replacement data + // is not specified in a Destination object. These values act as a default or + // fallback option when no other data is available. + // + // The template data is a JSON object, typically consisting of key-value pairs + // in which the keys correspond to replacement tags in the email template. + DefaultTemplateData *string `type:"string"` + + // One or more Destination objects. All of the recipients in a Destination will + // receive the same version of the email. You can specify up to 50 Destination + // objects within a Destinations array. + // + // Destinations is a required field + Destinations []*BulkEmailDestination `type:"list" required:"true"` + + // The reply-to email address(es) for the message. If the recipient replies + // to the message, each reply-to address will receive the reply. + ReplyToAddresses []*string `type:"list"` + + // The email address that bounces and complaints will be forwarded to when feedback + // forwarding is enabled. If the message cannot be delivered to the recipient, + // then an error message will be returned from the recipient's ISP; this message + // will then be forwarded to the email address specified by the ReturnPath parameter. + // The ReturnPath parameter is never overwritten. This email address must be + // either individually verified with Amazon SES, or from a domain that has been + // verified with Amazon SES. + ReturnPath *string `type:"string"` + + // This parameter is used only for sending authorization. It is the ARN of the + // identity that is associated with the sending authorization policy that permits + // you to use the email address specified in the ReturnPath parameter. + // + // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) + // attaches a policy to it that authorizes you to use feedback@example.com, + // then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, + // and the ReturnPath to be feedback@example.com. + // + // For more information about sending authorization, see the Amazon SES Developer + // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). + ReturnPathArn *string `type:"string"` + + // The email address that is sending the email. This email address must be either + // individually verified with Amazon SES, or from a domain that has been verified + // with Amazon SES. For information about verifying identities, see the Amazon + // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). + // + // If you are sending on behalf of another user and have been permitted to do + // so by a sending authorization policy, then you must also specify the SourceArn + // parameter. For more information about sending authorization, see the Amazon + // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). + // + // In all cases, the email address must be 7-bit ASCII. If the text must contain + // any other characters, then you must use MIME encoded-word syntax (RFC 2047) + // instead of a literal string. MIME encoded-word syntax uses the following + // form: =?charset?encoding?encoded-text?=. For more information, see RFC 2047 + // (https://tools.ietf.org/html/rfc2047). + // + // Source is a required field + Source *string `type:"string" required:"true"` + + // This parameter is used only for sending authorization. It is the ARN of the + // identity that is associated with the sending authorization policy that permits + // you to send for the email address specified in the Source parameter. + // + // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) + // attaches a policy to it that authorizes you to send from user@example.com, + // then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, + // and the Source to be user@example.com. + // + // For more information about sending authorization, see the Amazon SES Developer + // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). + SourceArn *string `type:"string"` + + // The template to use when sending this email. + // + // Template is a required field + Template *string `type:"string" required:"true"` + + // The ARN of the template to use when sending this email. + TemplateArn *string `type:"string"` +} + +// String returns the string representation +func (s SendBulkTemplatedEmailInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendBulkTemplatedEmailInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendBulkTemplatedEmailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendBulkTemplatedEmailInput"} + if s.Destinations == nil { + invalidParams.Add(request.NewErrParamRequired("Destinations")) + } + if s.Source == nil { + invalidParams.Add(request.NewErrParamRequired("Source")) + } + if s.Template == nil { + invalidParams.Add(request.NewErrParamRequired("Template")) + } + if s.DefaultTags != nil { + for i, v := range s.DefaultTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultTags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Destinations != nil { + for i, v := range s.Destinations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationSetName sets the ConfigurationSetName field's value. +func (s *SendBulkTemplatedEmailInput) SetConfigurationSetName(v string) *SendBulkTemplatedEmailInput { + s.ConfigurationSetName = &v + return s +} + +// SetDefaultTags sets the DefaultTags field's value. +func (s *SendBulkTemplatedEmailInput) SetDefaultTags(v []*MessageTag) *SendBulkTemplatedEmailInput { + s.DefaultTags = v + return s +} + +// SetDefaultTemplateData sets the DefaultTemplateData field's value. +func (s *SendBulkTemplatedEmailInput) SetDefaultTemplateData(v string) *SendBulkTemplatedEmailInput { + s.DefaultTemplateData = &v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *SendBulkTemplatedEmailInput) SetDestinations(v []*BulkEmailDestination) *SendBulkTemplatedEmailInput { + s.Destinations = v + return s +} + +// SetReplyToAddresses sets the ReplyToAddresses field's value. +func (s *SendBulkTemplatedEmailInput) SetReplyToAddresses(v []*string) *SendBulkTemplatedEmailInput { + s.ReplyToAddresses = v + return s +} + +// SetReturnPath sets the ReturnPath field's value. +func (s *SendBulkTemplatedEmailInput) SetReturnPath(v string) *SendBulkTemplatedEmailInput { + s.ReturnPath = &v + return s +} + +// SetReturnPathArn sets the ReturnPathArn field's value. +func (s *SendBulkTemplatedEmailInput) SetReturnPathArn(v string) *SendBulkTemplatedEmailInput { + s.ReturnPathArn = &v + return s +} + +// SetSource sets the Source field's value. +func (s *SendBulkTemplatedEmailInput) SetSource(v string) *SendBulkTemplatedEmailInput { + s.Source = &v + return s +} + +// SetSourceArn sets the SourceArn field's value. +func (s *SendBulkTemplatedEmailInput) SetSourceArn(v string) *SendBulkTemplatedEmailInput { + s.SourceArn = &v + return s +} + +// SetTemplate sets the Template field's value. +func (s *SendBulkTemplatedEmailInput) SetTemplate(v string) *SendBulkTemplatedEmailInput { + s.Template = &v + return s +} + +// SetTemplateArn sets the TemplateArn field's value. +func (s *SendBulkTemplatedEmailInput) SetTemplateArn(v string) *SendBulkTemplatedEmailInput { + s.TemplateArn = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBulkTemplatedEmailResponse +type SendBulkTemplatedEmailOutput struct { + _ struct{} `type:"structure"` + + // The unique message identifier returned from the SendBulkTemplatedEmail action. + // + // Status is a required field + Status []*BulkEmailDestinationStatus `type:"list" required:"true"` +} + +// String returns the string representation +func (s SendBulkTemplatedEmailOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendBulkTemplatedEmailOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *SendBulkTemplatedEmailOutput) SetStatus(v []*BulkEmailDestinationStatus) *SendBulkTemplatedEmailOutput { + s.Status = v + return s +} + // Represents sending statistics data. Each SendDataPoint contains statistics // for a 15-minute period of sending activity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendDataPoint @@ -9162,13 +11000,13 @@ type SendEmailInput struct { // to the message, each reply-to address will receive the reply. ReplyToAddresses []*string `type:"list"` - // The email address to which bounces and complaints are to be forwarded when - // feedback forwarding is enabled. If the message cannot be delivered to the - // recipient, then an error message will be returned from the recipient's ISP; - // this message will then be forwarded to the email address specified by the - // ReturnPath parameter. The ReturnPath parameter is never overwritten. This - // email address must be either individually verified with Amazon SES, or from - // a domain that has been verified with Amazon SES. + // The email address that bounces and complaints will be forwarded to when feedback + // forwarding is enabled. If the message cannot be delivered to the recipient, + // then an error message will be returned from the recipient's ISP; this message + // will then be forwarded to the email address specified by the ReturnPath parameter. + // The ReturnPath parameter is never overwritten. This email address must be + // either individually verified with Amazon SES, or from a domain that has been + // verified with Amazon SES. ReturnPath *string `type:"string"` // This parameter is used only for sending authorization. It is the ARN of the @@ -9198,7 +11036,7 @@ type SendEmailInput struct { // any other characters, then you must use MIME encoded-word syntax (RFC 2047) // instead of a literal string. MIME encoded-word syntax uses the following // form: =?charset?encoding?encoded-text?=. For more information, see RFC 2047 - // (http://tools.ietf.org/html/rfc2047). + // (https://tools.ietf.org/html/rfc2047). // // Source is a required field Source *string `type:"string" required:"true"` @@ -9417,7 +11255,7 @@ type SendRawEmailInput struct { // By default, the string must be 7-bit ASCII. If the text must contain any // other characters, then you must use MIME encoded-word syntax (RFC 2047) instead // of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. - // For more information, see RFC 2047 (http://tools.ietf.org/html/rfc2047). + // For more information, see RFC 2047 (https://tools.ietf.org/html/rfc2047). // // If you specify the Source parameter and have feedback forwarding enabled, // then bounces and complaints will be sent to this email address. This takes @@ -9562,6 +11400,234 @@ func (s *SendRawEmailOutput) SetMessageId(v string) *SendRawEmailOutput { return s } +// Represents a request to send a templated email using Amazon SES. For more +// information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendTemplatedEmailRequest +type SendTemplatedEmailInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration set to use when you send an email using SendTemplatedEmail. + ConfigurationSetName *string `type:"string"` + + // The destination for this email, composed of To:, CC:, and BCC: fields. A + // Destination can include up to 50 recipients across these three fields. + // + // Destination is a required field + Destination *Destination `type:"structure" required:"true"` + + // The reply-to email address(es) for the message. If the recipient replies + // to the message, each reply-to address will receive the reply. + ReplyToAddresses []*string `type:"list"` + + // The email address that bounces and complaints will be forwarded to when feedback + // forwarding is enabled. If the message cannot be delivered to the recipient, + // then an error message will be returned from the recipient's ISP; this message + // will then be forwarded to the email address specified by the ReturnPath parameter. + // The ReturnPath parameter is never overwritten. This email address must be + // either individually verified with Amazon SES, or from a domain that has been + // verified with Amazon SES. + ReturnPath *string `type:"string"` + + // This parameter is used only for sending authorization. It is the ARN of the + // identity that is associated with the sending authorization policy that permits + // you to use the email address specified in the ReturnPath parameter. + // + // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) + // attaches a policy to it that authorizes you to use feedback@example.com, + // then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, + // and the ReturnPath to be feedback@example.com. + // + // For more information about sending authorization, see the Amazon SES Developer + // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). + ReturnPathArn *string `type:"string"` + + // The email address that is sending the email. This email address must be either + // individually verified with Amazon SES, or from a domain that has been verified + // with Amazon SES. For information about verifying identities, see the Amazon + // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). + // + // If you are sending on behalf of another user and have been permitted to do + // so by a sending authorization policy, then you must also specify the SourceArn + // parameter. For more information about sending authorization, see the Amazon + // SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). + // + // In all cases, the email address must be 7-bit ASCII. If the text must contain + // any other characters, then you must use MIME encoded-word syntax (RFC 2047) + // instead of a literal string. MIME encoded-word syntax uses the following + // form: =?charset?encoding?encoded-text?=. For more information, see RFC 2047 + // (https://tools.ietf.org/html/rfc2047). + // + // Source is a required field + Source *string `type:"string" required:"true"` + + // This parameter is used only for sending authorization. It is the ARN of the + // identity that is associated with the sending authorization policy that permits + // you to send for the email address specified in the Source parameter. + // + // For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) + // attaches a policy to it that authorizes you to send from user@example.com, + // then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, + // and the Source to be user@example.com. + // + // For more information about sending authorization, see the Amazon SES Developer + // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). + SourceArn *string `type:"string"` + + // A list of tags, in the form of name/value pairs, to apply to an email that + // you send using SendTemplatedEmail. Tags correspond to characteristics of + // the email that you define, so that you can publish email sending events. + Tags []*MessageTag `type:"list"` + + // The template to use when sending this email. + // + // Template is a required field + Template *string `type:"string" required:"true"` + + // The ARN of the template to use when sending this email. + TemplateArn *string `type:"string"` + + // A list of replacement values to apply to the template. This parameter is + // a JSON object, typically consisting of key-value pairs in which the keys + // correspond to replacement tags in the email template. + // + // TemplateData is a required field + TemplateData *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s SendTemplatedEmailInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendTemplatedEmailInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendTemplatedEmailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendTemplatedEmailInput"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.Source == nil { + invalidParams.Add(request.NewErrParamRequired("Source")) + } + if s.Template == nil { + invalidParams.Add(request.NewErrParamRequired("Template")) + } + if s.TemplateData == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateData")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationSetName sets the ConfigurationSetName field's value. +func (s *SendTemplatedEmailInput) SetConfigurationSetName(v string) *SendTemplatedEmailInput { + s.ConfigurationSetName = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *SendTemplatedEmailInput) SetDestination(v *Destination) *SendTemplatedEmailInput { + s.Destination = v + return s +} + +// SetReplyToAddresses sets the ReplyToAddresses field's value. +func (s *SendTemplatedEmailInput) SetReplyToAddresses(v []*string) *SendTemplatedEmailInput { + s.ReplyToAddresses = v + return s +} + +// SetReturnPath sets the ReturnPath field's value. +func (s *SendTemplatedEmailInput) SetReturnPath(v string) *SendTemplatedEmailInput { + s.ReturnPath = &v + return s +} + +// SetReturnPathArn sets the ReturnPathArn field's value. +func (s *SendTemplatedEmailInput) SetReturnPathArn(v string) *SendTemplatedEmailInput { + s.ReturnPathArn = &v + return s +} + +// SetSource sets the Source field's value. +func (s *SendTemplatedEmailInput) SetSource(v string) *SendTemplatedEmailInput { + s.Source = &v + return s +} + +// SetSourceArn sets the SourceArn field's value. +func (s *SendTemplatedEmailInput) SetSourceArn(v string) *SendTemplatedEmailInput { + s.SourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *SendTemplatedEmailInput) SetTags(v []*MessageTag) *SendTemplatedEmailInput { + s.Tags = v + return s +} + +// SetTemplate sets the Template field's value. +func (s *SendTemplatedEmailInput) SetTemplate(v string) *SendTemplatedEmailInput { + s.Template = &v + return s +} + +// SetTemplateArn sets the TemplateArn field's value. +func (s *SendTemplatedEmailInput) SetTemplateArn(v string) *SendTemplatedEmailInput { + s.TemplateArn = &v + return s +} + +// SetTemplateData sets the TemplateData field's value. +func (s *SendTemplatedEmailInput) SetTemplateData(v string) *SendTemplatedEmailInput { + s.TemplateData = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendTemplatedEmailResponse +type SendTemplatedEmailOutput struct { + _ struct{} `type:"structure"` + + // The unique message identifier returned from the SendTemplatedEmail action. + // + // MessageId is a required field + MessageId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s SendTemplatedEmailOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendTemplatedEmailOutput) GoString() string { + return s.String() +} + +// SetMessageId sets the MessageId field's value. +func (s *SendTemplatedEmailOutput) SetMessageId(v string) *SendTemplatedEmailOutput { + s.MessageId = &v + return s +} + // Represents a request to set a receipt rule set as the active receipt rule // set. You use receipt rule sets to receive email with Amazon SES. For more // information, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). @@ -10118,7 +12184,7 @@ func (s SetReceiptRulePositionOutput) GoString() string { type StopAction struct { _ struct{} `type:"structure"` - // The scope to which the Stop action applies. That is, what is being stopped. + // The name of the RuleSet that is being stopped. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"StopScope"` @@ -10165,6 +12231,222 @@ func (s *StopAction) SetTopicArn(v string) *StopAction { return s } +// The content of the email, composed of a subject line, an HTML part, and a +// text-only part. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/Template +type Template struct { + _ struct{} `type:"structure"` + + // The HTML body of the email. + HtmlPart *string `type:"string"` + + // The subject line of the email. + SubjectPart *string `type:"string"` + + // The name of the template. You will refer to this name when you send email + // using the SendTemplatedEmail or SendBulkTemplatedEmail operations. + // + // TemplateName is a required field + TemplateName *string `type:"string" required:"true"` + + // The email body that will be visible to recipients whose email clients do + // not display HTML. + TextPart *string `type:"string"` +} + +// String returns the string representation +func (s Template) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Template) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Template) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Template"} + if s.TemplateName == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHtmlPart sets the HtmlPart field's value. +func (s *Template) SetHtmlPart(v string) *Template { + s.HtmlPart = &v + return s +} + +// SetSubjectPart sets the SubjectPart field's value. +func (s *Template) SetSubjectPart(v string) *Template { + s.SubjectPart = &v + return s +} + +// SetTemplateName sets the TemplateName field's value. +func (s *Template) SetTemplateName(v string) *Template { + s.TemplateName = &v + return s +} + +// SetTextPart sets the TextPart field's value. +func (s *Template) SetTextPart(v string) *Template { + s.TextPart = &v + return s +} + +// Information about an email template. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TemplateMetadata +type TemplateMetadata struct { + _ struct{} `type:"structure"` + + // The time and date the template was created. + CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The name of the template. + Name *string `type:"string"` +} + +// String returns the string representation +func (s TemplateMetadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TemplateMetadata) GoString() string { + return s.String() +} + +// SetCreatedTimestamp sets the CreatedTimestamp field's value. +func (s *TemplateMetadata) SetCreatedTimestamp(v time.Time) *TemplateMetadata { + s.CreatedTimestamp = &v + return s +} + +// SetName sets the Name field's value. +func (s *TemplateMetadata) SetName(v string) *TemplateMetadata { + s.Name = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TestRenderTemplateRequest +type TestRenderTemplateInput struct { + _ struct{} `type:"structure"` + + // A list of replacement values to apply to the template. This parameter is + // a JSON object, typically consisting of key-value pairs in which the keys + // correspond to replacement tags in the email template. + // + // TemplateData is a required field + TemplateData *string `type:"string" required:"true"` + + // The name of the template that you want to render. + // + // TemplateName is a required field + TemplateName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TestRenderTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestRenderTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestRenderTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestRenderTemplateInput"} + if s.TemplateData == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateData")) + } + if s.TemplateName == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTemplateData sets the TemplateData field's value. +func (s *TestRenderTemplateInput) SetTemplateData(v string) *TestRenderTemplateInput { + s.TemplateData = &v + return s +} + +// SetTemplateName sets the TemplateName field's value. +func (s *TestRenderTemplateInput) SetTemplateName(v string) *TestRenderTemplateInput { + s.TemplateName = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TestRenderTemplateResponse +type TestRenderTemplateOutput struct { + _ struct{} `type:"structure"` + + // The complete MIME message rendered by applying the data in the TemplateData + // parameter to the template specified in the TemplateName parameter. + RenderedTemplate *string `type:"string"` +} + +// String returns the string representation +func (s TestRenderTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestRenderTemplateOutput) GoString() string { + return s.String() +} + +// SetRenderedTemplate sets the RenderedTemplate field's value. +func (s *TestRenderTemplateOutput) SetRenderedTemplate(v string) *TestRenderTemplateOutput { + s.RenderedTemplate = &v + return s +} + +// A domain that is used to redirect email recipients to an Amazon SES-operated +// domain. This domain captures open and click events generated by Amazon SES +// emails. +// +// For more information, see Configuring Custom Domains to Handle Open and Click +// Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) +// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TrackingOptions +type TrackingOptions struct { + _ struct{} `type:"structure"` + + // The custom subdomain that will be used to redirect email recipients to the + // Amazon SES event tracking domain. + CustomRedirectDomain *string `type:"string"` +} + +// String returns the string representation +func (s TrackingOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrackingOptions) GoString() string { + return s.String() +} + +// SetCustomRedirectDomain sets the CustomRedirectDomain field's value. +func (s *TrackingOptions) SetCustomRedirectDomain(v string) *TrackingOptions { + s.CustomRedirectDomain = &v + return s +} + // Represents a request to update the event destination of a configuration set. // Configuration sets enable you to publish email sending events. For information // about using configuration sets, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html). @@ -10172,7 +12454,8 @@ func (s *StopAction) SetTopicArn(v string) *StopAction { type UpdateConfigurationSetEventDestinationInput struct { _ struct{} `type:"structure"` - // The name of the configuration set that you want to update. + // The name of the configuration set that contains the event destination that + // you want to update. // // ConfigurationSetName is a required field ConfigurationSetName *string `type:"string" required:"true"` @@ -10243,6 +12526,83 @@ func (s UpdateConfigurationSetEventDestinationOutput) GoString() string { return s.String() } +// Represents a request to update the tracking options for a configuration set. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetTrackingOptionsRequest +type UpdateConfigurationSetTrackingOptionsInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration set for which you want to update the custom + // tracking domain. + // + // ConfigurationSetName is a required field + ConfigurationSetName *string `type:"string" required:"true"` + + // A domain that is used to redirect email recipients to an Amazon SES-operated + // domain. This domain captures open and click events generated by Amazon SES + // emails. + // + // For more information, see Configuring Custom Domains to Handle Open and Click + // Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) + // in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). + // + // TrackingOptions is a required field + TrackingOptions *TrackingOptions `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateConfigurationSetTrackingOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConfigurationSetTrackingOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateConfigurationSetTrackingOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationSetTrackingOptionsInput"} + if s.ConfigurationSetName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) + } + if s.TrackingOptions == nil { + invalidParams.Add(request.NewErrParamRequired("TrackingOptions")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationSetName sets the ConfigurationSetName field's value. +func (s *UpdateConfigurationSetTrackingOptionsInput) SetConfigurationSetName(v string) *UpdateConfigurationSetTrackingOptionsInput { + s.ConfigurationSetName = &v + return s +} + +// SetTrackingOptions sets the TrackingOptions field's value. +func (s *UpdateConfigurationSetTrackingOptionsInput) SetTrackingOptions(v *TrackingOptions) *UpdateConfigurationSetTrackingOptionsInput { + s.TrackingOptions = v + return s +} + +// An empty element returned on a successful request. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetTrackingOptionsResponse +type UpdateConfigurationSetTrackingOptionsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateConfigurationSetTrackingOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConfigurationSetTrackingOptionsOutput) GoString() string { + return s.String() +} + // Represents a request to update a receipt rule. You use receipt rules to receive // email with Amazon SES. For more information, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html). @@ -10255,7 +12615,7 @@ type UpdateReceiptRuleInput struct { // Rule is a required field Rule *ReceiptRule `type:"structure" required:"true"` - // The name of the receipt rule set to which the receipt rule belongs. + // The name of the receipt rule set that the receipt rule belongs to. // // RuleSetName is a required field RuleSetName *string `type:"string" required:"true"` @@ -10320,6 +12680,66 @@ func (s UpdateReceiptRuleOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateTemplateRequest +type UpdateTemplateInput struct { + _ struct{} `type:"structure"` + + // The content of the email, composed of a subject line, an HTML part, and a + // text-only part. + // + // Template is a required field + Template *Template `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTemplateInput"} + if s.Template == nil { + invalidParams.Add(request.NewErrParamRequired("Template")) + } + if s.Template != nil { + if err := s.Template.Validate(); err != nil { + invalidParams.AddNested("Template", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTemplate sets the Template field's value. +func (s *UpdateTemplateInput) SetTemplate(v *Template) *UpdateTemplateInput { + s.Template = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateTemplateResponse +type UpdateTemplateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTemplateOutput) GoString() string { + return s.String() +} + // Represents a request to generate the CNAME records needed to set up Easy // DKIM with Amazon SES. For more information about setting up Easy DKIM, see // the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html). @@ -10683,9 +13103,50 @@ const ( BounceTypeTemporaryFailure = "TemporaryFailure" ) +const ( + // BulkEmailStatusSuccess is a BulkEmailStatus enum value + BulkEmailStatusSuccess = "Success" + + // BulkEmailStatusMessageRejected is a BulkEmailStatus enum value + BulkEmailStatusMessageRejected = "MessageRejected" + + // BulkEmailStatusMailFromDomainNotVerified is a BulkEmailStatus enum value + BulkEmailStatusMailFromDomainNotVerified = "MailFromDomainNotVerified" + + // BulkEmailStatusConfigurationSetDoesNotExist is a BulkEmailStatus enum value + BulkEmailStatusConfigurationSetDoesNotExist = "ConfigurationSetDoesNotExist" + + // BulkEmailStatusTemplateDoesNotExist is a BulkEmailStatus enum value + BulkEmailStatusTemplateDoesNotExist = "TemplateDoesNotExist" + + // BulkEmailStatusAccountSuspended is a BulkEmailStatus enum value + BulkEmailStatusAccountSuspended = "AccountSuspended" + + // BulkEmailStatusAccountThrottled is a BulkEmailStatus enum value + BulkEmailStatusAccountThrottled = "AccountThrottled" + + // BulkEmailStatusAccountDailyQuotaExceeded is a BulkEmailStatus enum value + BulkEmailStatusAccountDailyQuotaExceeded = "AccountDailyQuotaExceeded" + + // BulkEmailStatusInvalidSendingPoolName is a BulkEmailStatus enum value + BulkEmailStatusInvalidSendingPoolName = "InvalidSendingPoolName" + + // BulkEmailStatusInvalidParameterValue is a BulkEmailStatus enum value + BulkEmailStatusInvalidParameterValue = "InvalidParameterValue" + + // BulkEmailStatusTransientFailure is a BulkEmailStatus enum value + BulkEmailStatusTransientFailure = "TransientFailure" + + // BulkEmailStatusFailed is a BulkEmailStatus enum value + BulkEmailStatusFailed = "Failed" +) + const ( // ConfigurationSetAttributeEventDestinations is a ConfigurationSetAttribute enum value ConfigurationSetAttributeEventDestinations = "eventDestinations" + + // ConfigurationSetAttributeTrackingOptions is a ConfigurationSetAttribute enum value + ConfigurationSetAttributeTrackingOptions = "trackingOptions" ) const ( @@ -10751,6 +13212,9 @@ const ( // EventTypeClick is a EventType enum value EventTypeClick = "click" + + // EventTypeRenderingFailure is a EventType enum value + EventTypeRenderingFailure = "renderingFailure" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go index 57030ddb2..0050868b2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go @@ -3,13 +3,13 @@ // Package ses provides the client and types for making API // requests to Amazon Simple Email Service. // -// This is the API Reference for Amazon Simple Email Service (Amazon SES). This -// documentation is intended to be used in conjunction with the Amazon SES Developer -// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// This is the API Reference for Amazon Simple Email Service (https://aws.amazon.com/ses/) +// (Amazon SES). This documentation is intended to be used in conjunction with +// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). // // For a list of Amazon SES endpoints to use in service requests, see Regions // and Amazon SES (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/regions.html) -// in the Amazon SES Developer Guide. +// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). // // See https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01 for more information on this service. // @@ -18,7 +18,7 @@ // // Using the Client // -// To Amazon Simple Email Service with the SDK use the New function to create +// To contact Amazon Simple Email Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go index 3b18e9fdd..a30d70f51 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go @@ -79,6 +79,13 @@ const ( // more information about what caused the error. ErrCodeInvalidPolicyException = "InvalidPolicy" + // ErrCodeInvalidRenderingParameterException for service response error code + // "InvalidRenderingParameter". + // + // Indicates that one or more of the replacement values you provided is invalid. + // This error may occur when the TemplateData object contains invalid JSON. + ErrCodeInvalidRenderingParameterException = "InvalidRenderingParameter" + // ErrCodeInvalidS3ConfigurationException for service response error code // "InvalidS3Configuration". // @@ -103,6 +110,24 @@ const ( // about giving permissions, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). ErrCodeInvalidSnsTopicException = "InvalidSnsTopic" + // ErrCodeInvalidTemplateException for service response error code + // "InvalidTemplate". + // + // Indicates that a template could not be created because it contained invalid + // JSON. + ErrCodeInvalidTemplateException = "InvalidTemplate" + + // ErrCodeInvalidTrackingOptionsException for service response error code + // "InvalidTrackingOptions". + // + // Indicates that the custom domain to be used for open and click tracking redirects + // is invalid. This error appears most often in the following situations: + // + // * When the tracking domain you specified is not verified in Amazon SES. + // + // * When the tracking domain you specified is not a valid domain or subdomain. + ErrCodeInvalidTrackingOptionsException = "InvalidTrackingOptions" + // ErrCodeLimitExceededException for service response error code // "LimitExceeded". // @@ -126,6 +151,14 @@ const ( // the error stack for more information about what caused the error. ErrCodeMessageRejected = "MessageRejected" + // ErrCodeMissingRenderingAttributeException for service response error code + // "MissingRenderingAttribute". + // + // Indicates that one or more of the replacement values for the specified template + // was not specified. Ensure that the TemplateData object contains references + // to all of the replacement tags in the specified template. + ErrCodeMissingRenderingAttributeException = "MissingRenderingAttribute" + // ErrCodeRuleDoesNotExistException for service response error code // "RuleDoesNotExist". // @@ -137,4 +170,24 @@ const ( // // Indicates that the provided receipt rule set does not exist. ErrCodeRuleSetDoesNotExistException = "RuleSetDoesNotExist" + + // ErrCodeTemplateDoesNotExistException for service response error code + // "TemplateDoesNotExist". + // + // Indicates that the Template object you specified does not exist in your Amazon + // SES account. + ErrCodeTemplateDoesNotExistException = "TemplateDoesNotExist" + + // ErrCodeTrackingOptionsAlreadyExistsException for service response error code + // "TrackingOptionsAlreadyExistsException". + // + // Indicates that the configuration set you specified already contains a TrackingOptions + // object. + ErrCodeTrackingOptionsAlreadyExistsException = "TrackingOptionsAlreadyExistsException" + + // ErrCodeTrackingOptionsDoesNotExistException for service response error code + // "TrackingOptionsDoesNotExistException". + // + // Indicates that the TrackingOptions object you specified does not exist. + ErrCodeTrackingOptionsDoesNotExistException = "TrackingOptionsDoesNotExistException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go index 4edca8f57..3d85a8df3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go @@ -54,7 +54,12 @@ func (c *SFN) CreateActivityRequest(input *CreateActivityInput) (req *request.Re // CreateActivity API operation for AWS Step Functions. // -// Creates an activity. +// Creates an activity. An Activity is a task which you write, in any language +// and hosted on any machine which has access to AWS Step Functions. Activities +// must poll Step Functions using the GetActivityTask and respond using SendTask* +// API calls. This function lets Step Functions know the existence of your activity +// and returns an identifier for use in a state machine and when polling from +// the activity. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -137,7 +142,10 @@ func (c *SFN) CreateStateMachineRequest(input *CreateStateMachineInput) (req *re // CreateStateMachine API operation for AWS Step Functions. // -// Creates a state machine. +// Creates a state machine. A state machine consists of a collection of states +// that can do work (Task states), determine which states to transition to next +// (Choice states), stop an execution with an error (Fail states), and so on. +// State machines are specified using a JSON-based, structured language. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -313,7 +321,10 @@ func (c *SFN) DeleteStateMachineRequest(input *DeleteStateMachineInput) (req *re // DeleteStateMachine API operation for AWS Step Functions. // // Deletes a state machine. This is an asynchronous operation-- it sets the -// state machine's status to "DELETING" and begins the delete process. +// state machine's status to "DELETING" and begins the delete process. Each +// state machine execution will be deleted the next time it makes a state transition. +// After all executions have completed or been deleted, the state machine itself +// will be deleted. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -638,13 +649,13 @@ func (c *SFN) GetActivityTaskRequest(input *GetActivityTaskInput) (req *request. // GetActivityTask API operation for AWS Step Functions. // -// Used by workers to retrieve a task (with the specified activity ARN) scheduled -// for execution by a running state machine. This initiates a long poll, where -// the service holds the HTTP connection open and responds as soon as a task -// becomes available (i.e. an execution of a task of this type is needed.) The -// maximum time the service holds on to the request before responding is 60 -// seconds. If no task is available within 60 seconds, the poll will return -// an empty result, that is, the taskToken returned is an empty string. +// Used by workers to retrieve a task (with the specified activity ARN) which +// has been scheduled for execution by a running state machine. This initiates +// a long poll, where the service holds the HTTP connection open and responds +// as soon as a task becomes available (i.e. an execution of a task of this +// type is needed.) The maximum time the service holds on to the request before +// responding is 60 seconds. If no task is available within 60 seconds, the +// poll will return a taskToken with a null string. // // Workers should set their client side socket timeout to at least 65 seconds // (5 seconds higher than the maximum time the service may hold the poll request). @@ -1575,7 +1586,9 @@ func (c *SFN) StartExecutionRequest(input *StartExecutionInput) (req *request.Re // must end or be stopped before a new execution can be started. // // * ErrCodeExecutionAlreadyExists "ExecutionAlreadyExists" -// An execution with the same name already exists. +// The execution has the same name as another execution (but a different input). +// +// Executions with the same name and input are considered idempotent. // // * ErrCodeInvalidArn "InvalidArn" // The provided Amazon Resource Name (ARN) is invalid. @@ -1696,6 +1709,7 @@ func (c *SFN) StopExecutionWithContext(ctx aws.Context, input *StopExecutionInpu return out, req.Send() } +// Contains details about an activity which failed during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ActivityFailedEventDetails type ActivityFailedEventDetails struct { _ struct{} `type:"structure"` @@ -1729,6 +1743,7 @@ func (s *ActivityFailedEventDetails) SetError(v string) *ActivityFailedEventDeta return s } +// Contains details about an activity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ActivityListItem type ActivityListItem struct { _ struct{} `type:"structure"` @@ -1745,6 +1760,18 @@ type ActivityListItem struct { // The name of the activity. // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) + // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` } @@ -1777,6 +1804,8 @@ func (s *ActivityListItem) SetName(v string) *ActivityListItem { return s } +// Contains details about an activity schedule failure which occurred during +// an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ActivityScheduleFailedEventDetails type ActivityScheduleFailedEventDetails struct { _ struct{} `type:"structure"` @@ -1810,6 +1839,7 @@ func (s *ActivityScheduleFailedEventDetails) SetError(v string) *ActivitySchedul return s } +// Contains details about an activity scheduled during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ActivityScheduledEventDetails type ActivityScheduledEventDetails struct { _ struct{} `type:"structure"` @@ -1863,6 +1893,7 @@ func (s *ActivityScheduledEventDetails) SetTimeoutInSeconds(v int64) *ActivitySc return s } +// Contains details about the start of an activity during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ActivityStartedEventDetails type ActivityStartedEventDetails struct { _ struct{} `type:"structure"` @@ -1888,6 +1919,8 @@ func (s *ActivityStartedEventDetails) SetWorkerName(v string) *ActivityStartedEv return s } +// Contains details about an activity which successfully terminated during an +// execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ActivitySucceededEventDetails type ActivitySucceededEventDetails struct { _ struct{} `type:"structure"` @@ -1912,6 +1945,7 @@ func (s *ActivitySucceededEventDetails) SetOutput(v string) *ActivitySucceededEv return s } +// Contains details about an activity timeout which occurred during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ActivityTimedOutEventDetails type ActivityTimedOutEventDetails struct { _ struct{} `type:"structure"` @@ -1950,7 +1984,21 @@ type CreateActivityInput struct { _ struct{} `type:"structure"` // The name of the activity to create. This name must be unique for your AWS - // account and region. + // account and region for 90 days. For more information, see Limits Related + // to State Machine Executions (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions) + // in the AWS Step Functions Developer Guide. + // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` @@ -2035,7 +2083,21 @@ type CreateStateMachineInput struct { Definition *string `locationName:"definition" min:"1" type:"string" required:"true"` // The name of the state machine. This name must be unique for your AWS account - // and region. + // and region for 90 days. For more information, see Limits Related to State + // Machine Executions (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions) + // in the AWS Step Functions Developer Guide. + // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` @@ -2311,6 +2373,18 @@ type DescribeActivityOutput struct { // The name of the activity. // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) + // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` } @@ -2394,12 +2468,24 @@ type DescribeExecutionOutput struct { // ExecutionArn is a required field ExecutionArn *string `locationName:"executionArn" min:"1" type:"string" required:"true"` - // The JSON input data of the execution. + // The string that contains the JSON input data of the execution. // // Input is a required field Input *string `locationName:"input" type:"string" required:"true"` // The name of the execution. + // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) Name *string `locationName:"name" min:"1" type:"string"` // The JSON output data of the execution. @@ -2540,11 +2626,24 @@ type DescribeStateMachineOutput struct { // The name of the state machine. // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) + // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` - // The Amazon Resource Name (ARN) of the IAM role used for executing this state - // machine. + // The Amazon Resource Name (ARN) of the IAM role used when creating this state + // machine. (The IAM role maintains security by granting Step Functions access + // to AWS resources.) // // RoleArn is a required field RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` @@ -2604,6 +2703,7 @@ func (s *DescribeStateMachineOutput) SetStatus(v string) *DescribeStateMachineOu return s } +// Contains details about an abort of an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ExecutionAbortedEventDetails type ExecutionAbortedEventDetails struct { _ struct{} `type:"structure"` @@ -2637,6 +2737,7 @@ func (s *ExecutionAbortedEventDetails) SetError(v string) *ExecutionAbortedEvent return s } +// Contains details about an execution failure event. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ExecutionFailedEventDetails type ExecutionFailedEventDetails struct { _ struct{} `type:"structure"` @@ -2670,6 +2771,7 @@ func (s *ExecutionFailedEventDetails) SetError(v string) *ExecutionFailedEventDe return s } +// Contains details about an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ExecutionListItem type ExecutionListItem struct { _ struct{} `type:"structure"` @@ -2681,6 +2783,18 @@ type ExecutionListItem struct { // The name of the execution. // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) + // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` @@ -2749,6 +2863,7 @@ func (s *ExecutionListItem) SetStopDate(v time.Time) *ExecutionListItem { return s } +// Contains details about the start of the execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ExecutionStartedEventDetails type ExecutionStartedEventDetails struct { _ struct{} `type:"structure"` @@ -2783,6 +2898,7 @@ func (s *ExecutionStartedEventDetails) SetRoleArn(v string) *ExecutionStartedEve return s } +// Contains details about the successful termination of the execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ExecutionSucceededEventDetails type ExecutionSucceededEventDetails struct { _ struct{} `type:"structure"` @@ -2807,6 +2923,7 @@ func (s *ExecutionSucceededEventDetails) SetOutput(v string) *ExecutionSucceeded return s } +// Contains details about the execution timeout which occurred during the execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ExecutionTimedOutEventDetails type ExecutionTimedOutEventDetails struct { _ struct{} `type:"structure"` @@ -2844,12 +2961,13 @@ func (s *ExecutionTimedOutEventDetails) SetError(v string) *ExecutionTimedOutEve type GetActivityTaskInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the activity to retrieve tasks from. + // The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned + // when you create the task using CreateActivity.) // // ActivityArn is a required field ActivityArn *string `locationName:"activityArn" min:"1" type:"string" required:"true"` - // An arbitrary name may be provided in order to identify the worker that the + // You can provide an arbitrary name in order to identify the worker that the // task is assigned to. This name will be used when it is logged in the execution // history. WorkerName *string `locationName:"workerName" min:"1" type:"string"` @@ -2900,7 +3018,7 @@ func (s *GetActivityTaskInput) SetWorkerName(v string) *GetActivityTaskInput { type GetActivityTaskOutput struct { _ struct{} `type:"structure"` - // The JSON input data for the task. + // The string that contains the JSON input data for the task. Input *string `locationName:"input" type:"string"` // A token that identifies the scheduled task. This token must be copied and @@ -2942,7 +3060,7 @@ type GetExecutionHistoryInput struct { // The maximum number of results that will be returned per call. nextToken can // be used to obtain further pages of results. The default is 100 and the maximum - // allowed page size is 1000. + // allowed page size is 100. A value of 0 means to use the default. // // This is an upper limit only; the actual number of results returned per call // may be fewer than the specified maximum. @@ -3053,30 +3171,44 @@ func (s *GetExecutionHistoryOutput) SetNextToken(v string) *GetExecutionHistoryO return s } +// Contains details about the events of an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/HistoryEvent type HistoryEvent struct { _ struct{} `type:"structure"` + // Contains details about an activity which failed during an execution. ActivityFailedEventDetails *ActivityFailedEventDetails `locationName:"activityFailedEventDetails" type:"structure"` + // Contains details about an activity schedule event which failed during an + // execution. ActivityScheduleFailedEventDetails *ActivityScheduleFailedEventDetails `locationName:"activityScheduleFailedEventDetails" type:"structure"` + // Contains details about an activity scheduled during an execution. ActivityScheduledEventDetails *ActivityScheduledEventDetails `locationName:"activityScheduledEventDetails" type:"structure"` + // Contains details about the start of an activity during an execution. ActivityStartedEventDetails *ActivityStartedEventDetails `locationName:"activityStartedEventDetails" type:"structure"` + // Contains details about an activity which successfully terminated during an + // execution. ActivitySucceededEventDetails *ActivitySucceededEventDetails `locationName:"activitySucceededEventDetails" type:"structure"` + // Contains details about an activity timeout which occurred during an execution. ActivityTimedOutEventDetails *ActivityTimedOutEventDetails `locationName:"activityTimedOutEventDetails" type:"structure"` + // Contains details about an abort of an execution. ExecutionAbortedEventDetails *ExecutionAbortedEventDetails `locationName:"executionAbortedEventDetails" type:"structure"` + // Contains details about an execution failure event. ExecutionFailedEventDetails *ExecutionFailedEventDetails `locationName:"executionFailedEventDetails" type:"structure"` + // Contains details about the start of the execution. ExecutionStartedEventDetails *ExecutionStartedEventDetails `locationName:"executionStartedEventDetails" type:"structure"` + // Contains details about the successful termination of the execution. ExecutionSucceededEventDetails *ExecutionSucceededEventDetails `locationName:"executionSucceededEventDetails" type:"structure"` + // Contains details about the execution timeout which occurred during the execution. ExecutionTimedOutEventDetails *ExecutionTimedOutEventDetails `locationName:"executionTimedOutEventDetails" type:"structure"` // The id of the event. Events are numbered sequentially, starting at one. @@ -3084,26 +3216,38 @@ type HistoryEvent struct { // Id is a required field Id *int64 `locationName:"id" type:"long" required:"true"` + // Contains details about a lambda function which failed during an execution. LambdaFunctionFailedEventDetails *LambdaFunctionFailedEventDetails `locationName:"lambdaFunctionFailedEventDetails" type:"structure"` + // Contains details about a failed lambda function schedule event which occurred + // during an execution. LambdaFunctionScheduleFailedEventDetails *LambdaFunctionScheduleFailedEventDetails `locationName:"lambdaFunctionScheduleFailedEventDetails" type:"structure"` + // Contains details about a lambda function scheduled during an execution. LambdaFunctionScheduledEventDetails *LambdaFunctionScheduledEventDetails `locationName:"lambdaFunctionScheduledEventDetails" type:"structure"` + // Contains details about a lambda function which failed to start during an + // execution. LambdaFunctionStartFailedEventDetails *LambdaFunctionStartFailedEventDetails `locationName:"lambdaFunctionStartFailedEventDetails" type:"structure"` + // Contains details about a lambda function which terminated successfully during + // an execution. LambdaFunctionSucceededEventDetails *LambdaFunctionSucceededEventDetails `locationName:"lambdaFunctionSucceededEventDetails" type:"structure"` + // Contains details about a lambda function timeout which occurred during an + // execution. LambdaFunctionTimedOutEventDetails *LambdaFunctionTimedOutEventDetails `locationName:"lambdaFunctionTimedOutEventDetails" type:"structure"` // The id of the previous event. PreviousEventId *int64 `locationName:"previousEventId" type:"long"` + // Contains details about a state entered during an execution. StateEnteredEventDetails *StateEnteredEventDetails `locationName:"stateEnteredEventDetails" type:"structure"` + // Contains details about an exit from a state during an execution. StateExitedEventDetails *StateExitedEventDetails `locationName:"stateExitedEventDetails" type:"structure"` - // The date the event occured. + // The date the event occurred. // // Timestamp is a required field Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"unix" required:"true"` @@ -3262,6 +3406,7 @@ func (s *HistoryEvent) SetType(v string) *HistoryEvent { return s } +// Contains details about a lambda function which failed during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/LambdaFunctionFailedEventDetails type LambdaFunctionFailedEventDetails struct { _ struct{} `type:"structure"` @@ -3295,6 +3440,8 @@ func (s *LambdaFunctionFailedEventDetails) SetError(v string) *LambdaFunctionFai return s } +// Contains details about a failed lambda function schedule event which occurred +// during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/LambdaFunctionScheduleFailedEventDetails type LambdaFunctionScheduleFailedEventDetails struct { _ struct{} `type:"structure"` @@ -3328,6 +3475,7 @@ func (s *LambdaFunctionScheduleFailedEventDetails) SetError(v string) *LambdaFun return s } +// Contains details about a lambda function scheduled during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/LambdaFunctionScheduledEventDetails type LambdaFunctionScheduledEventDetails struct { _ struct{} `type:"structure"` @@ -3372,6 +3520,8 @@ func (s *LambdaFunctionScheduledEventDetails) SetTimeoutInSeconds(v int64) *Lamb return s } +// Contains details about a lambda function which failed to start during an +// execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/LambdaFunctionStartFailedEventDetails type LambdaFunctionStartFailedEventDetails struct { _ struct{} `type:"structure"` @@ -3405,6 +3555,8 @@ func (s *LambdaFunctionStartFailedEventDetails) SetError(v string) *LambdaFuncti return s } +// Contains details about a lambda function which successfully terminated during +// an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/LambdaFunctionSucceededEventDetails type LambdaFunctionSucceededEventDetails struct { _ struct{} `type:"structure"` @@ -3429,6 +3581,8 @@ func (s *LambdaFunctionSucceededEventDetails) SetOutput(v string) *LambdaFunctio return s } +// Contains details about a lambda function timeout which occurred during an +// execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/LambdaFunctionTimedOutEventDetails type LambdaFunctionTimedOutEventDetails struct { _ struct{} `type:"structure"` @@ -3468,7 +3622,7 @@ type ListActivitiesInput struct { // The maximum number of results that will be returned per call. nextToken can // be used to obtain further pages of results. The default is 100 and the maximum - // allowed page size is 1000. + // allowed page size is 100. A value of 0 means to use the default. // // This is an upper limit only; the actual number of results returned per call // may be fewer than the specified maximum. @@ -3564,7 +3718,7 @@ type ListExecutionsInput struct { // The maximum number of results that will be returned per call. nextToken can // be used to obtain further pages of results. The default is 100 and the maximum - // allowed page size is 1000. + // allowed page size is 100. A value of 0 means to use the default. // // This is an upper limit only; the actual number of results returned per call // may be fewer than the specified maximum. @@ -3688,7 +3842,7 @@ type ListStateMachinesInput struct { // The maximum number of results that will be returned per call. nextToken can // be used to obtain further pages of results. The default is 100 and the maximum - // allowed page size is 1000. + // allowed page size is 100. A value of 0 means to use the default. // // This is an upper limit only; the actual number of results returned per call // may be fewer than the specified maximum. @@ -3986,11 +4140,30 @@ func (s SendTaskSuccessOutput) GoString() string { type StartExecutionInput struct { _ struct{} `type:"structure"` - // The JSON input data for the execution. + // The string that contains the JSON input data for the execution, for example: + // + // "input": "{\"first_name\" : \"test\"}" + // + // If you don't include any JSON input data, you still must include the two + // braces, for example: "input": "{}" Input *string `locationName:"input" type:"string"` // The name of the execution. This name must be unique for your AWS account - // and region. + // and region for 90 days. For more information, see Limits Related to State + // Machine Executions (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions) + // in the AWS Step Functions Developer Guide. + // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) Name *string `locationName:"name" min:"1" type:"string"` // The Amazon Resource Name (ARN) of the state machine to execute. @@ -4083,11 +4256,12 @@ func (s *StartExecutionOutput) SetStartDate(v time.Time) *StartExecutionOutput { return s } +// Contains details about a state entered during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StateEnteredEventDetails type StateEnteredEventDetails struct { _ struct{} `type:"structure"` - // The JSON input data to the state. + // The string that contains the JSON input data for the state. Input *string `locationName:"input" type:"string"` // The name of the state. @@ -4118,12 +4292,25 @@ func (s *StateEnteredEventDetails) SetName(v string) *StateEnteredEventDetails { return s } +// Contains details about an exit from a state during an execution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StateExitedEventDetails type StateExitedEventDetails struct { _ struct{} `type:"structure"` // The name of the state. // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) + // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` @@ -4153,6 +4340,7 @@ func (s *StateExitedEventDetails) SetOutput(v string) *StateExitedEventDetails { return s } +// Contains details about the state machine. // Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StateMachineListItem type StateMachineListItem struct { _ struct{} `type:"structure"` @@ -4164,6 +4352,18 @@ type StateMachineListItem struct { // The name of the state machine. // + // A name must not contain: + // + // * whitespace + // + // * brackets < > { } [ ] + // + // * wildcard characters ? * + // + // * special characters " # % \ ^ | ~ ` $ & , ; : / + // + // * control characters (U+0000-001F, U+007F-009F) + // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` @@ -4374,6 +4574,9 @@ const ( // HistoryEventTypeSucceedStateExited is a HistoryEventType enum value HistoryEventTypeSucceedStateExited = "SucceedStateExited" + // HistoryEventTypeTaskStateAborted is a HistoryEventType enum value + HistoryEventTypeTaskStateAborted = "TaskStateAborted" + // HistoryEventTypeTaskStateEntered is a HistoryEventType enum value HistoryEventTypeTaskStateEntered = "TaskStateEntered" @@ -4386,12 +4589,27 @@ const ( // HistoryEventTypePassStateExited is a HistoryEventType enum value HistoryEventTypePassStateExited = "PassStateExited" + // HistoryEventTypeParallelStateAborted is a HistoryEventType enum value + HistoryEventTypeParallelStateAborted = "ParallelStateAborted" + // HistoryEventTypeParallelStateEntered is a HistoryEventType enum value HistoryEventTypeParallelStateEntered = "ParallelStateEntered" // HistoryEventTypeParallelStateExited is a HistoryEventType enum value HistoryEventTypeParallelStateExited = "ParallelStateExited" + // HistoryEventTypeParallelStateFailed is a HistoryEventType enum value + HistoryEventTypeParallelStateFailed = "ParallelStateFailed" + + // HistoryEventTypeParallelStateStarted is a HistoryEventType enum value + HistoryEventTypeParallelStateStarted = "ParallelStateStarted" + + // HistoryEventTypeParallelStateSucceeded is a HistoryEventType enum value + HistoryEventTypeParallelStateSucceeded = "ParallelStateSucceeded" + + // HistoryEventTypeWaitStateAborted is a HistoryEventType enum value + HistoryEventTypeWaitStateAborted = "WaitStateAborted" + // HistoryEventTypeWaitStateEntered is a HistoryEventType enum value HistoryEventTypeWaitStateEntered = "WaitStateEntered" diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go index eb36eb6e9..e67996ed2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go @@ -3,22 +3,24 @@ // Package sfn provides the client and types for making API // requests to AWS Step Functions. // -// AWS Step Functions is a web service that enables you to coordinate the components -// of distributed applications and microservices using visual workflows. You -// build applications from individual components that each perform a discrete -// function, or task, allowing you to scale and change applications quickly. -// Step Functions provides a graphical console to visualize the components of -// your application as a series of steps. It automatically triggers and tracks -// each step, and retries when there are errors, so your application executes -// in order and as expected, every time. Step Functions logs the state of each -// step, so when things do go wrong, you can diagnose and debug problems quickly. +// AWS Step Functions is a service that lets you coordinate the components of +// distributed applications and microservices using visual workflows. // -// Step Functions manages the operations and underlying infrastructure for you -// to ensure your application is available at any scale. You can run tasks on -// the AWS cloud, on your own servers, or an any system that has access to AWS. -// Step Functions can be accessed and used with the Step Functions console, -// the AWS SDKs (included with your Beta release invitation email), or an HTTP -// API (the subject of this document). +// You can use Step Functions to build applications from individual components, +// each of which performs a discrete function, or task, allowing you to scale +// and change applications quickly. Step Functions provides a console that helps +// visualize the components of your application as a series of steps. Step Functions +// automatically triggers and tracks each step, and retries steps when there +// are errors, so your application executes in order and as expected, every +// time. Step Functions logs the state of each step, so you can diagnose and +// debug problems quickly. +// +// Step Functions manages operations and underlying infrastructure to ensure +// your application is available at any scale. You can run tasks on AWS, your +// own servers, or any system that has access to AWS. You can access and use +// Step Functions using the console, the AWS SDKs, or an HTTP API. For more +// information about Step Functions, see the AWS Step Functions Developer Guide +// (http://docs.aws.amazon.com/step-functions/latest/dg/welcome.html). // // See https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23 for more information on this service. // @@ -27,7 +29,7 @@ // // Using the Client // -// To AWS Step Functions with the SDK use the New function to create +// To contact AWS Step Functions with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go index ee02f364d..510a8a79b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go @@ -27,7 +27,9 @@ const ( // ErrCodeExecutionAlreadyExists for service response error code // "ExecutionAlreadyExists". // - // An execution with the same name already exists. + // The execution has the same name as another execution (but a different input). + // + // Executions with the same name and input are considered idempotent. ErrCodeExecutionAlreadyExists = "ExecutionAlreadyExists" // ErrCodeExecutionDoesNotExist for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go index dba450063..f0d59281d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go @@ -24,7 +24,7 @@ // // Using the Client // -// To Amazon SimpleDB with the SDK use the New function to create +// To contact Amazon SimpleDB with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sns/doc.go index 2afaa9238..513ef2fb3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/doc.go @@ -24,7 +24,7 @@ // // Using the Client // -// To Amazon Simple Notification Service with the SDK use the New function to create +// To contact Amazon Simple Notification Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go index 2674bb244..082f69287 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go @@ -64,12 +64,12 @@ func (c *SQS) AddPermissionRequest(input *AddPermissionInput) (req *request.Requ // When you create a queue, you have full control access rights for the queue. // Only you, the owner of the queue, can grant or deny permissions to the queue. // For more information about these permissions, see Shared Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // // AddPermission writes an Amazon-SQS-generated policy. If you want to write // your own policy, use SetQueueAttributes to upload your policy. For more information // about writing your own policy, see Using The Access Policy Language (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AccessPolicyLanguage.html) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // // Some actions take lists of parameters. These lists are specified using the // param.n notation. Values of n are integers starting from 1. For example, @@ -165,16 +165,15 @@ func (c *SQS) ChangeMessageVisibilityRequest(input *ChangeMessageVisibilityInput // value. The maximum allowed timeout value is 12 hours. Thus, you can't extend // the timeout of a message in an existing queue to more than a total visibility // timeout of 12 hours. For more information, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // -// For example, you have a message and with the default visibility timeout of -// 5 minutes. After 3 minutes, you call ChangeMessageVisiblity with a timeout -// of 10 minutes. At that time, the timeout for the message is extended by 10 -// minutes beyond the time of the ChangeMessageVisibility action. This results -// in a total visibility timeout of 13 minutes. You can continue to call the -// ChangeMessageVisibility to extend the visibility timeout to a maximum of -// 12 hours. If you try to extend the visibility timeout beyond 12 hours, your -// request is rejected. +// For example, you have a message with a visibility timeout of 5 minutes. After +// 3 minutes, you call ChangeMessageVisiblity with a timeout of 10 minutes. +// At that time, the timeout for the message is extended by 10 minutes beyond +// the time of the ChangeMessageVisibility action. This results in a total visibility +// timeout of 13 minutes. You can continue to call the ChangeMessageVisibility +// to extend the visibility timeout to a maximum of 12 hours. If you try to +// extend the visibility timeout beyond 12 hours, your request is rejected. // // A message is considered to be in flight after it's received from a queue // by a consumer, but not yet deleted from the queue. @@ -393,7 +392,7 @@ func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, // new FIFO queue for your application or delete your existing standard queue // and recreate it as a FIFO queue. For more information, see Moving From // a Standard Queue to a FIFO Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-moving) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // // * If you don't provide a value for an attribute, the queue is created // with the default value for the attribute. @@ -713,7 +712,7 @@ func (c *SQS) DeleteQueueRequest(input *DeleteQueueInput) (req *request.Request, // DeleteQueue API operation for Amazon Simple Queue Service. // -// Deletes the queue specified by the QueueUrl, even if the queue is empty. +// Deletes the queue specified by the QueueUrl, regardless of the queue's contents. // If the specified queue doesn't exist, Amazon SQS returns a successful response. // // Be careful with the DeleteQueue action: When you delete a queue, any messages @@ -896,7 +895,7 @@ func (c *SQS) GetQueueUrlRequest(input *GetQueueUrlInput) (req *request.Request, // parameter to specify the account ID of the queue's owner. The queue's owner // must grant you permission to access the queue. For more information about // shared queue access, see AddPermission or see Shared Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -976,11 +975,11 @@ func (c *SQS) ListDeadLetterSourceQueuesRequest(input *ListDeadLetterSourceQueue // ListDeadLetterSourceQueues API operation for Amazon Simple Queue Service. // // Returns a list of your queues that have the RedrivePolicy queue attribute -// configured with a dead letter queue. +// configured with a dead-letter queue. // -// For more information about using dead letter queues, see Using Amazon SQS -// Dead Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) -// in the Amazon SQS Developer Guide. +// For more information about using dead-letter queues, see Using Amazon SQS +// Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) +// in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1015,6 +1014,100 @@ func (c *SQS) ListDeadLetterSourceQueuesWithContext(ctx aws.Context, input *List return out, req.Send() } +const opListQueueTags = "ListQueueTags" + +// ListQueueTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListQueueTags operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListQueueTags for more information on using the ListQueueTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListQueueTagsRequest method. +// req, resp := client.ListQueueTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueueTags +func (c *SQS) ListQueueTagsRequest(input *ListQueueTagsInput) (req *request.Request, output *ListQueueTagsOutput) { + op := &request.Operation{ + Name: opListQueueTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListQueueTagsInput{} + } + + output = &ListQueueTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListQueueTags API operation for Amazon Simple Queue Service. +// +// List all cost allocation tags added to the specified Amazon SQS queue. For +// an overview, see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// in the Amazon Simple Queue Service Developer Guide. +// +// When you use queue tags, keep the following guidelines in mind: +// +// * Adding more than 50 tags to a queue isn't recommended. +// +// * Tags don't have any semantic meaning. Amazon SQS interprets tags as +// character strings. +// +// * Tags are case-sensitive. +// +// * A new tag with a key identical to that of an existing tag overwrites +// the existing tag. +// +// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). +// +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// in the Amazon Simple Queue Service Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Queue Service's +// API operation ListQueueTags for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueueTags +func (c *SQS) ListQueueTags(input *ListQueueTagsInput) (*ListQueueTagsOutput, error) { + req, out := c.ListQueueTagsRequest(input) + return out, req.Send() +} + +// ListQueueTagsWithContext is the same as ListQueueTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListQueueTags for details on how to use this API operation. +// +// 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 *SQS) ListQueueTagsWithContext(ctx aws.Context, input *ListQueueTagsInput, opts ...request.Option) (*ListQueueTagsOutput, error) { + req, out := c.ListQueueTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListQueues = "ListQueues" // ListQueuesRequest generates a "aws/request.Request" representing the @@ -1233,7 +1326,7 @@ func (c *SQS) ReceiveMessageRequest(input *ReceiveMessageInput) (req *request.Re // Retrieves one or more messages (up to 10), from the specified queue. Using // the WaitTimeSeconds parameter enables long-poll support. For more information, // see Amazon SQS Long Polling (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // // Short poll is the default behavior where a weighted random set of machines // is sampled on a ReceiveMessage call. Thus, only the messages on the sampled @@ -1260,19 +1353,19 @@ func (c *SQS) ReceiveMessageRequest(input *ReceiveMessageInput) (req *request.Re // // The receipt handle is the identifier you must provide when deleting the message. // For more information, see Queue and Message Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // // You can provide the VisibilityTimeout parameter in your request. The parameter // is applied to the messages that Amazon SQS returns in the response. If you // don't include the parameter, the overall visibility timeout for the queue // is used for the returned messages. For more information, see Visibility Timeout // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // // A message that isn't deleted or a message whose visibility isn't extended // before the visibility timeout expires counts as a failed receive. Depending -// on the configuration of the queue, the message might be sent to the dead -// letter queue. +// on the configuration of the queue, the message might be sent to the dead-letter +// queue. // // In the future, new attributes might be added. If you write code that calls // this action, we recommend that you structure your code so that it can handle @@ -1693,6 +1786,198 @@ func (c *SQS) SetQueueAttributesWithContext(ctx aws.Context, input *SetQueueAttr return out, req.Send() } +const opTagQueue = "TagQueue" + +// TagQueueRequest generates a "aws/request.Request" representing the +// client's request for the TagQueue operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagQueue for more information on using the TagQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagQueueRequest method. +// req, resp := client.TagQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/TagQueue +func (c *SQS) TagQueueRequest(input *TagQueueInput) (req *request.Request, output *TagQueueOutput) { + op := &request.Operation{ + Name: opTagQueue, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagQueueInput{} + } + + output = &TagQueueOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagQueue API operation for Amazon Simple Queue Service. +// +// Add cost allocation tags to the specified Amazon SQS queue. For an overview, +// see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// in the Amazon Simple Queue Service Developer Guide. +// +// When you use queue tags, keep the following guidelines in mind: +// +// * Adding more than 50 tags to a queue isn't recommended. +// +// * Tags don't have any semantic meaning. Amazon SQS interprets tags as +// character strings. +// +// * Tags are case-sensitive. +// +// * A new tag with a key identical to that of an existing tag overwrites +// the existing tag. +// +// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). +// +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// in the Amazon Simple Queue Service Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Queue Service's +// API operation TagQueue for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/TagQueue +func (c *SQS) TagQueue(input *TagQueueInput) (*TagQueueOutput, error) { + req, out := c.TagQueueRequest(input) + return out, req.Send() +} + +// TagQueueWithContext is the same as TagQueue with the addition of +// the ability to pass a context and additional request options. +// +// See TagQueue for details on how to use this API operation. +// +// 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 *SQS) TagQueueWithContext(ctx aws.Context, input *TagQueueInput, opts ...request.Option) (*TagQueueOutput, error) { + req, out := c.TagQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagQueue = "UntagQueue" + +// UntagQueueRequest generates a "aws/request.Request" representing the +// client's request for the UntagQueue operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagQueue for more information on using the UntagQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagQueueRequest method. +// req, resp := client.UntagQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/UntagQueue +func (c *SQS) UntagQueueRequest(input *UntagQueueInput) (req *request.Request, output *UntagQueueOutput) { + op := &request.Operation{ + Name: opUntagQueue, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagQueueInput{} + } + + output = &UntagQueueOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagQueue API operation for Amazon Simple Queue Service. +// +// Remove cost allocation tags from the specified Amazon SQS queue. For an overview, +// see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// in the Amazon Simple Queue Service Developer Guide. +// +// When you use queue tags, keep the following guidelines in mind: +// +// * Adding more than 50 tags to a queue isn't recommended. +// +// * Tags don't have any semantic meaning. Amazon SQS interprets tags as +// character strings. +// +// * Tags are case-sensitive. +// +// * A new tag with a key identical to that of an existing tag overwrites +// the existing tag. +// +// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). +// +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// in the Amazon Simple Queue Service Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Queue Service's +// API operation UntagQueue for usage and error information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/UntagQueue +func (c *SQS) UntagQueue(input *UntagQueueInput) (*UntagQueueOutput, error) { + req, out := c.UntagQueueRequest(input) + return out, req.Send() +} + +// UntagQueueWithContext is the same as UntagQueue with the addition of +// the ability to pass a context and additional request options. +// +// See UntagQueue for details on how to use this API operation. +// +// 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 *SQS) UntagQueueWithContext(ctx aws.Context, input *UntagQueueInput, opts ...request.Option) (*UntagQueueOutput, error) { + req, out := c.UntagQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/AddPermissionRequest type AddPermissionInput struct { _ struct{} `type:"structure"` @@ -1701,7 +1986,7 @@ type AddPermissionInput struct { // who is given permission. The principal must have an AWS account, but does // not need to be signed up for Amazon SQS. For information about locating the // AWS account identification, see Your AWS Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AWSCredentials.html) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // AWSAccountIds is a required field AWSAccountIds []*string `locationNameList:"AWSAccountId" type:"list" flattened:"true" required:"true"` @@ -1724,7 +2009,7 @@ type AddPermissionInput struct { // * SendMessage // // For more information about these actions, see Understanding Permissions (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html#PermissionTypes) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // Specifying SendMessage, DeleteMessage, or ChangeMessageVisibility for ActionName.n // also grants permissions for the corresponding batch versions of those actions: @@ -2203,25 +2488,33 @@ type CreateQueueInput struct { // which a ReceiveMessage action waits for a message to arrive. Valid values: // An integer from 0 to 20 (seconds). The default is 0 (zero). // - // * RedrivePolicy - The parameters for the dead letter queue functionality - // of the source queue. For more information about the redrive policy and - // dead letter queues, see Using Amazon SQS Dead Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) - // in the Amazon SQS Developer Guide. + // * RedrivePolicy - The string that includes the parameters for the dead-letter + // queue functionality of the source queue. For more information about the + // redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter + // Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) + // in the Amazon Simple Queue Service Developer Guide. // - // The dead letter queue of a FIFO queue must also be a FIFO queue. Similarly, - // the dead letter queue of a standard queue must also be a standard queue. + // deadLetterTargetArn - The Amazon Resource Name (ARN) of the dead-letter queue + // to which Amazon SQS moves messages after the value of maxReceiveCount + // is exceeded. + // + // maxReceiveCount - The number of times a message is delivered to the source + // queue before being moved to the dead-letter queue. + // + // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, + // the dead-letter queue of a standard queue must also be a standard queue. // // * VisibilityTimeout - The visibility timeout for the queue. Valid values: // An integer from 0 to 43,200 (12 hours). The default is 30. For more information // about the visibility timeout, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): // // * KmsMasterKeyId - The ID of an AWS-managed customer master key (CMK) // for Amazon SQS or a custom CMK. For more information, see Key Terms (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms). // While the alias of the AWS-managed CMK for Amazon SQS is always alias/aws/sqs, - // the alias of a custom CMK can, for example, be alias/aws/sqs. For more + // the alias of a custom CMK can, for example, be alias/MyAlias. For more // examples, see KeyId (http://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) // in the AWS Key Management Service API Reference. // @@ -2230,9 +2523,9 @@ type CreateQueueInput struct { // to encrypt or decrypt messages before calling AWS KMS again. An integer // representing seconds, between 60 seconds (1 minute) and 86,400 seconds // (24 hours). The default is 300 (5 minutes). A shorter time period provides - // better security but results in more calls to KMS which incur charges after - // Free Tier. For more information, see How Does the Data Key Reuse Period - // Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). + // better security but results in more calls to KMS which might incur charges + // after Free Tier. For more information, see How Does the Data Key Reuse + // Period Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // // // The following attributes apply only to FIFO (first-in-first-out) queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): @@ -2243,12 +2536,12 @@ type CreateQueueInput struct { // the MessageGroupId for your messages explicitly. // // For more information, see FIFO Queue Logic (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-understanding-logic) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // * ContentBasedDeduplication - Enables content-based deduplication. Valid // values: true, false. For more information, see Exactly-Once Processing // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // Every message must have a unique MessageDeduplicationId, // @@ -2696,7 +2989,7 @@ type GetQueueAttributesInput struct { // * ApproximateNumberOfMessages - Returns the approximate number of visible // messages in a queue. For more information, see Resources Required to Process // Messages (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-resources-required-process-messages.html) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // * ApproximateNumberOfMessagesDelayed - Returns the approximate number // of messages that are waiting to be added to the queue. @@ -2704,7 +2997,7 @@ type GetQueueAttributesInput struct { // * ApproximateNumberOfMessagesNotVisible - Returns the approximate number // of messages that have not timed-out and aren't deleted. For more information, // see Resources Required to Process Messages (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-resources-required-process-messages.html) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // * CreatedTimestamp - Returns the time when the queue was created in seconds // (epoch time (http://en.wikipedia.org/wiki/Unix_time)). @@ -2727,15 +3020,23 @@ type GetQueueAttributesInput struct { // * ReceiveMessageWaitTimeSeconds - Returns the length of time, in seconds, // for which the ReceiveMessage action waits for a message to arrive. // - // * RedrivePolicy - Returns the parameters for dead letter queue functionality - // of the source queue. For more information about the redrive policy and - // dead letter queues, see Using Amazon SQS Dead Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) - // in the Amazon SQS Developer Guide. + // * RedrivePolicy - Returns the string that includes the parameters for + // dead-letter queue functionality of the source queue. For more information + // about the redrive policy and dead-letter queues, see Using Amazon SQS + // Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) + // in the Amazon Simple Queue Service Developer Guide. + // + // deadLetterTargetArn - The Amazon Resource Name (ARN) of the dead-letter queue + // to which Amazon SQS moves messages after the value of maxReceiveCount + // is exceeded. + // + // maxReceiveCount - The number of times a message is delivered to the source + // queue before being moved to the dead-letter queue. // // * VisibilityTimeout - Returns the visibility timeout for the queue. For // more information about the visibility timeout, see Visibility Timeout // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): // @@ -2746,13 +3047,15 @@ type GetQueueAttributesInput struct { // // * KmsDataKeyReusePeriodSeconds - Returns the length of time, in seconds, // for which Amazon SQS can reuse a data key to encrypt or decrypt messages - // before calling AWS KMS again. + // before calling AWS KMS again. For more information, see How Does the Data + // Key Reuse Period Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). + // // // The following attributes apply only to FIFO (first-in-first-out) queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): // // * FifoQueue - Returns whether the queue is FIFO. For more information, // see FIFO Queue Logic (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-understanding-logic) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // To determine whether a queue is FIFO (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html), // you can check whether QueueName ends with the .fifo suffix. @@ -2760,7 +3063,7 @@ type GetQueueAttributesInput struct { // * ContentBasedDeduplication - Returns whether content-based deduplication // is enabled for the queue. For more information, see Exactly-Once Processing // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"` // The URL of the Amazon SQS queue whose attribute information is retrieved. @@ -2883,7 +3186,7 @@ func (s *GetQueueUrlInput) SetQueueOwnerAWSAccountId(v string) *GetQueueUrlInput } // For more information, see Responses (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/UnderstandingResponses.html) -// in the Amazon SQS Developer Guide. +// in the Amazon Simple Queue Service Developer Guide. // Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueUrlResult type GetQueueUrlOutput struct { _ struct{} `type:"structure"` @@ -2912,7 +3215,7 @@ func (s *GetQueueUrlOutput) SetQueueUrl(v string) *GetQueueUrlOutput { type ListDeadLetterSourceQueuesInput struct { _ struct{} `type:"structure"` - // The URL of a dead letter queue. + // The URL of a dead-letter queue. // // Queue URLs are case-sensitive. // @@ -2955,7 +3258,7 @@ type ListDeadLetterSourceQueuesOutput struct { _ struct{} `type:"structure"` // A list of source queue URLs that have the RedrivePolicy queue attribute configured - // with a dead letter queue. + // with a dead-letter queue. // // QueueUrls is a required field QueueUrls []*string `locationName:"queueUrls" locationNameList:"QueueUrl" type:"list" flattened:"true" required:"true"` @@ -2977,6 +3280,69 @@ func (s *ListDeadLetterSourceQueuesOutput) SetQueueUrls(v []*string) *ListDeadLe return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueueTagsRequest +type ListQueueTagsInput struct { + _ struct{} `type:"structure"` + + // The URL of the queue. + // + // QueueUrl is a required field + QueueUrl *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListQueueTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListQueueTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListQueueTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListQueueTagsInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueueUrl sets the QueueUrl field's value. +func (s *ListQueueTagsInput) SetQueueUrl(v string) *ListQueueTagsInput { + s.QueueUrl = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueueTagsResult +type ListQueueTagsOutput struct { + _ struct{} `type:"structure"` + + // The list of all tags added to the specified queue. + Tags map[string]*string `locationName:"Tag" locationNameKey:"Key" locationNameValue:"Value" type:"map" flattened:"true"` +} + +// String returns the string representation +func (s ListQueueTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListQueueTagsOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListQueueTagsOutput) SetTags(v map[string]*string) *ListQueueTagsOutput { + s.Tags = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListQueuesRequest type ListQueuesInput struct { _ struct{} `type:"structure"` @@ -3054,7 +3420,7 @@ type Message struct { // Each message attribute consists of a Name, Type, and Value. For more information, // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` // A unique identifier for the message. A MessageIdis considered unique across @@ -3144,7 +3510,7 @@ type MessageAttributeValue struct { // // You can also append custom labels. For more information, see Message Attribute // Data Types and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-data-types-validation) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // DataType is a required field DataType *string `type:"string" required:"true"` @@ -3428,7 +3794,8 @@ type ReceiveMessageInput struct { // The duration (in seconds) for which the call waits for a message to arrive // in the queue before returning. If a message is available, the call returns - // sooner than WaitTimeSeconds. + // sooner than WaitTimeSeconds. If no messages are available and the wait time + // expires, the call returns successfully with an empty list of messages. WaitTimeSeconds *int64 `type:"integer"` } @@ -3722,7 +4089,7 @@ type SendMessageBatchRequestEntry struct { // Each message attribute consists of a Name, Type, and Value. For more information, // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` // The body of the message. @@ -3737,7 +4104,7 @@ type SendMessageBatchRequestEntry struct { // subsequent messages with the same MessageDeduplicationId are accepted successfully // but aren't delivered. For more information, see Exactly-Once Processing // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // * Every message must have a unique MessageDeduplicationId, // @@ -3972,7 +4339,7 @@ type SendMessageInput struct { // Each message attribute consists of a Name, Type, and Value. For more information, // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` // The message to send. The maximum string size is 256 KB. @@ -3995,7 +4362,7 @@ type SendMessageInput struct { // MessageDeduplicationId are accepted successfully but aren't delivered during // the 5-minute deduplication interval. For more information, see Exactly-Once // Processing (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // * Every message must have a unique MessageDeduplicationId, // @@ -4163,7 +4530,7 @@ type SendMessageOutput struct { // An attribute containing the MessageId of the message sent to the queue. For // more information, see Queue and Message Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. MessageId *string `type:"string"` // This parameter applies only to FIFO (first-in-first-out) queues. @@ -4240,25 +4607,33 @@ type SetQueueAttributesInput struct { // which a ReceiveMessage action waits for a message to arrive. Valid values: // an integer from 0 to 20 (seconds). The default is 0. // - // * RedrivePolicy - The parameters for the dead letter queue functionality - // of the source queue. For more information about the redrive policy and - // dead letter queues, see Using Amazon SQS Dead Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) - // in the Amazon SQS Developer Guide. + // * RedrivePolicy - The string that includes the parameters for the dead-letter + // queue functionality of the source queue. For more information about the + // redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter + // Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) + // in the Amazon Simple Queue Service Developer Guide. // - // The dead letter queue of a FIFO queue must also be a FIFO queue. Similarly, - // the dead letter queue of a standard queue must also be a standard queue. + // deadLetterTargetArn - The Amazon Resource Name (ARN) of the dead-letter queue + // to which Amazon SQS moves messages after the value of maxReceiveCount + // is exceeded. + // + // maxReceiveCount - The number of times a message is delivered to the source + // queue before being moved to the dead-letter queue. + // + // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, + // the dead-letter queue of a standard queue must also be a standard queue. // // * VisibilityTimeout - The visibility timeout for the queue. Valid values: // an integer from 0 to 43,200 (12 hours). The default is 30. For more information // about the visibility timeout, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): // // * KmsMasterKeyId - The ID of an AWS-managed customer master key (CMK) // for Amazon SQS or a custom CMK. For more information, see Key Terms (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms). // While the alias of the AWS-managed CMK for Amazon SQS is always alias/aws/sqs, - // the alias of a custom CMK can, for example, be alias/aws/sqs. For more + // the alias of a custom CMK can, for example, be alias/MyAlias. For more // examples, see KeyId (http://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) // in the AWS Key Management Service API Reference. // @@ -4267,9 +4642,9 @@ type SetQueueAttributesInput struct { // to encrypt or decrypt messages before calling AWS KMS again. An integer // representing seconds, between 60 seconds (1 minute) and 86,400 seconds // (24 hours). The default is 300 (5 minutes). A shorter time period provides - // better security but results in more calls to KMS which incur charges after - // Free Tier. For more information, see How Does the Data Key Reuse Period - // Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). + // better security but results in more calls to KMS which might incur charges + // after Free Tier. For more information, see How Does the Data Key Reuse + // Period Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // // // The following attribute applies only to FIFO (first-in-first-out) queues @@ -4277,7 +4652,7 @@ type SetQueueAttributesInput struct { // // * ContentBasedDeduplication - Enables content-based deduplication. For // more information, see Exactly-Once Processing (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-exactly-once-processing) - // in the Amazon SQS Developer Guide. + // in the Amazon Simple Queue Service Developer Guide. // // Every message must have a unique MessageDeduplicationId, // @@ -4381,6 +4756,142 @@ func (s SetQueueAttributesOutput) GoString() string { return s.String() } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/TagQueueRequest +type TagQueueInput struct { + _ struct{} `type:"structure"` + + // The URL of the queue. + // + // QueueUrl is a required field + QueueUrl *string `type:"string" required:"true"` + + // The list of tags to be added to the specified queue. + // + // Tags is a required field + Tags map[string]*string `locationName:"Tag" locationNameKey:"Key" locationNameValue:"Value" type:"map" flattened:"true" required:"true"` +} + +// String returns the string representation +func (s TagQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagQueueInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueueUrl sets the QueueUrl field's value. +func (s *TagQueueInput) SetQueueUrl(v string) *TagQueueInput { + s.QueueUrl = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagQueueInput) SetTags(v map[string]*string) *TagQueueInput { + s.Tags = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/TagQueueOutput +type TagQueueOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagQueueOutput) GoString() string { + return s.String() +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/UntagQueueRequest +type UntagQueueInput struct { + _ struct{} `type:"structure"` + + // The URL of the queue. + // + // QueueUrl is a required field + QueueUrl *string `type:"string" required:"true"` + + // The list of tags to be removed from the specified queue. + // + // TagKeys is a required field + TagKeys []*string `locationNameList:"TagKey" type:"list" flattened:"true" required:"true"` +} + +// String returns the string representation +func (s UntagQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagQueueInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueueUrl sets the QueueUrl field's value. +func (s *UntagQueueInput) SetQueueUrl(v string) *UntagQueueInput { + s.QueueUrl = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagQueueInput) SetTagKeys(v []*string) *UntagQueueInput { + s.TagKeys = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/UntagQueueOutput +type UntagQueueOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagQueueOutput) GoString() string { + return s.String() +} + const ( // MessageSystemAttributeNameSenderId is a MessageSystemAttributeName enum value MessageSystemAttributeNameSenderId = "SenderId" diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go index 23a359934..7f0c5799f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go @@ -12,7 +12,8 @@ // // Standard queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html) // are available in all regions. FIFO queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html) -// are available in US West (Oregon) and US East (Ohio). +// are available in the US East (N. Virginia), US East (Ohio), US West (Oregon), +// and EU (Ireland) regions. // // You can use AWS SDKs (http://aws.amazon.com/tools/#sdk) to access Amazon // SQS using your favorite programming language. The SDKs perform tasks such @@ -28,13 +29,13 @@ // // * Amazon SQS Product Page (http://aws.amazon.com/sqs/) // -// * Amazon SQS Developer Guide +// * Amazon Simple Queue Service Developer Guide // // Making API Requests (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/MakingRequestsArticle.html) // // Using Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // -// Using Amazon SQS Dead Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) +// Using Amazon SQS Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) // // * Amazon Web Services General Reference // @@ -47,7 +48,7 @@ // // Using the Client // -// To Amazon Simple Queue Service with the SDK use the New function to create +// To contact Amazon Simple Queue Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index b857fe4ba..9b61da93b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -56,14 +56,14 @@ func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ // AddTagsToResource API operation for Amazon Simple Systems Manager (SSM). // // Adds or overwrites one or more tags for the specified resource. Tags are -// metadata that you assign to your managed instances, Maintenance Windows, -// or Parameter Store parameters. Tags enable you to categorize your resources -// in different ways, for example, by purpose, owner, or environment. Each tag -// consists of a key and an optional value, both of which you define. For example, -// you could define a set of tags for your account's managed instances that -// helps you track each instance's owner and stack level. For example: Key=Owner -// and Value=DbAdmin, SysAdmin, or Dev. Or Key=Stack and Value=Production, Pre-Production, -// or Test. +// metadata that you can assign to your documents, managed instances, Maintenance +// Windows, Parameter Store parameters, and patch baselines. Tags enable you +// to categorize your resources in different ways, for example, by purpose, +// owner, or environment. Each tag consists of a key and an optional value, +// both of which you define. For example, you could define a set of tags for +// your account's managed instances that helps you track each instance's owner +// and stack level. For example: Key=Owner and Value=DbAdmin, SysAdmin, or Dev. +// Or Key=Stack and Value=Production, Pre-Production, or Test. // // Each resource can have a maximum of 10 tags. // @@ -85,8 +85,8 @@ func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ // // Returned Error Codes: // * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. If you are attempting to tag an instance, -// the instance must be a registered, managed instance. +// The resource type is not valid. For example, if you are attempting to tag +// an instance, the instance must be a registered, managed instance. // // * ErrCodeInvalidResourceId "InvalidResourceId" // The resource ID is not valid. Verify that you entered the correct ID and @@ -404,8 +404,9 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ // The output location is not valid or does not exist. // // * ErrCodeInvalidParameters "InvalidParameters" -// You must specify values for all required parameters in the SSM document. -// You can only supply values to parameters defined in the SSM document. +// You must specify values for all required parameters in the Systems Manager +// document. You can only supply values to parameters defined in the Systems +// Manager document. // // * ErrCodeInvalidTarget "InvalidTarget" // The target is not valid or does not exist. It might not be configured for @@ -523,8 +524,9 @@ func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) // Stopping. Invalid states are: Shutting-down and Terminated. // // * ErrCodeInvalidParameters "InvalidParameters" -// You must specify values for all required parameters in the SSM document. -// You can only supply values to parameters defined in the SSM document. +// You must specify values for all required parameters in the Systems Manager +// document. You can only supply values to parameters defined in the Systems +// Manager document. // // * ErrCodeDuplicateInstanceId "DuplicateInstanceId" // You cannot specify an instance ID in more than one association. @@ -638,7 +640,7 @@ func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Re // The content for the document is not valid. // // * ErrCodeDocumentLimitExceeded "DocumentLimitExceeded" -// You can have at most 200 active SSM documents. +// You can have at most 200 active Systems Manager documents. // // * ErrCodeInvalidDocumentSchemaVersion "InvalidDocumentSchemaVersion" // The version of the document schema is not supported. @@ -886,8 +888,7 @@ func (c *SSM) CreateResourceDataSyncRequest(input *CreateResourceDataSyncInput) // Creates a resource data sync configuration to a single bucket in Amazon S3. // This is an asynchronous operation that returns immediately. After a successful // initial sync is completed, the system continuously syncs data to the Amazon -// S3 bucket. To check the status of the sync, use the ListResourceDataSync -// (API_ListResourceDataSync.html) operation. +// S3 bucket. To check the status of the sync, use the ListResourceDataSync. // // By default, data is not encrypted in Amazon S3. We strongly recommend that // you enable encryption in Amazon S3 to ensure secure data storage. We also @@ -1006,6 +1007,10 @@ func (c *SSM) DeleteActivationRequest(input *DeleteActivationInput) (req *reques // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // +// * ErrCodeTooManyUpdates "TooManyUpdates" +// There are concurrent updates for a resource that supports one update at a +// time. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteActivation func (c *SSM) DeleteActivation(input *DeleteActivationInput) (*DeleteActivationOutput, error) { req, out := c.DeleteActivationRequest(input) @@ -2177,8 +2182,11 @@ func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req * // DescribeAssociation API operation for Amazon Simple Systems Manager (SSM). // -// Describes the associations for the specified Systems Manager document or -// instance. +// Describes the association for the specified target or instance. If you created +// the association by using the Targets parameter, then you must retrieve the +// association by using the association ID. If you created the association by +// specifying an instance ID and a Systems Manager document, then you retrieve +// the association by specifying the document name and the instance ID. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2444,7 +2452,7 @@ func (c *SSM) DescribeDocumentRequest(input *DescribeDocumentInput) (req *reques // DescribeDocument API operation for Amazon Simple Systems Manager (SSM). // -// Describes the specified SSM document. +// Describes the specified Systems Manager document. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4582,7 +4590,7 @@ func (c *SSM) GetDocumentRequest(input *GetDocumentInput) (req *request.Request, // GetDocument API operation for Amazon Simple Systems Manager (SSM). // -// Gets the contents of the specified SSM document. +// Gets the contents of the specified Systems Manager document. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5282,6 +5290,10 @@ func (c *SSM) GetParameterRequest(input *GetParameterInput) (req *request.Reques // * ErrCodeParameterNotFound "ParameterNotFound" // The parameter could not be found. Verify the name and try again. // +// * ErrCodeParameterVersionNotFound "ParameterVersionNotFound" +// The specified parameter version was not found. Verify the parameter name +// and version, and try again. +// // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameter func (c *SSM) GetParameter(input *GetParameterInput) (*GetParameterOutput, error) { req, out := c.GetParameterRequest(input) @@ -6458,8 +6470,8 @@ func (c *SSM) ListComplianceItemsRequest(input *ListComplianceItemsInput) (req * // // Returned Error Codes: // * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. If you are attempting to tag an instance, -// the instance must be a registered, managed instance. +// The resource type is not valid. For example, if you are attempting to tag +// an instance, the instance must be a registered, managed instance. // // * ErrCodeInvalidResourceId "InvalidResourceId" // The resource ID is not valid. Verify that you entered the correct ID and @@ -6720,7 +6732,7 @@ func (c *SSM) ListDocumentsRequest(input *ListDocumentsInput) (req *request.Requ // ListDocuments API operation for Amazon Simple Systems Manager (SSM). // -// Describes one or more of your SSM documents. +// Describes one or more of your Systems Manager documents. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7149,8 +7161,8 @@ func (c *SSM) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req * // // Returned Error Codes: // * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. If you are attempting to tag an instance, -// the instance must be a registered, managed instance. +// The resource type is not valid. For example, if you are attempting to tag +// an instance, the instance must be a registered, managed instance. // // * ErrCodeInvalidResourceId "InvalidResourceId" // The resource ID is not valid. Verify that you entered the correct ID and @@ -7254,7 +7266,7 @@ func (c *SSM) ModifyDocumentPermissionRequest(input *ModifyDocumentPermissionInp // documents. If you need to increase this limit, contact AWS Support. // // * ErrCodeDocumentLimitExceeded "DocumentLimitExceeded" -// You can have at most 200 active SSM documents. +// You can have at most 200 active Systems Manager documents. // // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ModifyDocumentPermission func (c *SSM) ModifyDocumentPermission(input *ModifyDocumentPermissionInput) (*ModifyDocumentPermissionOutput, error) { @@ -7353,8 +7365,8 @@ func (c *SSM) PutComplianceItemsRequest(input *PutComplianceItemsInput) (req *re // of 10 different types. // // * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. If you are attempting to tag an instance, -// the instance must be a registered, managed instance. +// The resource type is not valid. For example, if you are attempting to tag +// an instance, the instance must be a registered, managed instance. // // * ErrCodeInvalidResourceId "InvalidResourceId" // The resource ID is not valid. Verify that you entered the correct ID and @@ -7600,6 +7612,9 @@ func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Reques // * ErrCodeInvalidAllowedPatternException "InvalidAllowedPatternException" // The request does not meet the regular expression requirement. // +// * ErrCodeParameterMaxVersionLimitExceeded "ParameterMaxVersionLimitExceeded" +// The parameter exceeded the maximum number of allowed versions. +// // * ErrCodeParameterPatternMismatchException "ParameterPatternMismatchException" // The parameter name is not valid. // @@ -8051,8 +8066,8 @@ func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) // // Returned Error Codes: // * ErrCodeInvalidResourceType "InvalidResourceType" -// The resource type is not valid. If you are attempting to tag an instance, -// the instance must be a registered, managed instance. +// The resource type is not valid. For example, if you are attempting to tag +// an instance, the instance must be a registered, managed instance. // // * ErrCodeInvalidResourceId "InvalidResourceId" // The resource ID is not valid. Verify that you entered the correct ID and @@ -8252,8 +8267,9 @@ func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, // The S3 bucket does not exist. // // * ErrCodeInvalidParameters "InvalidParameters" -// You must specify values for all required parameters in the SSM document. -// You can only supply values to parameters defined in the SSM document. +// You must specify values for all required parameters in the Systems Manager +// document. You can only supply values to parameters defined in the Systems +// Manager document. // // * ErrCodeUnsupportedPlatformType "UnsupportedPlatformType" // The document does not support the platform type of the given instance ID(s). @@ -8364,6 +8380,10 @@ func (c *SSM) StartAutomationExecutionRequest(input *StartAutomationExecutionInp // * ErrCodeAutomationDefinitionVersionNotFoundException "AutomationDefinitionVersionNotFoundException" // An Automation document with the specified name and version could not be found. // +// * ErrCodeIdempotentParameterMismatch "IdempotentParameterMismatch" +// Error returned when an idempotent operation is retried and the parameters +// don't match the original call to the API with the same idempotency token. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -8534,8 +8554,9 @@ func (c *SSM) UpdateAssociationRequest(input *UpdateAssociationInput) (req *requ // The schedule is invalid. Verify your cron or rate expression and try again. // // * ErrCodeInvalidParameters "InvalidParameters" -// You must specify values for all required parameters in the SSM document. -// You can only supply values to parameters defined in the SSM document. +// You must specify values for all required parameters in the Systems Manager +// document. You can only supply values to parameters defined in the Systems +// Manager document. // // * ErrCodeInvalidOutputLocation "InvalidOutputLocation" // The output location is not valid or does not exist. @@ -9459,6 +9480,11 @@ type AddTagsToResourceInput struct { // The resource ID you want to tag. // + // For the ManagedInstance, MaintenanceWindow, and PatchBaseline values, use + // the ID of the resource, such as mw-01234361858c9b57b for a Maintenance Window. + // + // For the Document and Parameter values, use the name of the resource. + // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` @@ -9571,7 +9597,7 @@ type Association struct { // The date on which the association was last run. LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` - // The name of the SSM document. + // The name of the Systems Manager document. Name *string `type:"string"` // Information about the association. @@ -9686,7 +9712,7 @@ type AssociationDescription struct { // The date when the association was last updated. LastUpdateAssociationDate *time.Time `type:"timestamp" timestampFormat:"unix"` - // The name of the SSM document. + // The name of the Systems Manager document. Name *string `type:"string"` // An Amazon S3 bucket where you want to store the output details of the request. @@ -10014,7 +10040,8 @@ type AssociationVersionInfo struct { // The date the association version was created. CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` - // The version of an SSM document used when the association version was created. + // The version of a Systems Manager document used when the association version + // was created. DocumentVersion *string `type:"string"` // The name specified when the association was created. @@ -11411,7 +11438,7 @@ type ComplianceStringFilter struct { Type *string `type:"string" enum:"ComplianceQueryOperatorType"` // The value for which to search. - Values []*string `locationNameList:"FilterValue" min:"1" type:"list"` + Values []*string `min:"1" type:"list"` } // String returns the string representation @@ -11662,7 +11689,7 @@ type CreateAssociationBatchInput struct { // One or more associations. // // Entries is a required field - Entries []*CreateAssociationBatchRequestEntry `locationNameList:"entries" min:"1" type:"list" required:"true"` + Entries []*CreateAssociationBatchRequestEntry `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -11712,10 +11739,10 @@ type CreateAssociationBatchOutput struct { _ struct{} `type:"structure"` // Information about the associations that failed. - Failed []*FailedCreateAssociation `locationNameList:"FailedCreateAssociationEntry" type:"list"` + Failed []*FailedCreateAssociation `type:"list"` // Information about the associations that succeeded. - Successful []*AssociationDescription `locationNameList:"AssociationDescription" type:"list"` + Successful []*AssociationDescription `type:"list"` } // String returns the string representation @@ -12286,9 +12313,8 @@ type CreatePatchBaselineInput struct { // Name is a required field Name *string `min:"3" type:"string" required:"true"` - // Defines the operating system the patch baseline applies to. Supported operating - // systems include WINDOWS, AMAZON_LINUX, UBUNTU and REDHAT_ENTERPRISE_LINUX. - // The Default value is WINDOWS. + // Defines the operating system the patch baseline applies to. The Default value + // is WINDOWS. OperatingSystem *string `type:"string" enum:"OperatingSystem"` // A list of explicitly rejected patches for the baseline. @@ -13461,7 +13487,7 @@ type DescribeAssociationInput struct { // The instance ID. InstanceId *string `type:"string"` - // The name of the SSM document. + // The name of the Systems Manager document. Name *string `type:"string"` } @@ -13737,7 +13763,7 @@ type DescribeDocumentInput struct { // or the default version. DocumentVersion *string `type:"string"` - // The name of the SSM document. + // The name of the Systems Manager document. // // Name is a required field Name *string `type:"string" required:"true"` @@ -13782,7 +13808,7 @@ func (s *DescribeDocumentInput) SetName(v string) *DescribeDocumentInput { type DescribeDocumentOutput struct { _ struct{} `type:"structure"` - // Information about the SSM document. + // Information about the Systems Manager document. Document *DocumentDescription `type:"structure"` } @@ -13861,7 +13887,7 @@ type DescribeDocumentPermissionOutput struct { // The account IDs that have permission to use this document. The ID can be // either an AWS account or All. - AccountIds []*string `locationNameList:"AccountId" type:"list"` + AccountIds []*string `type:"list"` } // String returns the string representation @@ -14177,10 +14203,10 @@ type DescribeInstanceInformationInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of instances. - Filters []*InstanceInformationStringFilter `locationNameList:"InstanceInformationStringFilter" type:"list"` + Filters []*InstanceInformationStringFilter `type:"list"` // One or more filters. Use a filter to return a more specific list of instances. - InstanceInformationFilterList []*InstanceInformationFilter `locationNameList:"InstanceInformationFilter" type:"list"` + InstanceInformationFilterList []*InstanceInformationFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of @@ -14264,7 +14290,7 @@ type DescribeInstanceInformationOutput struct { _ struct{} `type:"structure"` // The instance information list. - InstanceInformationList []*InstanceInformation `locationNameList:"InstanceInformation" type:"list"` + InstanceInformationList []*InstanceInformation `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -15851,7 +15877,7 @@ func (s *DocumentDefaultVersionDescription) SetName(v string) *DocumentDefaultVe return s } -// Describes an SSM document. +// Describes a Systems Manager document. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DocumentDescription type DocumentDescription struct { _ struct{} `type:"structure"` @@ -15884,26 +15910,29 @@ type DocumentDescription struct { // The latest version of the document. LatestVersion *string `type:"string"` - // The name of the SSM document. + // The name of the Systems Manager document. Name *string `type:"string"` - // The AWS user account of the person who created the document. + // The AWS user account that created the document. Owner *string `type:"string"` // A description of the parameters for a document. - Parameters []*DocumentParameter `locationNameList:"DocumentParameter" type:"list"` + Parameters []*DocumentParameter `type:"list"` - // The list of OS platforms compatible with this SSM document. - PlatformTypes []*string `locationNameList:"PlatformType" type:"list"` + // The list of OS platforms compatible with this Systems Manager document. + PlatformTypes []*string `type:"list"` // The schema version. SchemaVersion *string `type:"string"` - // The SHA1 hash of the document, which you can use for verification purposes. + // The SHA1 hash of the document, which you can use for verification. Sha1 *string `type:"string"` - // The status of the SSM document. + // The status of the Systems Manager document. Status *string `type:"string" enum:"DocumentStatus"` + + // The tags, or metadata, that have been applied to the document. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -16006,6 +16035,12 @@ func (s *DocumentDescription) SetStatus(v string) *DocumentDescription { return s } +// SetTags sets the Tags field's value. +func (s *DocumentDescription) SetTags(v []*Tag) *DocumentDescription { + s.Tags = v + return s +} + // Describes a filter. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DocumentFilter type DocumentFilter struct { @@ -16063,7 +16098,7 @@ func (s *DocumentFilter) SetValue(v string) *DocumentFilter { return s } -// Describes the name of an SSM document. +// Describes the name of a Systems Manager document. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DocumentIdentifier type DocumentIdentifier struct { _ struct{} `type:"structure"` @@ -16074,17 +16109,20 @@ type DocumentIdentifier struct { // The document version. DocumentVersion *string `type:"string"` - // The name of the SSM document. + // The name of the Systems Manager document. Name *string `type:"string"` - // The AWS user account of the person who created the document. + // The AWS user account that created the document. Owner *string `type:"string"` // The operating system platform. - PlatformTypes []*string `locationNameList:"PlatformType" type:"list"` + PlatformTypes []*string `type:"list"` // The schema version. SchemaVersion *string `type:"string"` + + // The tags, or metadata, that have been applied to the document. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -16133,6 +16171,83 @@ func (s *DocumentIdentifier) SetSchemaVersion(v string) *DocumentIdentifier { return s } +// SetTags sets the Tags field's value. +func (s *DocumentIdentifier) SetTags(v []*Tag) *DocumentIdentifier { + s.Tags = v + return s +} + +// One or more filters. Use a filter to return a more specific list of documents. +// +// For keys, you can specify one or more tags that have been applied to a document. +// +// Other valid values include Owner, Name, PlatformTypes, and DocumentType. +// +// Note that only one Owner can be specified in a request. For example: Key=Owner,Values=Self. +// +// If you use Name as a key, you can use a name prefix to return a list of documents. +// For example, in the AWS CLI, to return a list of all documents that begin +// with Te, run the following command: +// +// aws ssm list-documents --filters Key=Name,Values=Te +// +// If you specify more than two keys, only documents that are identified by +// all the tags are returned in the results. If you specify more than two values +// for a key, documents that are identified by any of the values are returned +// in the results. +// +// To specify a custom key and value pair, use the format Key=tag:[tagName],Values=[valueName]. +// +// For example, if you created a Key called region and are using the AWS CLI +// to call the list-documents command: +// +// aws ssm list-documents --filters Key=tag:region,Values=east,west Key=Owner,Values=Self +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DocumentKeyValuesFilter +type DocumentKeyValuesFilter struct { + _ struct{} `type:"structure"` + + // The name of the filter key. + Key *string `min:"1" type:"string"` + + // The value for the filter key. + Values []*string `type:"list"` +} + +// String returns the string representation +func (s DocumentKeyValuesFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DocumentKeyValuesFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DocumentKeyValuesFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DocumentKeyValuesFilter"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *DocumentKeyValuesFilter) SetKey(v string) *DocumentKeyValuesFilter { + s.Key = &v + return s +} + +// SetValues sets the Values field's value. +func (s *DocumentKeyValuesFilter) SetValues(v []*string) *DocumentKeyValuesFilter { + s.Values = v + return s +} + // Parameters specified in a System Manager document that execute on the server // when the command is run. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DocumentParameter @@ -16902,7 +17017,7 @@ type GetDocumentInput struct { // The document version for which you want information. DocumentVersion *string `type:"string"` - // The name of the SSM document. + // The name of the Systems Manager document. // // Name is a required field Name *string `type:"string" required:"true"` @@ -16947,7 +17062,7 @@ func (s *GetDocumentInput) SetName(v string) *GetDocumentInput { type GetDocumentOutput struct { _ struct{} `type:"structure"` - // The contents of the SSM document. + // The contents of the Systems Manager document. Content *string `min:"1" type:"string"` // The document type. @@ -16956,7 +17071,7 @@ type GetDocumentOutput struct { // The document version. DocumentVersion *string `type:"string"` - // The name of the SSM document. + // The name of the Systems Manager document. Name *string `type:"string"` } @@ -16998,8 +17113,14 @@ func (s *GetDocumentOutput) SetName(v string) *GetDocumentOutput { type GetInventoryInput struct { _ struct{} `type:"structure"` + // Returns counts of inventory types based on one or more expressions. For example, + // if you aggregate by using an expression that uses the AWS:InstanceInformation.PlatformType + // type, you can see a count of how many Windows and Linux instances exist in + // your inventoried fleet. + Aggregators []*InventoryAggregator `min:"1" type:"list"` + // One or more filters. Use a filter to return a more specific list of results. - Filters []*InventoryFilter `locationNameList:"InventoryFilter" min:"1" type:"list"` + Filters []*InventoryFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of @@ -17011,7 +17132,7 @@ type GetInventoryInput struct { NextToken *string `type:"string"` // The list of inventory item types to return. - ResultAttributes []*ResultAttribute `locationNameList:"ResultAttribute" min:"1" type:"list"` + ResultAttributes []*ResultAttribute `min:"1" type:"list"` } // String returns the string representation @@ -17027,6 +17148,9 @@ func (s GetInventoryInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *GetInventoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetInventoryInput"} + if s.Aggregators != nil && len(s.Aggregators) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) + } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } @@ -17036,6 +17160,16 @@ func (s *GetInventoryInput) Validate() error { if s.ResultAttributes != nil && len(s.ResultAttributes) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResultAttributes", 1)) } + if s.Aggregators != nil { + for i, v := range s.Aggregators { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) + } + } + } if s.Filters != nil { for i, v := range s.Filters { if v == nil { @@ -17063,6 +17197,12 @@ func (s *GetInventoryInput) Validate() error { return nil } +// SetAggregators sets the Aggregators field's value. +func (s *GetInventoryInput) SetAggregators(v []*InventoryAggregator) *GetInventoryInput { + s.Aggregators = v + return s +} + // SetFilters sets the Filters field's value. func (s *GetInventoryInput) SetFilters(v []*InventoryFilter) *GetInventoryInput { s.Filters = v @@ -17092,7 +17232,7 @@ type GetInventoryOutput struct { _ struct{} `type:"structure"` // Collection of inventory entities such as a collection of instance inventory. - Entities []*InventoryResultEntity `locationNameList:"Entity" type:"list"` + Entities []*InventoryResultEntity `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -17125,6 +17265,11 @@ func (s *GetInventoryOutput) SetNextToken(v string) *GetInventoryOutput { type GetInventorySchemaInput struct { _ struct{} `type:"structure"` + // Returns inventory schemas that support aggregation. For example, this call + // returns the AWS:InstanceInformation type, because it supports aggregation + // based on the PlatformName, PlatformType, and PlatformVersion attributes. + Aggregator *bool `type:"boolean"` + // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. @@ -17164,6 +17309,12 @@ func (s *GetInventorySchemaInput) Validate() error { return nil } +// SetAggregator sets the Aggregator field's value. +func (s *GetInventorySchemaInput) SetAggregator(v bool) *GetInventorySchemaInput { + s.Aggregator = &v + return s +} + // SetMaxResults sets the MaxResults field's value. func (s *GetInventorySchemaInput) SetMaxResults(v int64) *GetInventorySchemaInput { s.MaxResults = &v @@ -17973,9 +18124,9 @@ type GetMaintenanceWindowTaskOutput struct { Targets []*Target `type:"list"` // The resource that the task used during execution. For RUN_COMMAND and AUTOMATION - // task types, the TaskArn is the SSM Document name/ARN. For LAMBDA tasks, the - // value is the function name/ARN. For STEP_FUNCTION tasks, the value is the - // state machine ARN. + // task types, the TaskArn is the Systems Manager Document name/ARN. For LAMBDA + // tasks, the value is the function name/ARN. For STEP_FUNCTION tasks, the value + // is the state machine ARN. TaskArn *string `min:"1" type:"string"` // The parameters to pass to the task when it executes. @@ -18291,9 +18442,7 @@ type GetParametersByPathInput struct { // The hierarchy for the parameter. Hierarchies start with a forward slash (/) // and end with the parameter name. A hierarchy can have a maximum of five levels. - // Examples: /Environment/Test/DBString003 - // - // /Finance/Prod/IAD/OS/WinServ2016/license15 + // For example: /Finance/Prod/IAD/WinServ2016/license15 // // Path is a required field Path *string `min:"1" type:"string" required:"true"` @@ -19238,7 +19387,7 @@ type InstanceInformationFilter struct { // The filter values. // // ValueSet is a required field - ValueSet []*string `locationName:"valueSet" locationNameList:"InstanceInformationFilterValue" min:"1" type:"list" required:"true"` + ValueSet []*string `locationName:"valueSet" min:"1" type:"list" required:"true"` } // String returns the string representation @@ -19298,7 +19447,7 @@ type InstanceInformationStringFilter struct { // The filter values. // // Values is a required field - Values []*string `locationNameList:"InstanceInformationFilterValue" min:"1" type:"list" required:"true"` + Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -19578,6 +19727,66 @@ func (s *InstancePatchStateFilter) SetValues(v []*string) *InstancePatchStateFil return s } +// Specifies the inventory type and attribute for the aggregation execution. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/InventoryAggregator +type InventoryAggregator struct { + _ struct{} `type:"structure"` + + // Nested aggregators to further refine aggregation for an inventory type. + Aggregators []*InventoryAggregator `min:"1" type:"list"` + + // The inventory type and attribute name for aggregation. + Expression *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InventoryAggregator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryAggregator) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InventoryAggregator) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InventoryAggregator"} + if s.Aggregators != nil && len(s.Aggregators) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) + } + if s.Expression != nil && len(*s.Expression) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) + } + if s.Aggregators != nil { + for i, v := range s.Aggregators { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAggregators sets the Aggregators field's value. +func (s *InventoryAggregator) SetAggregators(v []*InventoryAggregator) *InventoryAggregator { + s.Aggregators = v + return s +} + +// SetExpression sets the Expression field's value. +func (s *InventoryAggregator) SetExpression(v string) *InventoryAggregator { + s.Expression = &v + return s +} + // One or more filters. Use a filter to return a more specific list of results. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/InventoryFilter type InventoryFilter struct { @@ -19596,7 +19805,7 @@ type InventoryFilter struct { // i-1a2b3c4d5e6,Type=Equal // // Values is a required field - Values []*string `locationNameList:"FilterValue" min:"1" type:"list" required:"true"` + Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -19805,7 +20014,11 @@ type InventoryItemSchema struct { // name. // // Attributes is a required field - Attributes []*InventoryItemAttribute `locationNameList:"Attribute" min:"1" type:"list" required:"true"` + Attributes []*InventoryItemAttribute `min:"1" type:"list" required:"true"` + + // The alias name of the inventory type. The alias name is used for display + // purposes. + DisplayName *string `type:"string"` // The name of the inventory type. Default inventory item type names start with // AWS. Custom inventory type names will start with Custom. Default inventory @@ -19835,6 +20048,12 @@ func (s *InventoryItemSchema) SetAttributes(v []*InventoryItemAttribute) *Invent return s } +// SetDisplayName sets the DisplayName field's value. +func (s *InventoryItemSchema) SetDisplayName(v string) *InventoryItemSchema { + s.DisplayName = &v + return s +} + // SetTypeName sets the TypeName field's value. func (s *InventoryItemSchema) SetTypeName(v string) *InventoryItemSchema { s.TypeName = &v @@ -20056,7 +20275,7 @@ type ListAssociationsInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of results. - AssociationFilterList []*AssociationFilter `locationNameList:"AssociationFilter" min:"1" type:"list"` + AssociationFilterList []*AssociationFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of @@ -20127,7 +20346,7 @@ type ListAssociationsOutput struct { _ struct{} `type:"structure"` // The associations. - Associations []*Association `locationNameList:"Association" type:"list"` + Associations []*Association `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -20426,7 +20645,7 @@ type ListComplianceItemsInput struct { // One or more compliance filters. Use a filter to return a more specific list // of results. - Filters []*ComplianceStringFilter `locationNameList:"ComplianceFilter" type:"list"` + Filters []*ComplianceStringFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of @@ -20519,7 +20738,7 @@ type ListComplianceItemsOutput struct { _ struct{} `type:"structure"` // A list of compliance information for the specified resource ID. - ComplianceItems []*ComplianceItem `locationNameList:"Item" type:"list"` + ComplianceItems []*ComplianceItem `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. @@ -20554,7 +20773,7 @@ type ListComplianceSummariesInput struct { // One or more compliance or inventory filters. Use a filter to return a more // specific list of results. - Filters []*ComplianceStringFilter `locationNameList:"ComplianceFilter" type:"list"` + Filters []*ComplianceStringFilter `type:"list"` // The maximum number of items to return for this call. Currently, you can specify // null or 50. The call also returns a token that you can specify in a subsequent @@ -20623,7 +20842,7 @@ type ListComplianceSummariesOutput struct { // A list of compliant and non-compliant summary counts based on compliance // types. For example, this call returns State Manager associations, patches, // or custom compliance types according to the filter criteria that you specified. - ComplianceSummaryItems []*ComplianceSummaryItem `locationNameList:"Item" type:"list"` + ComplianceSummaryItems []*ComplianceSummaryItem `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. @@ -20754,7 +20973,10 @@ type ListDocumentsInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of results. - DocumentFilterList []*DocumentFilter `locationNameList:"DocumentFilter" min:"1" type:"list"` + DocumentFilterList []*DocumentFilter `min:"1" type:"list"` + + // One or more filters. Use a filter to return a more specific list of results. + Filters []*DocumentKeyValuesFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of @@ -20795,6 +21017,16 @@ func (s *ListDocumentsInput) Validate() error { } } } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -20808,6 +21040,12 @@ func (s *ListDocumentsInput) SetDocumentFilterList(v []*DocumentFilter) *ListDoc return s } +// SetFilters sets the Filters field's value. +func (s *ListDocumentsInput) SetFilters(v []*DocumentKeyValuesFilter) *ListDocumentsInput { + s.Filters = v + return s +} + // SetMaxResults sets the MaxResults field's value. func (s *ListDocumentsInput) SetMaxResults(v int64) *ListDocumentsInput { s.MaxResults = &v @@ -20824,8 +21062,8 @@ func (s *ListDocumentsInput) SetNextToken(v string) *ListDocumentsInput { type ListDocumentsOutput struct { _ struct{} `type:"structure"` - // The names of the SSM documents. - DocumentIdentifiers []*DocumentIdentifier `locationNameList:"DocumentIdentifier" type:"list"` + // The names of the Systems Manager documents. + DocumentIdentifiers []*DocumentIdentifier `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -20859,7 +21097,7 @@ type ListInventoryEntriesInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of results. - Filters []*InventoryFilter `locationNameList:"InventoryFilter" min:"1" type:"list"` + Filters []*InventoryFilter `min:"1" type:"list"` // The instance ID for which you want inventory information. // @@ -21031,7 +21269,7 @@ type ListResourceComplianceSummariesInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of results. - Filters []*ComplianceStringFilter `locationNameList:"ComplianceFilter" type:"list"` + Filters []*ComplianceStringFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of @@ -21104,7 +21342,7 @@ type ListResourceComplianceSummariesOutput struct { // A summary count for specified or targeted managed instances. Summary count // includes information about compliant and non-compliant State Manager associations, // patch status, or custom items according to the filter criteria that you specify. - ResourceComplianceSummaryItems []*ResourceComplianceSummaryItem `locationNameList:"Item" type:"list"` + ResourceComplianceSummaryItems []*ResourceComplianceSummaryItem `type:"list"` } // String returns the string representation @@ -22155,9 +22393,9 @@ type MaintenanceWindowTask struct { Targets []*Target `type:"list"` // The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION - // task types, TaskArn is the SSM document name or ARN. For LAMBDA tasks, it's - // the function name or ARN. For STEP_FUNCTION tasks, it's the state machine - // ARN. + // task types, TaskArn is the Systems Manager document name or ARN. For LAMBDA + // tasks, it's the function name or ARN. For STEP_FUNCTION tasks, it's the state + // machine ARN. TaskArn *string `min:"1" type:"string"` // The parameters that should be passed to the task when it is executed. @@ -22376,13 +22614,13 @@ type ModifyDocumentPermissionInput struct { // The AWS user accounts that should have access to the document. The account // IDs can either be a group of account IDs or All. - AccountIdsToAdd []*string `locationNameList:"AccountId" type:"list"` + AccountIdsToAdd []*string `type:"list"` // The AWS user accounts that should no longer have access to the document. // The AWS user account can either be a group of account IDs or All. This action // has a higher priority than AccountIdsToAdd. If you specify an account ID // to add and the same ID to remove, the system removes access to the document. - AccountIdsToRemove []*string `locationNameList:"AccountId" type:"list"` + AccountIdsToRemove []*string `type:"list"` // The name of the document that you want to share. // @@ -22559,6 +22797,9 @@ type Parameter struct { // The parameter value. Value *string `min:"1" type:"string"` + + // The parameter version. + Version *int64 `type:"long"` } // String returns the string representation @@ -22589,6 +22830,12 @@ func (s *Parameter) SetValue(v string) *Parameter { return s } +// SetVersion sets the Version field's value. +func (s *Parameter) SetVersion(v int64) *Parameter { + s.Version = &v + return s +} + // Information about parameter usage. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ParameterHistory type ParameterHistory struct { @@ -22600,7 +22847,7 @@ type ParameterHistory struct { AllowedPattern *string `type:"string"` // Information about the parameter. - Description *string `min:"1" type:"string"` + Description *string `type:"string"` // The ID of the query key used for this parameter. KeyId *string `min:"1" type:"string"` @@ -22619,6 +22866,9 @@ type ParameterHistory struct { // The parameter value. Value *string `min:"1" type:"string"` + + // The parameter version. + Version *int64 `type:"long"` } // String returns the string representation @@ -22679,6 +22929,12 @@ func (s *ParameterHistory) SetValue(v string) *ParameterHistory { return s } +// SetVersion sets the Version field's value. +func (s *ParameterHistory) SetVersion(v int64) *ParameterHistory { + s.Version = &v + return s +} + // Metada includes information like the ARN of the last user and the date/time // the parameter was last used. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ParameterMetadata @@ -22691,7 +22947,7 @@ type ParameterMetadata struct { AllowedPattern *string `type:"string"` // Description of the parameter actions. - Description *string `min:"1" type:"string"` + Description *string `type:"string"` // The ID of the query key used for this parameter. KeyId *string `min:"1" type:"string"` @@ -22708,6 +22964,9 @@ type ParameterMetadata struct { // The type of parameter. Valid parameter types include the following: String, // String list, Secure string. Type *string `type:"string" enum:"ParameterType"` + + // The parameter version. + Version *int64 `type:"long"` } // String returns the string representation @@ -22762,6 +23021,12 @@ func (s *ParameterMetadata) SetType(v string) *ParameterMetadata { return s } +// SetVersion sets the Version field's value. +func (s *ParameterMetadata) SetVersion(v int64) *ParameterMetadata { + s.Version = &v + return s +} + // One or more filters. Use a filter to return a more specific list of results. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ParameterStringFilter type ParameterStringFilter struct { @@ -23040,9 +23305,8 @@ type PatchBaselineIdentity struct { // default patch baseline for each operating system. DefaultBaseline *bool `type:"boolean"` - // Defines the operating system the patch baseline applies to. Supported operating - // systems include WINDOWS, AMAZON_LINUX, UBUNTU and REDHAT_ENTERPRISE_LINUX. - // The Default value is WINDOWS. + // Defines the operating system the patch baseline applies to. The Default value + // is WINDOWS. OperatingSystem *string `type:"string" enum:"OperatingSystem"` } @@ -23689,7 +23953,7 @@ type PutInventoryInput struct { // The inventory items that you want to add or update on instances. // // Items is a required field - Items []*InventoryItem `locationNameList:"Item" min:"1" type:"list" required:"true"` + Items []*InventoryItem `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -23767,15 +24031,21 @@ type PutParameterInput struct { // AllowedPattern=^\d+$ AllowedPattern *string `type:"string"` - // Information about the parameter that you want to add to the system - Description *string `min:"1" type:"string"` + // Information about the parameter that you want to add to the system. + Description *string `type:"string"` // The KMS Key ID that you want to use to encrypt a parameter when you choose // the SecureString data type. If you don't specify a key ID, the system uses // the default key associated with your AWS account. KeyId *string `min:"1" type:"string"` - // The name of the parameter that you want to add to the system. + // The fully qualified name of the parameter that you want to add to the system. + // The fully qualified name includes the complete hierarchy of the parameter + // path and name. For example: /Dev/DBServer/MySQL/db-string13 + // + // The maximum length constraint listed below includes capacity for additional + // system attributes that are not part of the name. The maximum length for the + // fully qualified parameter name is 1011 characters. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -23807,9 +24077,6 @@ func (s PutParameterInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PutParameterInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutParameterInput"} - if s.Description != nil && len(*s.Description) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Description", 1)) - } if s.KeyId != nil && len(*s.KeyId) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) } @@ -23880,6 +24147,14 @@ func (s *PutParameterInput) SetValue(v string) *PutParameterInput { // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutParameterResult type PutParameterOutput struct { _ struct{} `type:"structure"` + + // The new version number of a parameter. If you edit a parameter value, Parameter + // Store automatically creates a new version and assigns this new version a + // unique ID. You can reference a parameter version ID in API actions or in + // Systems Manager documents (SSM documents). By default, if you don't specify + // a specific version, the system returns the latest parameter value when a + // parameter is called. + Version *int64 `type:"long"` } // String returns the string representation @@ -23892,6 +24167,12 @@ func (s PutParameterOutput) GoString() string { return s.String() } +// SetVersion sets the Version field's value. +func (s *PutParameterOutput) SetVersion(v int64) *PutParameterOutput { + s.Version = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterDefaultPatchBaselineRequest type RegisterDefaultPatchBaselineInput struct { _ struct{} `type:"structure"` @@ -24707,6 +24988,10 @@ func (s *ResourceDataSyncItem) SetSyncName(v string) *ResourceDataSyncItem { type ResourceDataSyncS3Destination struct { _ struct{} `type:"structure"` + // The ARN of an encryption key for a destination in Amazon S3. Must belong + // to the same region as the destination Amazon S3 bucket. + AWSKMSKeyARN *string `min:"1" type:"string"` + // The name of the Amazon S3 bucket where the aggregated data is stored. // // BucketName is a required field @@ -24739,6 +25024,9 @@ func (s ResourceDataSyncS3Destination) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceDataSyncS3Destination) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncS3Destination"} + if s.AWSKMSKeyARN != nil && len(*s.AWSKMSKeyARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AWSKMSKeyARN", 1)) + } if s.BucketName == nil { invalidParams.Add(request.NewErrParamRequired("BucketName")) } @@ -24764,6 +25052,12 @@ func (s *ResourceDataSyncS3Destination) Validate() error { return nil } +// SetAWSKMSKeyARN sets the AWSKMSKeyARN field's value. +func (s *ResourceDataSyncS3Destination) SetAWSKMSKeyARN(v string) *ResourceDataSyncS3Destination { + s.AWSKMSKeyARN = &v + return s +} + // SetBucketName sets the BucketName field's value. func (s *ResourceDataSyncS3Destination) SetBucketName(v string) *ResourceDataSyncS3Destination { s.BucketName = &v @@ -25332,6 +25626,10 @@ func (s *SeveritySummary) SetUnspecifiedCount(v int64) *SeveritySummary { type StartAutomationExecutionInput struct { _ struct{} `type:"structure"` + // User-provided idempotency token. The token must be unique, is case insensitive, + // enforces the UUID format, and can't be reused. + ClientToken *string `min:"36" type:"string"` + // The name of the Automation document to use for this execution. // // DocumentName is a required field @@ -25358,6 +25656,9 @@ func (s StartAutomationExecutionInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *StartAutomationExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartAutomationExecutionInput"} + if s.ClientToken != nil && len(*s.ClientToken) < 36 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 36)) + } if s.DocumentName == nil { invalidParams.Add(request.NewErrParamRequired("DocumentName")) } @@ -25371,6 +25672,12 @@ func (s *StartAutomationExecutionInput) Validate() error { return nil } +// SetClientToken sets the ClientToken field's value. +func (s *StartAutomationExecutionInput) SetClientToken(v string) *StartAutomationExecutionInput { + s.ClientToken = &v + return s +} + // SetDocumentName sets the DocumentName field's value. func (s *StartAutomationExecutionInput) SetDocumentName(v string) *StartAutomationExecutionInput { s.DocumentName = &v @@ -25589,9 +25896,10 @@ func (s StopAutomationExecutionOutput) GoString() string { return s.String() } -// Metadata that you assign to your managed instances. Tags enable you to categorize -// your managed instances in different ways, for example, by purpose, owner, -// or environment. +// Metadata that you assign to your AWS resources. Tags enable you to categorize +// your resources in different ways, for example, by purpose, owner, or environment. +// In Systems Manager, you can apply tags to documents, managed instances, Maintenance +// Windows, Parameter Store parameters, and patch baselines. // Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/Tag type Tag struct { _ struct{} `type:"structure"` @@ -25877,7 +26185,7 @@ type UpdateAssociationStatusInput struct { // InstanceId is a required field InstanceId *string `type:"string" required:"true"` - // The name of the SSM document. + // The name of the Systems Manager document. // // Name is a required field Name *string `type:"string" required:"true"` @@ -27766,6 +28074,9 @@ const ( ) const ( + // ResourceTypeForTaggingDocument is a ResourceTypeForTagging enum value + ResourceTypeForTaggingDocument = "Document" + // ResourceTypeForTaggingManagedInstance is a ResourceTypeForTagging enum value ResourceTypeForTaggingManagedInstance = "ManagedInstance" @@ -27774,6 +28085,9 @@ const ( // ResourceTypeForTaggingParameter is a ResourceTypeForTagging enum value ResourceTypeForTaggingParameter = "Parameter" + + // ResourceTypeForTaggingPatchBaseline is a ResourceTypeForTagging enum value + ResourceTypeForTaggingPatchBaseline = "PatchBaseline" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go index f10e6aa8e..ff9cb9e98 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go @@ -17,6 +17,10 @@ // To get started, verify prerequisites and configure managed instances. For // more information, see Systems Manager Prerequisites (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html). // +// For information about other API actions you can perform on Amazon EC2 instances, +// see the Amazon EC2 API Reference (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/). +// For information about how to use a Query API, see Making API Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/making-api-requests.html). +// // See https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06 for more information on this service. // // See ssm package documentation for more information. @@ -24,7 +28,7 @@ // // Using the Client // -// To Amazon Simple Systems Manager (SSM) with the SDK use the New function to create +// To contact Amazon Simple Systems Manager (SSM) with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go index 35c3d70fb..38c5a1c6a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go @@ -92,7 +92,7 @@ const ( // ErrCodeDocumentLimitExceeded for service response error code // "DocumentLimitExceeded". // - // You can have at most 200 active SSM documents. + // You can have at most 200 active Systems Manager documents. ErrCodeDocumentLimitExceeded = "DocumentLimitExceeded" // ErrCodeDocumentPermissionLimit for service response error code @@ -342,8 +342,9 @@ const ( // ErrCodeInvalidParameters for service response error code // "InvalidParameters". // - // You must specify values for all required parameters in the SSM document. - // You can only supply values to parameters defined in the SSM document. + // You must specify values for all required parameters in the Systems Manager + // document. You can only supply values to parameters defined in the Systems + // Manager document. ErrCodeInvalidParameters = "InvalidParameters" // ErrCodeInvalidPermissionType for service response error code @@ -369,8 +370,8 @@ const ( // ErrCodeInvalidResourceType for service response error code // "InvalidResourceType". // - // The resource type is not valid. If you are attempting to tag an instance, - // the instance must be a registered, managed instance. + // The resource type is not valid. For example, if you are attempting to tag + // an instance, the instance must be a registered, managed instance. ErrCodeInvalidResourceType = "InvalidResourceType" // ErrCodeInvalidResultAttributeException for service response error code @@ -452,6 +453,12 @@ const ( // or more parameters and try again. ErrCodeParameterLimitExceeded = "ParameterLimitExceeded" + // ErrCodeParameterMaxVersionLimitExceeded for service response error code + // "ParameterMaxVersionLimitExceeded". + // + // The parameter exceeded the maximum number of allowed versions. + ErrCodeParameterMaxVersionLimitExceeded = "ParameterMaxVersionLimitExceeded" + // ErrCodeParameterNotFound for service response error code // "ParameterNotFound". // @@ -464,6 +471,13 @@ const ( // The parameter name is not valid. ErrCodeParameterPatternMismatchException = "ParameterPatternMismatchException" + // ErrCodeParameterVersionNotFound for service response error code + // "ParameterVersionNotFound". + // + // The specified parameter version was not found. Verify the parameter name + // and version, and try again. + ErrCodeParameterVersionNotFound = "ParameterVersionNotFound" + // ErrCodeResourceDataSyncAlreadyExistsException for service response error code // "ResourceDataSyncAlreadyExistsException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go index a43fa8055..ef681ab0c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go @@ -56,7 +56,7 @@ // // Using the Client // -// To AWS Security Token Service with the SDK use the New function to create +// To contact AWS Security Token Service with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index 47400993a..c6aa1c4c6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -118,7 +118,7 @@ func (c *WAF) CreateByteMatchSetRequest(input *CreateByteMatchSetInput) (req *re // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -158,6 +158,152 @@ func (c *WAF) CreateByteMatchSetWithContext(ctx aws.Context, input *CreateByteMa return out, req.Send() } +const opCreateGeoMatchSet = "CreateGeoMatchSet" + +// CreateGeoMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the CreateGeoMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGeoMatchSet for more information on using the CreateGeoMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGeoMatchSetRequest method. +// req, resp := client.CreateGeoMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateGeoMatchSet +func (c *WAF) CreateGeoMatchSetRequest(input *CreateGeoMatchSetInput) (req *request.Request, output *CreateGeoMatchSetOutput) { + op := &request.Operation{ + Name: opCreateGeoMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateGeoMatchSetInput{} + } + + output = &CreateGeoMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGeoMatchSet API operation for AWS WAF. +// +// Creates an GeoMatchSet, which you use to specify which web requests you want +// to allow or block based on the country that the requests originate from. +// For example, if you're receiving a lot of requests from one or more countries +// and you want to block the requests, you can create an GeoMatchSet that contains +// those countries and then configure AWS WAF to block the requests. +// +// To create and configure a GeoMatchSet, perform the following steps: +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a CreateGeoMatchSet request. +// +// Submit a CreateGeoMatchSet request. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateGeoMatchSet request. +// +// Submit an UpdateGeoMatchSetSet request to specify the countries that you +// want AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation CreateGeoMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeDisallowedNameException "DisallowedNameException" +// The name specified is invalid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// * ErrCodeLimitsExceededException "LimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateGeoMatchSet +func (c *WAF) CreateGeoMatchSet(input *CreateGeoMatchSetInput) (*CreateGeoMatchSetOutput, error) { + req, out := c.CreateGeoMatchSetRequest(input) + return out, req.Send() +} + +// CreateGeoMatchSetWithContext is the same as CreateGeoMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGeoMatchSet for details on how to use this API operation. +// +// 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 *WAF) CreateGeoMatchSetWithContext(ctx aws.Context, input *CreateGeoMatchSetInput, opts ...request.Option) (*CreateGeoMatchSetOutput, error) { + req, out := c.CreateGeoMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the @@ -269,7 +415,7 @@ func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -451,7 +597,7 @@ func (c *WAF) CreateRateBasedRuleRequest(input *CreateRateBasedRuleInput) (req * // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -487,6 +633,232 @@ func (c *WAF) CreateRateBasedRuleWithContext(ctx aws.Context, input *CreateRateB return out, req.Send() } +const opCreateRegexMatchSet = "CreateRegexMatchSet" + +// CreateRegexMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the CreateRegexMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRegexMatchSet for more information on using the CreateRegexMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRegexMatchSetRequest method. +// req, resp := client.CreateRegexMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexMatchSet +func (c *WAF) CreateRegexMatchSetRequest(input *CreateRegexMatchSetInput) (req *request.Request, output *CreateRegexMatchSetOutput) { + op := &request.Operation{ + Name: opCreateRegexMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRegexMatchSetInput{} + } + + output = &CreateRegexMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRegexMatchSet API operation for AWS WAF. +// +// Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify the +// part of a web request that you want AWS WAF to inspect, such as the values +// of the User-Agent header or the query string. For example, you can create +// a RegexMatchSet that contains a RegexMatchTuple that looks for any requests +// with User-Agent headers that match a RegexPatternSet with pattern B[a@]dB[o0]t. +// You can then configure AWS WAF to reject those requests. +// +// To create and configure a RegexMatchSet, perform the following steps: +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a CreateRegexMatchSet request. +// +// Submit a CreateRegexMatchSet request. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateRegexMatchSet request. +// +// Submit an UpdateRegexMatchSet request to specify the part of the request +// that you want AWS WAF to inspect (for example, the header or the URI) and +// the value, using a RegexPatternSet, that you want AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation CreateRegexMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeDisallowedNameException "DisallowedNameException" +// The name specified is invalid. +// +// * ErrCodeLimitsExceededException "LimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexMatchSet +func (c *WAF) CreateRegexMatchSet(input *CreateRegexMatchSetInput) (*CreateRegexMatchSetOutput, error) { + req, out := c.CreateRegexMatchSetRequest(input) + return out, req.Send() +} + +// CreateRegexMatchSetWithContext is the same as CreateRegexMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRegexMatchSet for details on how to use this API operation. +// +// 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 *WAF) CreateRegexMatchSetWithContext(ctx aws.Context, input *CreateRegexMatchSetInput, opts ...request.Option) (*CreateRegexMatchSetOutput, error) { + req, out := c.CreateRegexMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateRegexPatternSet = "CreateRegexPatternSet" + +// CreateRegexPatternSetRequest generates a "aws/request.Request" representing the +// client's request for the CreateRegexPatternSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRegexPatternSet for more information on using the CreateRegexPatternSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRegexPatternSetRequest method. +// req, resp := client.CreateRegexPatternSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexPatternSet +func (c *WAF) CreateRegexPatternSetRequest(input *CreateRegexPatternSetInput) (req *request.Request, output *CreateRegexPatternSetOutput) { + op := &request.Operation{ + Name: opCreateRegexPatternSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRegexPatternSetInput{} + } + + output = &CreateRegexPatternSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRegexPatternSet API operation for AWS WAF. +// +// Creates a RegexPatternSet. You then use UpdateRegexPatternSet to specify +// the regular expression (regex) pattern that you want AWS WAF to search for, +// such as B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. +// +// To create and configure a RegexPatternSet, perform the following steps: +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a CreateRegexPatternSet request. +// +// Submit a CreateRegexPatternSet request. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateRegexPatternSet request. +// +// Submit an UpdateRegexPatternSet request to specify the string that you want +// AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation CreateRegexPatternSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeDisallowedNameException "DisallowedNameException" +// The name specified is invalid. +// +// * ErrCodeLimitsExceededException "LimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexPatternSet +func (c *WAF) CreateRegexPatternSet(input *CreateRegexPatternSetInput) (*CreateRegexPatternSetOutput, error) { + req, out := c.CreateRegexPatternSetRequest(input) + return out, req.Send() +} + +// CreateRegexPatternSetWithContext is the same as CreateRegexPatternSet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRegexPatternSet for details on how to use this API operation. +// +// 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 *WAF) CreateRegexPatternSetWithContext(ctx aws.Context, input *CreateRegexPatternSetInput, opts ...request.Option) (*CreateRegexPatternSetOutput, error) { + req, out := c.CreateRegexPatternSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the @@ -608,7 +980,7 @@ func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, o // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -756,7 +1128,7 @@ func (c *WAF) CreateSizeConstraintSetRequest(input *CreateSizeConstraintSetInput // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -896,7 +1268,7 @@ func (c *WAF) CreateSqlInjectionMatchSetRequest(input *CreateSqlInjectionMatchSe // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -1056,7 +1428,7 @@ func (c *WAF) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Reques // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -1197,7 +1569,7 @@ func (c *WAF) CreateXssMatchSetRequest(input *CreateXssMatchSetInput) (req *requ // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -1364,6 +1736,132 @@ func (c *WAF) DeleteByteMatchSetWithContext(ctx aws.Context, input *DeleteByteMa return out, req.Send() } +const opDeleteGeoMatchSet = "DeleteGeoMatchSet" + +// DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGeoMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGeoMatchSet for more information on using the DeleteGeoMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGeoMatchSetRequest method. +// req, resp := client.DeleteGeoMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteGeoMatchSet +func (c *WAF) DeleteGeoMatchSetRequest(input *DeleteGeoMatchSetInput) (req *request.Request, output *DeleteGeoMatchSetOutput) { + op := &request.Operation{ + Name: opDeleteGeoMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteGeoMatchSetInput{} + } + + output = &DeleteGeoMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGeoMatchSet API operation for AWS WAF. +// +// Permanently deletes a GeoMatchSet. You can't delete a GeoMatchSet if it's +// still used in any Rules or if it still includes any countries. +// +// If you just want to remove a GeoMatchSet from a Rule, use UpdateRule. +// +// To permanently delete a GeoMatchSet from AWS WAF, perform the following steps: +// +// Update the GeoMatchSet to remove any countries. For more information, see +// UpdateGeoMatchSet. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a DeleteGeoMatchSet request. +// +// Submit a DeleteGeoMatchSet request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation DeleteGeoMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeNonexistentItemException "NonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeReferencedItemException "ReferencedItemException" +// The operation failed because you tried to delete an object that is still +// in use. For example: +// +// * You tried to delete a ByteMatchSet that is still referenced by a Rule. +// +// * You tried to delete a Rule that is still referenced by a WebACL. +// +// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// The operation failed because you tried to delete an object that isn't empty. +// For example: +// +// * You tried to delete a WebACL that still contains one or more Rule objects. +// +// * You tried to delete a Rule that still contains one or more ByteMatchSet +// objects or other predicates. +// +// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple +// objects. +// +// * You tried to delete an IPSet that references one or more IP addresses. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteGeoMatchSet +func (c *WAF) DeleteGeoMatchSet(input *DeleteGeoMatchSetInput) (*DeleteGeoMatchSetOutput, error) { + req, out := c.DeleteGeoMatchSetRequest(input) + return out, req.Send() +} + +// DeleteGeoMatchSetWithContext is the same as DeleteGeoMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGeoMatchSet for details on how to use this API operation. +// +// 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 *WAF) DeleteGeoMatchSetWithContext(ctx aws.Context, input *DeleteGeoMatchSetInput, opts ...request.Option) (*DeleteGeoMatchSetOutput, error) { + req, out := c.DeleteGeoMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the @@ -1618,6 +2116,248 @@ func (c *WAF) DeleteRateBasedRuleWithContext(ctx aws.Context, input *DeleteRateB return out, req.Send() } +const opDeleteRegexMatchSet = "DeleteRegexMatchSet" + +// DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRegexMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRegexMatchSet for more information on using the DeleteRegexMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRegexMatchSetRequest method. +// req, resp := client.DeleteRegexMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexMatchSet +func (c *WAF) DeleteRegexMatchSetRequest(input *DeleteRegexMatchSetInput) (req *request.Request, output *DeleteRegexMatchSetOutput) { + op := &request.Operation{ + Name: opDeleteRegexMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRegexMatchSetInput{} + } + + output = &DeleteRegexMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRegexMatchSet API operation for AWS WAF. +// +// Permanently deletes a RegexMatchSet. You can't delete a RegexMatchSet if +// it's still used in any Rules or if it still includes any RegexMatchTuples +// objects (any filters). +// +// If you just want to remove a RegexMatchSet from a Rule, use UpdateRule. +// +// To permanently delete a RegexMatchSet, perform the following steps: +// +// Update the RegexMatchSet to remove filters, if any. For more information, +// see UpdateRegexMatchSet. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a DeleteRegexMatchSet request. +// +// Submit a DeleteRegexMatchSet request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation DeleteRegexMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeNonexistentItemException "NonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeReferencedItemException "ReferencedItemException" +// The operation failed because you tried to delete an object that is still +// in use. For example: +// +// * You tried to delete a ByteMatchSet that is still referenced by a Rule. +// +// * You tried to delete a Rule that is still referenced by a WebACL. +// +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// The operation failed because you tried to delete an object that isn't empty. +// For example: +// +// * You tried to delete a WebACL that still contains one or more Rule objects. +// +// * You tried to delete a Rule that still contains one or more ByteMatchSet +// objects or other predicates. +// +// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple +// objects. +// +// * You tried to delete an IPSet that references one or more IP addresses. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexMatchSet +func (c *WAF) DeleteRegexMatchSet(input *DeleteRegexMatchSetInput) (*DeleteRegexMatchSetOutput, error) { + req, out := c.DeleteRegexMatchSetRequest(input) + return out, req.Send() +} + +// DeleteRegexMatchSetWithContext is the same as DeleteRegexMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRegexMatchSet for details on how to use this API operation. +// +// 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 *WAF) DeleteRegexMatchSetWithContext(ctx aws.Context, input *DeleteRegexMatchSetInput, opts ...request.Option) (*DeleteRegexMatchSetOutput, error) { + req, out := c.DeleteRegexMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteRegexPatternSet = "DeleteRegexPatternSet" + +// DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRegexPatternSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRegexPatternSet for more information on using the DeleteRegexPatternSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRegexPatternSetRequest method. +// req, resp := client.DeleteRegexPatternSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexPatternSet +func (c *WAF) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) (req *request.Request, output *DeleteRegexPatternSetOutput) { + op := &request.Operation{ + Name: opDeleteRegexPatternSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRegexPatternSetInput{} + } + + output = &DeleteRegexPatternSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRegexPatternSet API operation for AWS WAF. +// +// Permanently deletes a RegexPatternSet. You can't delete a RegexPatternSet +// if it's still used in any RegexMatchSet or if the RegexPatternSet is not +// empty. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation DeleteRegexPatternSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeNonexistentItemException "NonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeReferencedItemException "ReferencedItemException" +// The operation failed because you tried to delete an object that is still +// in use. For example: +// +// * You tried to delete a ByteMatchSet that is still referenced by a Rule. +// +// * You tried to delete a Rule that is still referenced by a WebACL. +// +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// The operation failed because you tried to delete an object that isn't empty. +// For example: +// +// * You tried to delete a WebACL that still contains one or more Rule objects. +// +// * You tried to delete a Rule that still contains one or more ByteMatchSet +// objects or other predicates. +// +// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple +// objects. +// +// * You tried to delete an IPSet that references one or more IP addresses. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexPatternSet +func (c *WAF) DeleteRegexPatternSet(input *DeleteRegexPatternSetInput) (*DeleteRegexPatternSetOutput, error) { + req, out := c.DeleteRegexPatternSetRequest(input) + return out, req.Send() +} + +// DeleteRegexPatternSetWithContext is the same as DeleteRegexPatternSet with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRegexPatternSet for details on how to use this API operation. +// +// 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 *WAF) DeleteRegexPatternSetWithContext(ctx aws.Context, input *DeleteRegexPatternSetInput, opts ...request.Option) (*DeleteRegexPatternSetOutput, error) { + req, out := c.DeleteRegexPatternSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the @@ -2523,6 +3263,93 @@ func (c *WAF) GetChangeTokenStatusWithContext(ctx aws.Context, input *GetChangeT return out, req.Send() } +const opGetGeoMatchSet = "GetGeoMatchSet" + +// GetGeoMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the GetGeoMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGeoMatchSet for more information on using the GetGeoMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGeoMatchSetRequest method. +// req, resp := client.GetGeoMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetGeoMatchSet +func (c *WAF) GetGeoMatchSetRequest(input *GetGeoMatchSetInput) (req *request.Request, output *GetGeoMatchSetOutput) { + op := &request.Operation{ + Name: opGetGeoMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetGeoMatchSetInput{} + } + + output = &GetGeoMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGeoMatchSet API operation for AWS WAF. +// +// Returns the GeoMatchSet that is specified by GeoMatchSetId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation GetGeoMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeNonexistentItemException "NonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetGeoMatchSet +func (c *WAF) GetGeoMatchSet(input *GetGeoMatchSetInput) (*GetGeoMatchSetOutput, error) { + req, out := c.GetGeoMatchSetRequest(input) + return out, req.Send() +} + +// GetGeoMatchSetWithContext is the same as GetGeoMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See GetGeoMatchSet for details on how to use this API operation. +// +// 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 *WAF) GetGeoMatchSetWithContext(ctx aws.Context, input *GetGeoMatchSetInput, opts ...request.Option) (*GetGeoMatchSetOutput, error) { + req, out := c.GetGeoMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the @@ -2787,7 +3614,7 @@ func (c *WAF) GetRateBasedRuleManagedKeysRequest(input *GetRateBasedRuleManagedK // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -2817,6 +3644,180 @@ func (c *WAF) GetRateBasedRuleManagedKeysWithContext(ctx aws.Context, input *Get return out, req.Send() } +const opGetRegexMatchSet = "GetRegexMatchSet" + +// GetRegexMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the GetRegexMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRegexMatchSet for more information on using the GetRegexMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRegexMatchSetRequest method. +// req, resp := client.GetRegexMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexMatchSet +func (c *WAF) GetRegexMatchSetRequest(input *GetRegexMatchSetInput) (req *request.Request, output *GetRegexMatchSetOutput) { + op := &request.Operation{ + Name: opGetRegexMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRegexMatchSetInput{} + } + + output = &GetRegexMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRegexMatchSet API operation for AWS WAF. +// +// Returns the RegexMatchSet specified by RegexMatchSetId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation GetRegexMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeNonexistentItemException "NonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexMatchSet +func (c *WAF) GetRegexMatchSet(input *GetRegexMatchSetInput) (*GetRegexMatchSetOutput, error) { + req, out := c.GetRegexMatchSetRequest(input) + return out, req.Send() +} + +// GetRegexMatchSetWithContext is the same as GetRegexMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See GetRegexMatchSet for details on how to use this API operation. +// +// 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 *WAF) GetRegexMatchSetWithContext(ctx aws.Context, input *GetRegexMatchSetInput, opts ...request.Option) (*GetRegexMatchSetOutput, error) { + req, out := c.GetRegexMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRegexPatternSet = "GetRegexPatternSet" + +// GetRegexPatternSetRequest generates a "aws/request.Request" representing the +// client's request for the GetRegexPatternSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRegexPatternSet for more information on using the GetRegexPatternSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRegexPatternSetRequest method. +// req, resp := client.GetRegexPatternSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexPatternSet +func (c *WAF) GetRegexPatternSetRequest(input *GetRegexPatternSetInput) (req *request.Request, output *GetRegexPatternSetOutput) { + op := &request.Operation{ + Name: opGetRegexPatternSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRegexPatternSetInput{} + } + + output = &GetRegexPatternSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRegexPatternSet API operation for AWS WAF. +// +// Returns the RegexPatternSet specified by RegexPatternSetId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation GetRegexPatternSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeNonexistentItemException "NonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexPatternSet +func (c *WAF) GetRegexPatternSet(input *GetRegexPatternSetInput) (*GetRegexPatternSetOutput, error) { + req, out := c.GetRegexPatternSetRequest(input) + return out, req.Send() +} + +// GetRegexPatternSetWithContext is the same as GetRegexPatternSet with the addition of +// the ability to pass a context and additional request options. +// +// See GetRegexPatternSet for details on how to use this API operation. +// +// 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 *WAF) GetRegexPatternSetWithContext(ctx aws.Context, input *GetRegexPatternSetInput, opts ...request.Option) (*GetRegexPatternSetOutput, error) { + req, out := c.GetRegexPatternSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetRule = "GetRule" // GetRuleRequest generates a "aws/request.Request" representing the @@ -3430,6 +4431,90 @@ func (c *WAF) ListByteMatchSetsWithContext(ctx aws.Context, input *ListByteMatch return out, req.Send() } +const opListGeoMatchSets = "ListGeoMatchSets" + +// ListGeoMatchSetsRequest generates a "aws/request.Request" representing the +// client's request for the ListGeoMatchSets operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGeoMatchSets for more information on using the ListGeoMatchSets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGeoMatchSetsRequest method. +// req, resp := client.ListGeoMatchSetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListGeoMatchSets +func (c *WAF) ListGeoMatchSetsRequest(input *ListGeoMatchSetsInput) (req *request.Request, output *ListGeoMatchSetsOutput) { + op := &request.Operation{ + Name: opListGeoMatchSets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListGeoMatchSetsInput{} + } + + output = &ListGeoMatchSetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGeoMatchSets API operation for AWS WAF. +// +// Returns an array of GeoMatchSetSummary objects in the response. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation ListGeoMatchSets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListGeoMatchSets +func (c *WAF) ListGeoMatchSets(input *ListGeoMatchSetsInput) (*ListGeoMatchSetsOutput, error) { + req, out := c.ListGeoMatchSetsRequest(input) + return out, req.Send() +} + +// ListGeoMatchSetsWithContext is the same as ListGeoMatchSets with the addition of +// the ability to pass a context and additional request options. +// +// See ListGeoMatchSets for details on how to use this API operation. +// +// 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 *WAF) ListGeoMatchSetsWithContext(ctx aws.Context, input *ListGeoMatchSetsInput, opts ...request.Option) (*ListGeoMatchSetsOutput, error) { + req, out := c.ListGeoMatchSetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the @@ -3598,6 +4683,174 @@ func (c *WAF) ListRateBasedRulesWithContext(ctx aws.Context, input *ListRateBase return out, req.Send() } +const opListRegexMatchSets = "ListRegexMatchSets" + +// ListRegexMatchSetsRequest generates a "aws/request.Request" representing the +// client's request for the ListRegexMatchSets operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRegexMatchSets for more information on using the ListRegexMatchSets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRegexMatchSetsRequest method. +// req, resp := client.ListRegexMatchSetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexMatchSets +func (c *WAF) ListRegexMatchSetsRequest(input *ListRegexMatchSetsInput) (req *request.Request, output *ListRegexMatchSetsOutput) { + op := &request.Operation{ + Name: opListRegexMatchSets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListRegexMatchSetsInput{} + } + + output = &ListRegexMatchSetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRegexMatchSets API operation for AWS WAF. +// +// Returns an array of RegexMatchSetSummary objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation ListRegexMatchSets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexMatchSets +func (c *WAF) ListRegexMatchSets(input *ListRegexMatchSetsInput) (*ListRegexMatchSetsOutput, error) { + req, out := c.ListRegexMatchSetsRequest(input) + return out, req.Send() +} + +// ListRegexMatchSetsWithContext is the same as ListRegexMatchSets with the addition of +// the ability to pass a context and additional request options. +// +// See ListRegexMatchSets for details on how to use this API operation. +// +// 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 *WAF) ListRegexMatchSetsWithContext(ctx aws.Context, input *ListRegexMatchSetsInput, opts ...request.Option) (*ListRegexMatchSetsOutput, error) { + req, out := c.ListRegexMatchSetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListRegexPatternSets = "ListRegexPatternSets" + +// ListRegexPatternSetsRequest generates a "aws/request.Request" representing the +// client's request for the ListRegexPatternSets operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRegexPatternSets for more information on using the ListRegexPatternSets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRegexPatternSetsRequest method. +// req, resp := client.ListRegexPatternSetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexPatternSets +func (c *WAF) ListRegexPatternSetsRequest(input *ListRegexPatternSetsInput) (req *request.Request, output *ListRegexPatternSetsOutput) { + op := &request.Operation{ + Name: opListRegexPatternSets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListRegexPatternSetsInput{} + } + + output = &ListRegexPatternSetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRegexPatternSets API operation for AWS WAF. +// +// Returns an array of RegexPatternSetSummary objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation ListRegexPatternSets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexPatternSets +func (c *WAF) ListRegexPatternSets(input *ListRegexPatternSetsInput) (*ListRegexPatternSetsOutput, error) { + req, out := c.ListRegexPatternSetsRequest(input) + return out, req.Send() +} + +// ListRegexPatternSetsWithContext is the same as ListRegexPatternSets with the addition of +// the ability to pass a context and additional request options. +// +// See ListRegexPatternSets for details on how to use this API operation. +// +// 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 *WAF) ListRegexPatternSetsWithContext(ctx aws.Context, input *ListRegexPatternSetsInput, opts ...request.Option) (*ListRegexPatternSetsOutput, error) { + req, out := c.ListRegexPatternSetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the @@ -4158,7 +5411,7 @@ func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *re // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -4217,6 +5470,204 @@ func (c *WAF) UpdateByteMatchSetWithContext(ctx aws.Context, input *UpdateByteMa return out, req.Send() } +const opUpdateGeoMatchSet = "UpdateGeoMatchSet" + +// UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGeoMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGeoMatchSet for more information on using the UpdateGeoMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGeoMatchSetRequest method. +// req, resp := client.UpdateGeoMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateGeoMatchSet +func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *request.Request, output *UpdateGeoMatchSetOutput) { + op := &request.Operation{ + Name: opUpdateGeoMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateGeoMatchSetInput{} + } + + output = &UpdateGeoMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGeoMatchSet API operation for AWS WAF. +// +// Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet. For each +// GeoMatchConstraint object, you specify the following values: +// +// * Whether to insert or delete the object from the array. If you want to +// change an GeoMatchConstraint object, you delete the existing object and +// add a new one. +// +// * The Type. The only valid value for Type is Country. +// +// * The Value, which is a two character code for the country to add to the +// GeoMatchConstraint object. Valid codes are listed in GeoMatchConstraint$Value. +// +// To create and configure an GeoMatchSet, perform the following steps: +// +// Submit a CreateGeoMatchSet request. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateGeoMatchSet request. +// +// Submit an UpdateGeoMatchSet request to specify the country that you want +// AWS WAF to watch for. +// +// When you update an GeoMatchSet, you specify the country that you want to +// add and/or the country that you want to delete. If you want to change a country, +// you delete the existing country and add the new one. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation UpdateGeoMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add an IP address to an IPSet, but the IP address already +// exists in the specified IPSet. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// The operation failed because you tried to add an object to or delete an object +// from another object that doesn't exist. For example: +// +// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't +// exist. +// +// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule +// that doesn't exist. +// +// * You tried to add an IP address to or delete an IP address from an IPSet +// that doesn't exist. +// +// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from +// a ByteMatchSet that doesn't exist. +// +// * ErrCodeNonexistentItemException "NonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeReferencedItemException "ReferencedItemException" +// The operation failed because you tried to delete an object that is still +// in use. For example: +// +// * You tried to delete a ByteMatchSet that is still referenced by a Rule. +// +// * You tried to delete a Rule that is still referenced by a WebACL. +// +// * ErrCodeLimitsExceededException "LimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateGeoMatchSet +func (c *WAF) UpdateGeoMatchSet(input *UpdateGeoMatchSetInput) (*UpdateGeoMatchSetOutput, error) { + req, out := c.UpdateGeoMatchSetRequest(input) + return out, req.Send() +} + +// UpdateGeoMatchSetWithContext is the same as UpdateGeoMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGeoMatchSet for details on how to use this API operation. +// +// 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 *WAF) UpdateGeoMatchSetWithContext(ctx aws.Context, input *UpdateGeoMatchSetInput, opts ...request.Option) (*UpdateGeoMatchSetOutput, error) { + req, out := c.UpdateGeoMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the @@ -4373,7 +5824,7 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -4581,7 +6032,7 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -4644,6 +6095,342 @@ func (c *WAF) UpdateRateBasedRuleWithContext(ctx aws.Context, input *UpdateRateB return out, req.Send() } +const opUpdateRegexMatchSet = "UpdateRegexMatchSet" + +// UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRegexMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRegexMatchSet for more information on using the UpdateRegexMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRegexMatchSetRequest method. +// req, resp := client.UpdateRegexMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexMatchSet +func (c *WAF) UpdateRegexMatchSetRequest(input *UpdateRegexMatchSetInput) (req *request.Request, output *UpdateRegexMatchSetOutput) { + op := &request.Operation{ + Name: opUpdateRegexMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateRegexMatchSetInput{} + } + + output = &UpdateRegexMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRegexMatchSet API operation for AWS WAF. +// +// Inserts or deletes RegexMatchSetUpdate objects (filters) in a RegexMatchSet. +// For each RegexMatchSetUpdate object, you specify the following values: +// +// * Whether to insert or delete the object from the array. If you want to +// change a RegexMatchSetUpdate object, you delete the existing object and +// add a new one. +// +// * The part of a web request that you want AWS WAF to inspect, such as +// a query string or the value of the User-Agent header. +// +// * The identifier of the pattern (a regular expression) that you want AWS +// WAF to look for. For more information, see RegexPatternSet. +// +// * Whether to perform any conversions on the request, such as converting +// it to lowercase, before inspecting it for the specified string. +// +// For example, you can create a RegexPatternSet that matches any requests with +// User-Agent headers that contain the string B[a@]dB[o0]t. You can then configure +// AWS WAF to reject those requests. +// +// To create and configure a RegexMatchSet, perform the following steps: +// +// Create a RegexMatchSet. For more information, see CreateRegexMatchSet. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateRegexMatchSet request. +// +// Submit an UpdateRegexMatchSet request to specify the part of the request +// that you want AWS WAF to inspect (for example, the header or the URI) and +// the identifier of the RegexPatternSet that contain the regular expression +// patters you want AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation UpdateRegexMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeDisallowedNameException "DisallowedNameException" +// The name specified is invalid. +// +// * ErrCodeLimitsExceededException "LimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// * ErrCodeNonexistentItemException "NonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// The operation failed because you tried to add an object to or delete an object +// from another object that doesn't exist. For example: +// +// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't +// exist. +// +// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule +// that doesn't exist. +// +// * You tried to add an IP address to or delete an IP address from an IPSet +// that doesn't exist. +// +// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from +// a ByteMatchSet that doesn't exist. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add an IP address to an IPSet, but the IP address already +// exists in the specified IPSet. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexMatchSet +func (c *WAF) UpdateRegexMatchSet(input *UpdateRegexMatchSetInput) (*UpdateRegexMatchSetOutput, error) { + req, out := c.UpdateRegexMatchSetRequest(input) + return out, req.Send() +} + +// UpdateRegexMatchSetWithContext is the same as UpdateRegexMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRegexMatchSet for details on how to use this API operation. +// +// 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 *WAF) UpdateRegexMatchSetWithContext(ctx aws.Context, input *UpdateRegexMatchSetInput, opts ...request.Option) (*UpdateRegexMatchSetOutput, error) { + req, out := c.UpdateRegexMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRegexPatternSet = "UpdateRegexPatternSet" + +// UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRegexPatternSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRegexPatternSet for more information on using the UpdateRegexPatternSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRegexPatternSetRequest method. +// req, resp := client.UpdateRegexPatternSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexPatternSet +func (c *WAF) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (req *request.Request, output *UpdateRegexPatternSetOutput) { + op := &request.Operation{ + Name: opUpdateRegexPatternSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateRegexPatternSetInput{} + } + + output = &UpdateRegexPatternSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRegexPatternSet API operation for AWS WAF. +// +// Inserts or deletes RegexMatchSetUpdate objects (filters) in a RegexPatternSet. +// For each RegexPatternSet object, you specify the following values: +// +// * Whether to insert or delete the object from the array. If you want to +// change a RegexPatternSet object, you delete the existing object and add +// a new one. +// +// * The regular expression pattern that you want AWS WAF to look for. For +// more information, see RegexPatternSet. +// +// For example, you can create a RegexPatternString such as B[a@]dB[o0]t. AWS +// WAF will match this RegexPatternString to: +// +// * BadBot +// +// * BadB0t +// +// * B@dBot +// +// * B@dB0t +// +// To create and configure a RegexPatternSet, perform the following steps: +// +// Create a RegexPatternSet. For more information, see CreateRegexPatternSet. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateRegexPatternSet request. +// +// Submit an UpdateRegexPatternSet request to specify the regular expression +// pattern that you want AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation UpdateRegexPatternSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeStaleDataException "StaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeLimitsExceededException "LimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// The operation failed because you tried to add an object to or delete an object +// from another object that doesn't exist. For example: +// +// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't +// exist. +// +// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule +// that doesn't exist. +// +// * You tried to add an IP address to or delete an IP address from an IPSet +// that doesn't exist. +// +// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from +// a ByteMatchSet that doesn't exist. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add an IP address to an IPSet, but the IP address already +// exists in the specified IPSet. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// +// * ErrCodeInvalidAccountException "InvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeInvalidRegexPatternException "InvalidRegexPatternException" +// The regular expression (regex) you specified in RegexPatternString is invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexPatternSet +func (c *WAF) UpdateRegexPatternSet(input *UpdateRegexPatternSetInput) (*UpdateRegexPatternSetOutput, error) { + req, out := c.UpdateRegexPatternSetRequest(input) + return out, req.Send() +} + +// UpdateRegexPatternSetWithContext is the same as UpdateRegexPatternSet with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRegexPatternSet for details on how to use this API operation. +// +// 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 *WAF) UpdateRegexPatternSetWithContext(ctx aws.Context, input *UpdateRegexPatternSetInput, opts ...request.Option) (*UpdateRegexPatternSetOutput, error) { + req, out := c.UpdateRegexPatternSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateRule = "UpdateRule" // UpdateRuleRequest generates a "aws/request.Request" representing the @@ -4784,7 +6571,7 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -4993,7 +6780,7 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -5191,7 +6978,7 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -5405,7 +7192,7 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -5603,7 +7390,7 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -6288,6 +8075,102 @@ func (s *CreateByteMatchSetOutput) SetChangeToken(v string) *CreateByteMatchSetO return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateGeoMatchSetRequest +type CreateGeoMatchSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // A friendly name or description of the GeoMatchSet. You can't change Name + // after you create the GeoMatchSet. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateGeoMatchSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGeoMatchSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGeoMatchSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGeoMatchSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *CreateGeoMatchSetInput) SetChangeToken(v string) *CreateGeoMatchSetInput { + s.ChangeToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateGeoMatchSetInput) SetName(v string) *CreateGeoMatchSetInput { + s.Name = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateGeoMatchSetResponse +type CreateGeoMatchSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the CreateGeoMatchSet request. You + // can also use this value to query the status of the request. For more information, + // see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` + + // The GeoMatchSet returned in the CreateGeoMatchSet response. The GeoMatchSet + // contains no GeoMatchConstraints. + GeoMatchSet *GeoMatchSet `type:"structure"` +} + +// String returns the string representation +func (s CreateGeoMatchSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGeoMatchSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *CreateGeoMatchSetOutput) SetChangeToken(v string) *CreateGeoMatchSetOutput { + s.ChangeToken = &v + return s +} + +// SetGeoMatchSet sets the GeoMatchSet field's value. +func (s *CreateGeoMatchSetOutput) SetGeoMatchSet(v *GeoMatchSet) *CreateGeoMatchSetOutput { + s.GeoMatchSet = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateIPSetRequest type CreateIPSetInput struct { _ struct{} `type:"structure"` @@ -6535,6 +8418,196 @@ func (s *CreateRateBasedRuleOutput) SetRule(v *RateBasedRule) *CreateRateBasedRu return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexMatchSetRequest +type CreateRegexMatchSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // A friendly name or description of the RegexMatchSet. You can't change Name + // after you create a RegexMatchSet. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateRegexMatchSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRegexMatchSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRegexMatchSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRegexMatchSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *CreateRegexMatchSetInput) SetChangeToken(v string) *CreateRegexMatchSetInput { + s.ChangeToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateRegexMatchSetInput) SetName(v string) *CreateRegexMatchSetInput { + s.Name = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexMatchSetResponse +type CreateRegexMatchSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the CreateRegexMatchSet request. + // You can also use this value to query the status of the request. For more + // information, see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` + + // A RegexMatchSet that contains no RegexMatchTuple objects. + RegexMatchSet *RegexMatchSet `type:"structure"` +} + +// String returns the string representation +func (s CreateRegexMatchSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRegexMatchSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *CreateRegexMatchSetOutput) SetChangeToken(v string) *CreateRegexMatchSetOutput { + s.ChangeToken = &v + return s +} + +// SetRegexMatchSet sets the RegexMatchSet field's value. +func (s *CreateRegexMatchSetOutput) SetRegexMatchSet(v *RegexMatchSet) *CreateRegexMatchSetOutput { + s.RegexMatchSet = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexPatternSetRequest +type CreateRegexPatternSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // A friendly name or description of the RegexPatternSet. You can't change Name + // after you create a RegexPatternSet. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateRegexPatternSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRegexPatternSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRegexPatternSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRegexPatternSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *CreateRegexPatternSetInput) SetChangeToken(v string) *CreateRegexPatternSetInput { + s.ChangeToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateRegexPatternSetInput) SetName(v string) *CreateRegexPatternSetInput { + s.Name = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRegexPatternSetResponse +type CreateRegexPatternSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the CreateRegexPatternSet request. + // You can also use this value to query the status of the request. For more + // information, see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` + + // A RegexPatternSet that contains no objects. + RegexPatternSet *RegexPatternSet `type:"structure"` +} + +// String returns the string representation +func (s CreateRegexPatternSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRegexPatternSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *CreateRegexPatternSetOutput) SetChangeToken(v string) *CreateRegexPatternSetOutput { + s.ChangeToken = &v + return s +} + +// SetRegexPatternSet sets the RegexPatternSet field's value. +func (s *CreateRegexPatternSetOutput) SetRegexPatternSet(v *RegexPatternSet) *CreateRegexPatternSetOutput { + s.RegexPatternSet = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateRuleRequest type CreateRuleInput struct { _ struct{} `type:"structure"` @@ -7154,6 +9227,92 @@ func (s *DeleteByteMatchSetOutput) SetChangeToken(v string) *DeleteByteMatchSetO return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteGeoMatchSetRequest +type DeleteGeoMatchSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // The GeoMatchSetID of the GeoMatchSet that you want to delete. GeoMatchSetId + // is returned by CreateGeoMatchSet and by ListGeoMatchSets. + // + // GeoMatchSetId is a required field + GeoMatchSetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGeoMatchSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGeoMatchSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGeoMatchSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGeoMatchSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.GeoMatchSetId == nil { + invalidParams.Add(request.NewErrParamRequired("GeoMatchSetId")) + } + if s.GeoMatchSetId != nil && len(*s.GeoMatchSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GeoMatchSetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *DeleteGeoMatchSetInput) SetChangeToken(v string) *DeleteGeoMatchSetInput { + s.ChangeToken = &v + return s +} + +// SetGeoMatchSetId sets the GeoMatchSetId field's value. +func (s *DeleteGeoMatchSetInput) SetGeoMatchSetId(v string) *DeleteGeoMatchSetInput { + s.GeoMatchSetId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteGeoMatchSetResponse +type DeleteGeoMatchSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the DeleteGeoMatchSet request. You + // can also use this value to query the status of the request. For more information, + // see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteGeoMatchSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGeoMatchSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *DeleteGeoMatchSetOutput) SetChangeToken(v string) *DeleteGeoMatchSetOutput { + s.ChangeToken = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteIPSetRequest type DeleteIPSetInput struct { _ struct{} `type:"structure"` @@ -7326,6 +9485,178 @@ func (s *DeleteRateBasedRuleOutput) SetChangeToken(v string) *DeleteRateBasedRul return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexMatchSetRequest +type DeleteRegexMatchSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // The RegexMatchSetId of the RegexMatchSet that you want to delete. RegexMatchSetId + // is returned by CreateRegexMatchSet and by ListRegexMatchSets. + // + // RegexMatchSetId is a required field + RegexMatchSetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRegexMatchSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRegexMatchSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRegexMatchSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRegexMatchSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.RegexMatchSetId == nil { + invalidParams.Add(request.NewErrParamRequired("RegexMatchSetId")) + } + if s.RegexMatchSetId != nil && len(*s.RegexMatchSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegexMatchSetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *DeleteRegexMatchSetInput) SetChangeToken(v string) *DeleteRegexMatchSetInput { + s.ChangeToken = &v + return s +} + +// SetRegexMatchSetId sets the RegexMatchSetId field's value. +func (s *DeleteRegexMatchSetInput) SetRegexMatchSetId(v string) *DeleteRegexMatchSetInput { + s.RegexMatchSetId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexMatchSetResponse +type DeleteRegexMatchSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the DeleteRegexMatchSet request. + // You can also use this value to query the status of the request. For more + // information, see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteRegexMatchSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRegexMatchSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *DeleteRegexMatchSetOutput) SetChangeToken(v string) *DeleteRegexMatchSetOutput { + s.ChangeToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexPatternSetRequest +type DeleteRegexPatternSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // The RegexPatternSetId of the RegexPatternSet that you want to delete. RegexPatternSetId + // is returned by CreateRegexPatternSet and by ListRegexPatternSets. + // + // RegexPatternSetId is a required field + RegexPatternSetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRegexPatternSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRegexPatternSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRegexPatternSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRegexPatternSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.RegexPatternSetId == nil { + invalidParams.Add(request.NewErrParamRequired("RegexPatternSetId")) + } + if s.RegexPatternSetId != nil && len(*s.RegexPatternSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegexPatternSetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *DeleteRegexPatternSetInput) SetChangeToken(v string) *DeleteRegexPatternSetInput { + s.ChangeToken = &v + return s +} + +// SetRegexPatternSetId sets the RegexPatternSetId field's value. +func (s *DeleteRegexPatternSetInput) SetRegexPatternSetId(v string) *DeleteRegexPatternSetInput { + s.RegexPatternSetId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRegexPatternSetResponse +type DeleteRegexPatternSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the DeleteRegexPatternSet request. + // You can also use this value to query the status of the request. For more + // information, see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteRegexPatternSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRegexPatternSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *DeleteRegexPatternSetOutput) SetChangeToken(v string) *DeleteRegexPatternSetOutput { + s.ChangeToken = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRuleRequest type DeleteRuleInput struct { _ struct{} `type:"structure"` @@ -7836,6 +10167,216 @@ func (s *FieldToMatch) SetType(v string) *FieldToMatch { return s } +// The country from which web requests originate that you want AWS WAF to search +// for. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GeoMatchConstraint +type GeoMatchConstraint struct { + _ struct{} `type:"structure"` + + // The type of geographical area you want AWS WAF to search for. Currently Country + // is the only valid value. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"GeoMatchConstraintType"` + + // The country that you want AWS WAF to search for. + // + // Value is a required field + Value *string `type:"string" required:"true" enum:"GeoMatchConstraintValue"` +} + +// String returns the string representation +func (s GeoMatchConstraint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GeoMatchConstraint) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GeoMatchConstraint) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GeoMatchConstraint"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetType sets the Type field's value. +func (s *GeoMatchConstraint) SetType(v string) *GeoMatchConstraint { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *GeoMatchConstraint) SetValue(v string) *GeoMatchConstraint { + s.Value = &v + return s +} + +// Contains one or more countries that AWS WAF will search for. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GeoMatchSet +type GeoMatchSet struct { + _ struct{} `type:"structure"` + + // An array of GeoMatchConstraint objects, which contain the country that you + // want AWS WAF to search for. + // + // GeoMatchConstraints is a required field + GeoMatchConstraints []*GeoMatchConstraint `type:"list" required:"true"` + + // The GeoMatchSetId for an GeoMatchSet. You use GeoMatchSetId to get information + // about a GeoMatchSet (see GeoMatchSet), update a GeoMatchSet (see UpdateGeoMatchSet), + // insert a GeoMatchSet into a Rule or delete one from a Rule (see UpdateRule), + // and delete a GeoMatchSet from AWS WAF (see DeleteGeoMatchSet). + // + // GeoMatchSetId is returned by CreateGeoMatchSet and by ListGeoMatchSets. + // + // GeoMatchSetId is a required field + GeoMatchSetId *string `min:"1" type:"string" required:"true"` + + // A friendly name or description of the GeoMatchSet. You can't change the name + // of an GeoMatchSet after you create it. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GeoMatchSet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GeoMatchSet) GoString() string { + return s.String() +} + +// SetGeoMatchConstraints sets the GeoMatchConstraints field's value. +func (s *GeoMatchSet) SetGeoMatchConstraints(v []*GeoMatchConstraint) *GeoMatchSet { + s.GeoMatchConstraints = v + return s +} + +// SetGeoMatchSetId sets the GeoMatchSetId field's value. +func (s *GeoMatchSet) SetGeoMatchSetId(v string) *GeoMatchSet { + s.GeoMatchSetId = &v + return s +} + +// SetName sets the Name field's value. +func (s *GeoMatchSet) SetName(v string) *GeoMatchSet { + s.Name = &v + return s +} + +// Contains the identifier and the name of the GeoMatchSet. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GeoMatchSetSummary +type GeoMatchSetSummary struct { + _ struct{} `type:"structure"` + + // The GeoMatchSetId for an GeoMatchSet. You can use GeoMatchSetId in a GetGeoMatchSet + // request to get detailed information about an GeoMatchSet. + // + // GeoMatchSetId is a required field + GeoMatchSetId *string `min:"1" type:"string" required:"true"` + + // A friendly name or description of the GeoMatchSet. You can't change the name + // of an GeoMatchSet after you create it. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GeoMatchSetSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GeoMatchSetSummary) GoString() string { + return s.String() +} + +// SetGeoMatchSetId sets the GeoMatchSetId field's value. +func (s *GeoMatchSetSummary) SetGeoMatchSetId(v string) *GeoMatchSetSummary { + s.GeoMatchSetId = &v + return s +} + +// SetName sets the Name field's value. +func (s *GeoMatchSetSummary) SetName(v string) *GeoMatchSetSummary { + s.Name = &v + return s +} + +// Specifies the type of update to perform to an GeoMatchSet with UpdateGeoMatchSet. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GeoMatchSetUpdate +type GeoMatchSetUpdate struct { + _ struct{} `type:"structure"` + + // Specifies whether to insert or delete a country with UpdateGeoMatchSet. + // + // Action is a required field + Action *string `type:"string" required:"true" enum:"ChangeAction"` + + // The country from which web requests originate that you want AWS WAF to search + // for. + // + // GeoMatchConstraint is a required field + GeoMatchConstraint *GeoMatchConstraint `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GeoMatchSetUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GeoMatchSetUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GeoMatchSetUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GeoMatchSetUpdate"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.GeoMatchConstraint == nil { + invalidParams.Add(request.NewErrParamRequired("GeoMatchConstraint")) + } + if s.GeoMatchConstraint != nil { + if err := s.GeoMatchConstraint.Validate(); err != nil { + invalidParams.AddNested("GeoMatchConstraint", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *GeoMatchSetUpdate) SetAction(v string) *GeoMatchSetUpdate { + s.Action = &v + return s +} + +// SetGeoMatchConstraint sets the GeoMatchConstraint field's value. +func (s *GeoMatchSetUpdate) SetGeoMatchConstraint(v *GeoMatchConstraint) *GeoMatchSetUpdate { + s.GeoMatchConstraint = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetByteMatchSetRequest type GetByteMatchSetInput struct { _ struct{} `type:"structure"` @@ -8019,6 +10560,75 @@ func (s *GetChangeTokenStatusOutput) SetChangeTokenStatus(v string) *GetChangeTo return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetGeoMatchSetRequest +type GetGeoMatchSetInput struct { + _ struct{} `type:"structure"` + + // The GeoMatchSetId of the GeoMatchSet that you want to get. GeoMatchSetId + // is returned by CreateGeoMatchSet and by ListGeoMatchSets. + // + // GeoMatchSetId is a required field + GeoMatchSetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGeoMatchSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGeoMatchSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGeoMatchSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGeoMatchSetInput"} + if s.GeoMatchSetId == nil { + invalidParams.Add(request.NewErrParamRequired("GeoMatchSetId")) + } + if s.GeoMatchSetId != nil && len(*s.GeoMatchSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GeoMatchSetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGeoMatchSetId sets the GeoMatchSetId field's value. +func (s *GetGeoMatchSetInput) SetGeoMatchSetId(v string) *GetGeoMatchSetInput { + s.GeoMatchSetId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetGeoMatchSetResponse +type GetGeoMatchSetOutput struct { + _ struct{} `type:"structure"` + + // Information about the GeoMatchSet that you specified in the GetGeoMatchSet + // request. This includes the Type, which for a GeoMatchContraint is always + // Country, as well as the Value, which is the identifier for a specific country. + GeoMatchSet *GeoMatchSet `type:"structure"` +} + +// String returns the string representation +func (s GetGeoMatchSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGeoMatchSetOutput) GoString() string { + return s.String() +} + +// SetGeoMatchSet sets the GeoMatchSet field's value. +func (s *GetGeoMatchSetOutput) SetGeoMatchSet(v *GeoMatchSet) *GetGeoMatchSetOutput { + s.GeoMatchSet = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetIPSetRequest type GetIPSetInput struct { _ struct{} `type:"structure"` @@ -8248,6 +10858,143 @@ func (s *GetRateBasedRuleOutput) SetRule(v *RateBasedRule) *GetRateBasedRuleOutp return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexMatchSetRequest +type GetRegexMatchSetInput struct { + _ struct{} `type:"structure"` + + // The RegexMatchSetId of the RegexMatchSet that you want to get. RegexMatchSetId + // is returned by CreateRegexMatchSet and by ListRegexMatchSets. + // + // RegexMatchSetId is a required field + RegexMatchSetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRegexMatchSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRegexMatchSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRegexMatchSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRegexMatchSetInput"} + if s.RegexMatchSetId == nil { + invalidParams.Add(request.NewErrParamRequired("RegexMatchSetId")) + } + if s.RegexMatchSetId != nil && len(*s.RegexMatchSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegexMatchSetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRegexMatchSetId sets the RegexMatchSetId field's value. +func (s *GetRegexMatchSetInput) SetRegexMatchSetId(v string) *GetRegexMatchSetInput { + s.RegexMatchSetId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexMatchSetResponse +type GetRegexMatchSetOutput struct { + _ struct{} `type:"structure"` + + // Information about the RegexMatchSet that you specified in the GetRegexMatchSet + // request. For more information, see RegexMatchTuple. + RegexMatchSet *RegexMatchSet `type:"structure"` +} + +// String returns the string representation +func (s GetRegexMatchSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRegexMatchSetOutput) GoString() string { + return s.String() +} + +// SetRegexMatchSet sets the RegexMatchSet field's value. +func (s *GetRegexMatchSetOutput) SetRegexMatchSet(v *RegexMatchSet) *GetRegexMatchSetOutput { + s.RegexMatchSet = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexPatternSetRequest +type GetRegexPatternSetInput struct { + _ struct{} `type:"structure"` + + // The RegexPatternSetId of the RegexPatternSet that you want to get. RegexPatternSetId + // is returned by CreateRegexPatternSet and by ListRegexPatternSets. + // + // RegexPatternSetId is a required field + RegexPatternSetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRegexPatternSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRegexPatternSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRegexPatternSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRegexPatternSetInput"} + if s.RegexPatternSetId == nil { + invalidParams.Add(request.NewErrParamRequired("RegexPatternSetId")) + } + if s.RegexPatternSetId != nil && len(*s.RegexPatternSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegexPatternSetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRegexPatternSetId sets the RegexPatternSetId field's value. +func (s *GetRegexPatternSetInput) SetRegexPatternSetId(v string) *GetRegexPatternSetInput { + s.RegexPatternSetId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexPatternSetResponse +type GetRegexPatternSetOutput struct { + _ struct{} `type:"structure"` + + // Information about the RegexPatternSet that you specified in the GetRegexPatternSet + // request, including the identifier of the pattern set and the regular expression + // patterns you want AWS WAF to search for. + RegexPatternSet *RegexPatternSet `type:"structure"` +} + +// String returns the string representation +func (s GetRegexPatternSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRegexPatternSetOutput) GoString() string { + return s.String() +} + +// SetRegexPatternSet sets the RegexPatternSet field's value. +func (s *GetRegexPatternSetOutput) SetRegexPatternSet(v *RegexPatternSet) *GetRegexPatternSetOutput { + s.RegexPatternSet = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRuleRequest type GetRuleInput struct { _ struct{} `type:"structure"` @@ -9237,6 +11984,96 @@ func (s *ListByteMatchSetsOutput) SetNextMarker(v string) *ListByteMatchSetsOutp return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListGeoMatchSetsRequest +type ListGeoMatchSetsInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of GeoMatchSet objects that you want AWS WAF to return + // for this request. If you have more GeoMatchSet objects than the number you + // specify for Limit, the response includes a NextMarker value that you can + // use to get another batch of GeoMatchSet objects. + Limit *int64 `type:"integer"` + + // If you specify a value for Limit and you have more GeoMatchSets than the + // value of Limit, AWS WAF returns a NextMarker value in the response that allows + // you to list another group of GeoMatchSet objects. For the second and subsequent + // ListGeoMatchSets requests, specify the value of NextMarker from the previous + // response to get information about another batch of GeoMatchSet objects. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListGeoMatchSetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGeoMatchSetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGeoMatchSetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGeoMatchSetsInput"} + if s.NextMarker != nil && len(*s.NextMarker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListGeoMatchSetsInput) SetLimit(v int64) *ListGeoMatchSetsInput { + s.Limit = &v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListGeoMatchSetsInput) SetNextMarker(v string) *ListGeoMatchSetsInput { + s.NextMarker = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListGeoMatchSetsResponse +type ListGeoMatchSetsOutput struct { + _ struct{} `type:"structure"` + + // An array of GeoMatchSetSummary objects. + GeoMatchSets []*GeoMatchSetSummary `type:"list"` + + // If you have more GeoMatchSet objects than the number that you specified for + // Limit in the request, the response includes a NextMarker value. To list more + // GeoMatchSet objects, submit another ListGeoMatchSets request, and specify + // the NextMarker value from the response in the NextMarker value in the next + // request. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListGeoMatchSetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGeoMatchSetsOutput) GoString() string { + return s.String() +} + +// SetGeoMatchSets sets the GeoMatchSets field's value. +func (s *ListGeoMatchSetsOutput) SetGeoMatchSets(v []*GeoMatchSetSummary) *ListGeoMatchSetsOutput { + s.GeoMatchSets = v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListGeoMatchSetsOutput) SetNextMarker(v string) *ListGeoMatchSetsOutput { + s.NextMarker = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListIPSetsRequest type ListIPSetsInput struct { _ struct{} `type:"structure"` @@ -9251,7 +12088,7 @@ type ListIPSetsInput struct { // of Limit, AWS WAF returns a NextMarker value in the response that allows // you to list another group of IPSets. For the second and subsequent ListIPSets // requests, specify the value of NextMarker from the previous response to get - // information about another batch of ByteMatchSets. + // information about another batch of IPSets. NextMarker *string `min:"1" type:"string"` } @@ -9414,6 +12251,188 @@ func (s *ListRateBasedRulesOutput) SetRules(v []*RuleSummary) *ListRateBasedRule return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexMatchSetsRequest +type ListRegexMatchSetsInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of RegexMatchSet objects that you want AWS WAF to return + // for this request. If you have more RegexMatchSet objects than the number + // you specify for Limit, the response includes a NextMarker value that you + // can use to get another batch of RegexMatchSet objects. + Limit *int64 `type:"integer"` + + // If you specify a value for Limit and you have more RegexMatchSet objects + // than the value of Limit, AWS WAF returns a NextMarker value in the response + // that allows you to list another group of ByteMatchSets. For the second and + // subsequent ListRegexMatchSets requests, specify the value of NextMarker from + // the previous response to get information about another batch of RegexMatchSet + // objects. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListRegexMatchSetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRegexMatchSetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRegexMatchSetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRegexMatchSetsInput"} + if s.NextMarker != nil && len(*s.NextMarker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListRegexMatchSetsInput) SetLimit(v int64) *ListRegexMatchSetsInput { + s.Limit = &v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListRegexMatchSetsInput) SetNextMarker(v string) *ListRegexMatchSetsInput { + s.NextMarker = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexMatchSetsResponse +type ListRegexMatchSetsOutput struct { + _ struct{} `type:"structure"` + + // If you have more RegexMatchSet objects than the number that you specified + // for Limit in the request, the response includes a NextMarker value. To list + // more RegexMatchSet objects, submit another ListRegexMatchSets request, and + // specify the NextMarker value from the response in the NextMarker value in + // the next request. + NextMarker *string `min:"1" type:"string"` + + // An array of RegexMatchSetSummary objects. + RegexMatchSets []*RegexMatchSetSummary `type:"list"` +} + +// String returns the string representation +func (s ListRegexMatchSetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRegexMatchSetsOutput) GoString() string { + return s.String() +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListRegexMatchSetsOutput) SetNextMarker(v string) *ListRegexMatchSetsOutput { + s.NextMarker = &v + return s +} + +// SetRegexMatchSets sets the RegexMatchSets field's value. +func (s *ListRegexMatchSetsOutput) SetRegexMatchSets(v []*RegexMatchSetSummary) *ListRegexMatchSetsOutput { + s.RegexMatchSets = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexPatternSetsRequest +type ListRegexPatternSetsInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of RegexPatternSet objects that you want AWS WAF to + // return for this request. If you have more RegexPatternSet objects than the + // number you specify for Limit, the response includes a NextMarker value that + // you can use to get another batch of RegexPatternSet objects. + Limit *int64 `type:"integer"` + + // If you specify a value for Limit and you have more RegexPatternSet objects + // than the value of Limit, AWS WAF returns a NextMarker value in the response + // that allows you to list another group of RegexPatternSet objects. For the + // second and subsequent ListRegexPatternSets requests, specify the value of + // NextMarker from the previous response to get information about another batch + // of RegexPatternSet objects. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListRegexPatternSetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRegexPatternSetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRegexPatternSetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRegexPatternSetsInput"} + if s.NextMarker != nil && len(*s.NextMarker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListRegexPatternSetsInput) SetLimit(v int64) *ListRegexPatternSetsInput { + s.Limit = &v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListRegexPatternSetsInput) SetNextMarker(v string) *ListRegexPatternSetsInput { + s.NextMarker = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRegexPatternSetsResponse +type ListRegexPatternSetsOutput struct { + _ struct{} `type:"structure"` + + // If you have more RegexPatternSet objects than the number that you specified + // for Limit in the request, the response includes a NextMarker value. To list + // more RegexPatternSet objects, submit another ListRegexPatternSets request, + // and specify the NextMarker value from the response in the NextMarker value + // in the next request. + NextMarker *string `min:"1" type:"string"` + + // An array of RegexPatternSetSummary objects. + RegexPatternSets []*RegexPatternSetSummary `type:"list"` +} + +// String returns the string representation +func (s ListRegexPatternSetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRegexPatternSetsOutput) GoString() string { + return s.String() +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListRegexPatternSetsOutput) SetNextMarker(v string) *ListRegexPatternSetsOutput { + s.NextMarker = &v + return s +} + +// SetRegexPatternSets sets the RegexPatternSets field's value. +func (s *ListRegexPatternSetsOutput) SetRegexPatternSets(v []*RegexPatternSetSummary) *ListRegexPatternSetsOutput { + s.RegexPatternSets = v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListRulesRequest type ListRulesInput struct { _ struct{} `type:"structure"` @@ -9867,10 +12886,10 @@ func (s *ListXssMatchSetsOutput) SetXssMatchSets(v []*XssMatchSetSummary) *ListX return s } -// Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, and -// SizeConstraintSet objects that you want to add to a Rule and, for each object, -// indicates whether you want to negate the settings, for example, requests -// that do NOT originate from the IP address 192.0.2.44. +// Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, +// GeoMatchSet, and SizeConstraintSet objects that you want to add to a Rule +// and, for each object, indicates whether you want to negate the settings, +// for example, requests that do NOT originate from the IP address 192.0.2.44. // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/Predicate type Predicate struct { _ struct{} `type:"structure"` @@ -9883,15 +12902,15 @@ type Predicate struct { // Set Negated to False if you want AWS WAF to allow, block, or count requests // based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, - // XssMatchSet, or SizeConstraintSet. For example, if an IPSet includes the - // IP address 192.0.2.44, AWS WAF will allow or block requests based on that - // IP address. + // XssMatchSet, RegexMatchSet, GeoMatchSet, or SizeConstraintSet. For example, + // if an IPSet includes the IP address 192.0.2.44, AWS WAF will allow or block + // requests based on that IP address. // // Set Negated to True if you want AWS WAF to allow or block a request based // on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, - // XssMatchSet, or SizeConstraintSet. For example, if an IPSet includes the - // IP address 192.0.2.44, AWS WAF will allow, block, or count requests based - // on all IP addresses except192.0.2.44. + // XssMatchSet, RegexMatchSet, GeoMatchSet, or SizeConstraintSet. For example, + // if an IPSet includes the IP address 192.0.2.44, AWS WAF will allow, block, + // or count requests based on all IP addresses except192.0.2.44. // // Negated is a required field Negated *bool `type:"boolean" required:"true"` @@ -10060,6 +13079,503 @@ func (s *RateBasedRule) SetRuleId(v string) *RateBasedRule { return s } +// In a GetRegexMatchSet request, RegexMatchSet is a complex type that contains +// the RegexMatchSetId and Name of a RegexMatchSet, and the values that you +// specified when you updated the RegexMatchSet. +// +// The values are contained in a RegexMatchTuple object, which specify the parts +// of web requests that you want AWS WAF to inspect and the values that you +// want AWS WAF to search for. If a RegexMatchSet contains more than one RegexMatchTuple +// object, a request needs to match the settings in only one ByteMatchTuple +// to be considered a match. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/RegexMatchSet +type RegexMatchSet struct { + _ struct{} `type:"structure"` + + // A friendly name or description of the RegexMatchSet. You can't change Name + // after you create a RegexMatchSet. + Name *string `min:"1" type:"string"` + + // The RegexMatchSetId for a RegexMatchSet. You use RegexMatchSetId to get information + // about a RegexMatchSet (see GetRegexMatchSet), update a RegexMatchSet (see + // UpdateRegexMatchSet), insert a RegexMatchSet into a Rule or delete one from + // a Rule (see UpdateRule), and delete a RegexMatchSet from AWS WAF (see DeleteRegexMatchSet). + // + // RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets. + RegexMatchSetId *string `min:"1" type:"string"` + + // Contains an array of RegexMatchTuple objects. Each RegexMatchTuple object + // contains: + // + // * The part of a web request that you want AWS WAF to inspect, such as + // a query string or the value of the User-Agent header. + // + // * The identifier of the pattern (a regular expression) that you want AWS + // WAF to look for. For more information, see RegexPatternSet. + // + // * Whether to perform any conversions on the request, such as converting + // it to lowercase, before inspecting it for the specified string. + RegexMatchTuples []*RegexMatchTuple `type:"list"` +} + +// String returns the string representation +func (s RegexMatchSet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegexMatchSet) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *RegexMatchSet) SetName(v string) *RegexMatchSet { + s.Name = &v + return s +} + +// SetRegexMatchSetId sets the RegexMatchSetId field's value. +func (s *RegexMatchSet) SetRegexMatchSetId(v string) *RegexMatchSet { + s.RegexMatchSetId = &v + return s +} + +// SetRegexMatchTuples sets the RegexMatchTuples field's value. +func (s *RegexMatchSet) SetRegexMatchTuples(v []*RegexMatchTuple) *RegexMatchSet { + s.RegexMatchTuples = v + return s +} + +// Returned by ListRegexMatchSets. Each RegexMatchSetSummary object includes +// the Name and RegexMatchSetId for one RegexMatchSet. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/RegexMatchSetSummary +type RegexMatchSetSummary struct { + _ struct{} `type:"structure"` + + // A friendly name or description of the RegexMatchSet. You can't change Name + // after you create a RegexMatchSet. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The RegexMatchSetId for a RegexMatchSet. You use RegexMatchSetId to get information + // about a RegexMatchSet, update a RegexMatchSet, remove a RegexMatchSet from + // a Rule, and delete a RegexMatchSet from AWS WAF. + // + // RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets. + // + // RegexMatchSetId is a required field + RegexMatchSetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RegexMatchSetSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegexMatchSetSummary) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *RegexMatchSetSummary) SetName(v string) *RegexMatchSetSummary { + s.Name = &v + return s +} + +// SetRegexMatchSetId sets the RegexMatchSetId field's value. +func (s *RegexMatchSetSummary) SetRegexMatchSetId(v string) *RegexMatchSetSummary { + s.RegexMatchSetId = &v + return s +} + +// In an UpdateRegexMatchSet request, RegexMatchSetUpdate specifies whether +// to insert or delete a RegexMatchTuple and includes the settings for the RegexMatchTuple. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/RegexMatchSetUpdate +type RegexMatchSetUpdate struct { + _ struct{} `type:"structure"` + + // Specifies whether to insert or delete a RegexMatchTuple. + // + // Action is a required field + Action *string `type:"string" required:"true" enum:"ChangeAction"` + + // Information about the part of a web request that you want AWS WAF to inspect + // and the identifier of the regular expression (regex) pattern that you want + // AWS WAF to search for. If you specify DELETE for the value of Action, the + // RegexMatchTuple values must exactly match the values in the RegexMatchTuple + // that you want to delete from the RegexMatchSet. + // + // RegexMatchTuple is a required field + RegexMatchTuple *RegexMatchTuple `type:"structure" required:"true"` +} + +// String returns the string representation +func (s RegexMatchSetUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegexMatchSetUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegexMatchSetUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegexMatchSetUpdate"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.RegexMatchTuple == nil { + invalidParams.Add(request.NewErrParamRequired("RegexMatchTuple")) + } + if s.RegexMatchTuple != nil { + if err := s.RegexMatchTuple.Validate(); err != nil { + invalidParams.AddNested("RegexMatchTuple", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *RegexMatchSetUpdate) SetAction(v string) *RegexMatchSetUpdate { + s.Action = &v + return s +} + +// SetRegexMatchTuple sets the RegexMatchTuple field's value. +func (s *RegexMatchSetUpdate) SetRegexMatchTuple(v *RegexMatchTuple) *RegexMatchSetUpdate { + s.RegexMatchTuple = v + return s +} + +// The regular expression pattern that you want AWS WAF to search for in web +// requests, the location in requests that you want AWS WAF to search, and other +// settings. Each RegexMatchTuple object contains: +// +// * The part of a web request that you want AWS WAF to inspect, such as +// a query string or the value of the User-Agent header. +// +// * The identifier of the pattern (a regular expression) that you want AWS +// WAF to look for. For more information, see RegexPatternSet. +// +// * Whether to perform any conversions on the request, such as converting +// it to lowercase, before inspecting it for the specified string. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/RegexMatchTuple +type RegexMatchTuple struct { + _ struct{} `type:"structure"` + + // Specifies where in a web request to look for the RegexPatternSet. + // + // FieldToMatch is a required field + FieldToMatch *FieldToMatch `type:"structure" required:"true"` + + // The RegexPatternSetId for a RegexPatternSet. You use RegexPatternSetId to + // get information about a RegexPatternSet (see GetRegexPatternSet), update + // a RegexPatternSet (see UpdateRegexPatternSet), insert a RegexPatternSet into + // a RegexMatchSet or delete one from a RegexMatchSet (see UpdateRegexMatchSet), + // and delete an RegexPatternSet from AWS WAF (see DeleteRegexPatternSet). + // + // RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. + // + // RegexPatternSetId is a required field + RegexPatternSetId *string `min:"1" type:"string" required:"true"` + + // Text transformations eliminate some of the unusual formatting that attackers + // use in web requests in an effort to bypass AWS WAF. If you specify a transformation, + // AWS WAF performs the transformation on RegexPatternSet before inspecting + // a request for a match. + // + // CMD_LINE + // + // When you're concerned that attackers are injecting an operating system commandline + // command and using unusual formatting to disguise some or all of the command, + // use this option to perform the following transformations: + // + // * Delete the following characters: \ " ' ^ + // + // * Delete spaces before the following characters: / ( + // + // * Replace the following characters with a space: , ; + // + // * Replace multiple spaces with one space + // + // * Convert uppercase letters (A-Z) to lowercase (a-z) + // + // COMPRESS_WHITE_SPACE + // + // Use this option to replace the following characters with a space character + // (decimal 32): + // + // * \f, formfeed, decimal 12 + // + // * \t, tab, decimal 9 + // + // * \n, newline, decimal 10 + // + // * \r, carriage return, decimal 13 + // + // * \v, vertical tab, decimal 11 + // + // * non-breaking space, decimal 160 + // + // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. + // + // HTML_ENTITY_DECODE + // + // Use this option to replace HTML-encoded characters with unencoded characters. + // HTML_ENTITY_DECODE performs the following operations: + // + // * Replaces (ampersand)quot; with " + // + // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 + // + // * Replaces (ampersand)lt; with a "less than" symbol + // + // * Replaces (ampersand)gt; with > + // + // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, + // with the corresponding characters + // + // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;, + // with the corresponding characters + // + // LOWERCASE + // + // Use this option to convert uppercase letters (A-Z) to lowercase (a-z). + // + // URL_DECODE + // + // Use this option to decode a URL-encoded value. + // + // NONE + // + // Specify NONE if you don't want to perform any text transformations. + // + // TextTransformation is a required field + TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"` +} + +// String returns the string representation +func (s RegexMatchTuple) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegexMatchTuple) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegexMatchTuple) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegexMatchTuple"} + if s.FieldToMatch == nil { + invalidParams.Add(request.NewErrParamRequired("FieldToMatch")) + } + if s.RegexPatternSetId == nil { + invalidParams.Add(request.NewErrParamRequired("RegexPatternSetId")) + } + if s.RegexPatternSetId != nil && len(*s.RegexPatternSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegexPatternSetId", 1)) + } + if s.TextTransformation == nil { + invalidParams.Add(request.NewErrParamRequired("TextTransformation")) + } + if s.FieldToMatch != nil { + if err := s.FieldToMatch.Validate(); err != nil { + invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFieldToMatch sets the FieldToMatch field's value. +func (s *RegexMatchTuple) SetFieldToMatch(v *FieldToMatch) *RegexMatchTuple { + s.FieldToMatch = v + return s +} + +// SetRegexPatternSetId sets the RegexPatternSetId field's value. +func (s *RegexMatchTuple) SetRegexPatternSetId(v string) *RegexMatchTuple { + s.RegexPatternSetId = &v + return s +} + +// SetTextTransformation sets the TextTransformation field's value. +func (s *RegexMatchTuple) SetTextTransformation(v string) *RegexMatchTuple { + s.TextTransformation = &v + return s +} + +// The RegexPatternSet specifies the regular expression (regex) pattern that +// you want AWS WAF to search for, such as B[a@]dB[o0]t. You can then configure +// AWS WAF to reject those requests. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/RegexPatternSet +type RegexPatternSet struct { + _ struct{} `type:"structure"` + + // A friendly name or description of the RegexPatternSet. You can't change Name + // after you create a RegexPatternSet. + Name *string `min:"1" type:"string"` + + // The identifier for the RegexPatternSet. You use RegexPatternSetId to get + // information about a RegexPatternSet, update a RegexPatternSet, remove a RegexPatternSet + // from a RegexMatchSet, and delete a RegexPatternSet from AWS WAF. + // + // RegexMatchSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. + // + // RegexPatternSetId is a required field + RegexPatternSetId *string `min:"1" type:"string" required:"true"` + + // Specifies the regular expression (regex) patterns that you want AWS WAF to + // search for, such as B[a@]dB[o0]t. + // + // RegexPatternStrings is a required field + RegexPatternStrings []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s RegexPatternSet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegexPatternSet) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *RegexPatternSet) SetName(v string) *RegexPatternSet { + s.Name = &v + return s +} + +// SetRegexPatternSetId sets the RegexPatternSetId field's value. +func (s *RegexPatternSet) SetRegexPatternSetId(v string) *RegexPatternSet { + s.RegexPatternSetId = &v + return s +} + +// SetRegexPatternStrings sets the RegexPatternStrings field's value. +func (s *RegexPatternSet) SetRegexPatternStrings(v []*string) *RegexPatternSet { + s.RegexPatternStrings = v + return s +} + +// Returned by ListRegexPatternSets. Each RegexPatternSetSummary object includes +// the Name and RegexPatternSetId for one RegexPatternSet. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/RegexPatternSetSummary +type RegexPatternSetSummary struct { + _ struct{} `type:"structure"` + + // A friendly name or description of the RegexPatternSet. You can't change Name + // after you create a RegexPatternSet. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The RegexPatternSetId for a RegexPatternSet. You use RegexPatternSetId to + // get information about a RegexPatternSet, update a RegexPatternSet, remove + // a RegexPatternSet from a RegexMatchSet, and delete a RegexPatternSet from + // AWS WAF. + // + // RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. + // + // RegexPatternSetId is a required field + RegexPatternSetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RegexPatternSetSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegexPatternSetSummary) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *RegexPatternSetSummary) SetName(v string) *RegexPatternSetSummary { + s.Name = &v + return s +} + +// SetRegexPatternSetId sets the RegexPatternSetId field's value. +func (s *RegexPatternSetSummary) SetRegexPatternSetId(v string) *RegexPatternSetSummary { + s.RegexPatternSetId = &v + return s +} + +// In an UpdateRegexPatternSet request, RegexPatternSetUpdate specifies whether +// to insert or delete a RegexPatternString and includes the settings for the +// RegexPatternString. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/RegexPatternSetUpdate +type RegexPatternSetUpdate struct { + _ struct{} `type:"structure"` + + // Specifies whether to insert or delete a RegexPatternString. + // + // Action is a required field + Action *string `type:"string" required:"true" enum:"ChangeAction"` + + // Specifies the regular expression (regex) pattern that you want AWS WAF to + // search for, such as B[a@]dB[o0]t. + // + // RegexPatternString is a required field + RegexPatternString *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RegexPatternSetUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegexPatternSetUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegexPatternSetUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegexPatternSetUpdate"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.RegexPatternString == nil { + invalidParams.Add(request.NewErrParamRequired("RegexPatternString")) + } + if s.RegexPatternString != nil && len(*s.RegexPatternString) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegexPatternString", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *RegexPatternSetUpdate) SetAction(v string) *RegexPatternSetUpdate { + s.Action = &v + return s +} + +// SetRegexPatternString sets the RegexPatternString field's value. +func (s *RegexPatternSetUpdate) SetRegexPatternString(v string) *RegexPatternSetUpdate { + s.RegexPatternString = &v + return s +} + // A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet objects // that identify the web requests that you want to allow, block, or count. For // example, you might create a Rule that includes the following predicates: @@ -11049,7 +14565,7 @@ type UpdateByteMatchSetInput struct { // * FieldToMatch: Contains Data and Type // // Updates is a required field - Updates []*ByteMatchSetUpdate `type:"list" required:"true"` + Updates []*ByteMatchSetUpdate `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -11080,6 +14596,9 @@ func (s *UpdateByteMatchSetInput) Validate() error { if s.Updates == nil { invalidParams.Add(request.NewErrParamRequired("Updates")) } + if s.Updates != nil && len(s.Updates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) + } if s.Updates != nil { for i, v := range s.Updates { if v == nil { @@ -11141,6 +14660,127 @@ func (s *UpdateByteMatchSetOutput) SetChangeToken(v string) *UpdateByteMatchSetO return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateGeoMatchSetRequest +type UpdateGeoMatchSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // The GeoMatchSetId of the GeoMatchSet that you want to update. GeoMatchSetId + // is returned by CreateGeoMatchSet and by ListGeoMatchSets. + // + // GeoMatchSetId is a required field + GeoMatchSetId *string `min:"1" type:"string" required:"true"` + + // An array of GeoMatchSetUpdate objects that you want to insert into or delete + // from an GeoMatchSet. For more information, see the applicable data types: + // + // * GeoMatchSetUpdate: Contains Action and GeoMatchConstraint + // + // * GeoMatchConstraint: Contains Type and Value + // + // You can have only one Type and Value per GeoMatchConstraint. To add multiple + // countries, include multiple GeoMatchSetUpdate objects in your request. + // + // Updates is a required field + Updates []*GeoMatchSetUpdate `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateGeoMatchSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGeoMatchSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGeoMatchSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGeoMatchSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.GeoMatchSetId == nil { + invalidParams.Add(request.NewErrParamRequired("GeoMatchSetId")) + } + if s.GeoMatchSetId != nil && len(*s.GeoMatchSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GeoMatchSetId", 1)) + } + if s.Updates == nil { + invalidParams.Add(request.NewErrParamRequired("Updates")) + } + if s.Updates != nil && len(s.Updates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) + } + if s.Updates != nil { + for i, v := range s.Updates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *UpdateGeoMatchSetInput) SetChangeToken(v string) *UpdateGeoMatchSetInput { + s.ChangeToken = &v + return s +} + +// SetGeoMatchSetId sets the GeoMatchSetId field's value. +func (s *UpdateGeoMatchSetInput) SetGeoMatchSetId(v string) *UpdateGeoMatchSetInput { + s.GeoMatchSetId = &v + return s +} + +// SetUpdates sets the Updates field's value. +func (s *UpdateGeoMatchSetInput) SetUpdates(v []*GeoMatchSetUpdate) *UpdateGeoMatchSetInput { + s.Updates = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateGeoMatchSetResponse +type UpdateGeoMatchSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the UpdateGeoMatchSet request. You + // can also use this value to query the status of the request. For more information, + // see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateGeoMatchSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGeoMatchSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *UpdateGeoMatchSetOutput) SetChangeToken(v string) *UpdateGeoMatchSetOutput { + s.ChangeToken = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateIPSetRequest type UpdateIPSetInput struct { _ struct{} `type:"structure"` @@ -11164,7 +14804,7 @@ type UpdateIPSetInput struct { // * IPSetDescriptor: Contains Type and Value // // Updates is a required field - Updates []*IPSetUpdate `type:"list" required:"true"` + Updates []*IPSetUpdate `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -11195,6 +14835,9 @@ func (s *UpdateIPSetInput) Validate() error { if s.Updates == nil { invalidParams.Add(request.NewErrParamRequired("Updates")) } + if s.Updates != nil && len(s.Updates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) + } if s.Updates != nil { for i, v := range s.Updates { if v == nil { @@ -11388,6 +15031,234 @@ func (s *UpdateRateBasedRuleOutput) SetChangeToken(v string) *UpdateRateBasedRul return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexMatchSetRequest +type UpdateRegexMatchSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // The RegexMatchSetId of the RegexMatchSet that you want to update. RegexMatchSetId + // is returned by CreateRegexMatchSet and by ListRegexMatchSets. + // + // RegexMatchSetId is a required field + RegexMatchSetId *string `min:"1" type:"string" required:"true"` + + // An array of RegexMatchSetUpdate objects that you want to insert into or delete + // from a RegexMatchSet. For more information, see RegexMatchTuple. + // + // Updates is a required field + Updates []*RegexMatchSetUpdate `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateRegexMatchSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRegexMatchSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRegexMatchSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRegexMatchSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.RegexMatchSetId == nil { + invalidParams.Add(request.NewErrParamRequired("RegexMatchSetId")) + } + if s.RegexMatchSetId != nil && len(*s.RegexMatchSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegexMatchSetId", 1)) + } + if s.Updates == nil { + invalidParams.Add(request.NewErrParamRequired("Updates")) + } + if s.Updates != nil && len(s.Updates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) + } + if s.Updates != nil { + for i, v := range s.Updates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *UpdateRegexMatchSetInput) SetChangeToken(v string) *UpdateRegexMatchSetInput { + s.ChangeToken = &v + return s +} + +// SetRegexMatchSetId sets the RegexMatchSetId field's value. +func (s *UpdateRegexMatchSetInput) SetRegexMatchSetId(v string) *UpdateRegexMatchSetInput { + s.RegexMatchSetId = &v + return s +} + +// SetUpdates sets the Updates field's value. +func (s *UpdateRegexMatchSetInput) SetUpdates(v []*RegexMatchSetUpdate) *UpdateRegexMatchSetInput { + s.Updates = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexMatchSetResponse +type UpdateRegexMatchSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the UpdateRegexMatchSet request. + // You can also use this value to query the status of the request. For more + // information, see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateRegexMatchSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRegexMatchSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *UpdateRegexMatchSetOutput) SetChangeToken(v string) *UpdateRegexMatchSetOutput { + s.ChangeToken = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexPatternSetRequest +type UpdateRegexPatternSetInput struct { + _ struct{} `type:"structure"` + + // The value returned by the most recent call to GetChangeToken. + // + // ChangeToken is a required field + ChangeToken *string `min:"1" type:"string" required:"true"` + + // The RegexPatternSetId of the RegexPatternSet that you want to update. RegexPatternSetId + // is returned by CreateRegexPatternSet and by ListRegexPatternSets. + // + // RegexPatternSetId is a required field + RegexPatternSetId *string `min:"1" type:"string" required:"true"` + + // An array of RegexPatternSetUpdate objects that you want to insert into or + // delete from a RegexPatternSet. + // + // Updates is a required field + Updates []*RegexPatternSetUpdate `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateRegexPatternSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRegexPatternSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRegexPatternSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRegexPatternSetInput"} + if s.ChangeToken == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeToken")) + } + if s.ChangeToken != nil && len(*s.ChangeToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1)) + } + if s.RegexPatternSetId == nil { + invalidParams.Add(request.NewErrParamRequired("RegexPatternSetId")) + } + if s.RegexPatternSetId != nil && len(*s.RegexPatternSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegexPatternSetId", 1)) + } + if s.Updates == nil { + invalidParams.Add(request.NewErrParamRequired("Updates")) + } + if s.Updates != nil && len(s.Updates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) + } + if s.Updates != nil { + for i, v := range s.Updates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *UpdateRegexPatternSetInput) SetChangeToken(v string) *UpdateRegexPatternSetInput { + s.ChangeToken = &v + return s +} + +// SetRegexPatternSetId sets the RegexPatternSetId field's value. +func (s *UpdateRegexPatternSetInput) SetRegexPatternSetId(v string) *UpdateRegexPatternSetInput { + s.RegexPatternSetId = &v + return s +} + +// SetUpdates sets the Updates field's value. +func (s *UpdateRegexPatternSetInput) SetUpdates(v []*RegexPatternSetUpdate) *UpdateRegexPatternSetInput { + s.Updates = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexPatternSetResponse +type UpdateRegexPatternSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the UpdateRegexPatternSet request. + // You can also use this value to query the status of the request. For more + // information, see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateRegexPatternSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRegexPatternSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *UpdateRegexPatternSetOutput) SetChangeToken(v string) *UpdateRegexPatternSetOutput { + s.ChangeToken = &v + return s +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRuleRequest type UpdateRuleInput struct { _ struct{} `type:"structure"` @@ -11532,7 +15403,7 @@ type UpdateSizeConstraintSetInput struct { // * FieldToMatch: Contains Data and Type // // Updates is a required field - Updates []*SizeConstraintSetUpdate `type:"list" required:"true"` + Updates []*SizeConstraintSetUpdate `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -11563,6 +15434,9 @@ func (s *UpdateSizeConstraintSetInput) Validate() error { if s.Updates == nil { invalidParams.Add(request.NewErrParamRequired("Updates")) } + if s.Updates != nil && len(s.Updates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) + } if s.Updates != nil { for i, v := range s.Updates { if v == nil { @@ -11651,7 +15525,7 @@ type UpdateSqlInjectionMatchSetInput struct { // * FieldToMatch: Contains Data and Type // // Updates is a required field - Updates []*SqlInjectionMatchSetUpdate `type:"list" required:"true"` + Updates []*SqlInjectionMatchSetUpdate `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -11682,6 +15556,9 @@ func (s *UpdateSqlInjectionMatchSetInput) Validate() error { if s.Updates == nil { invalidParams.Add(request.NewErrParamRequired("Updates")) } + if s.Updates != nil && len(s.Updates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) + } if s.Updates != nil { for i, v := range s.Updates { if v == nil { @@ -11894,7 +15771,7 @@ type UpdateXssMatchSetInput struct { // * FieldToMatch: Contains Data and Type // // Updates is a required field - Updates []*XssMatchSetUpdate `type:"list" required:"true"` + Updates []*XssMatchSetUpdate `min:"1" type:"list" required:"true"` // The XssMatchSetId of the XssMatchSet that you want to update. XssMatchSetId // is returned by CreateXssMatchSet and by ListXssMatchSets. @@ -11925,6 +15802,9 @@ func (s *UpdateXssMatchSetInput) Validate() error { if s.Updates == nil { invalidParams.Add(request.NewErrParamRequired("Updates")) } + if s.Updates != nil && len(s.Updates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Updates", 1)) + } if s.XssMatchSetId == nil { invalidParams.Add(request.NewErrParamRequired("XssMatchSetId")) } @@ -12569,6 +16449,760 @@ const ( ComparisonOperatorGt = "GT" ) +const ( + // GeoMatchConstraintTypeCountry is a GeoMatchConstraintType enum value + GeoMatchConstraintTypeCountry = "Country" +) + +const ( + // GeoMatchConstraintValueAf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAf = "AF" + + // GeoMatchConstraintValueAx is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAx = "AX" + + // GeoMatchConstraintValueAl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAl = "AL" + + // GeoMatchConstraintValueDz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDz = "DZ" + + // GeoMatchConstraintValueAs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAs = "AS" + + // GeoMatchConstraintValueAd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAd = "AD" + + // GeoMatchConstraintValueAo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAo = "AO" + + // GeoMatchConstraintValueAi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAi = "AI" + + // GeoMatchConstraintValueAq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAq = "AQ" + + // GeoMatchConstraintValueAg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAg = "AG" + + // GeoMatchConstraintValueAr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAr = "AR" + + // GeoMatchConstraintValueAm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAm = "AM" + + // GeoMatchConstraintValueAw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAw = "AW" + + // GeoMatchConstraintValueAu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAu = "AU" + + // GeoMatchConstraintValueAt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAt = "AT" + + // GeoMatchConstraintValueAz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAz = "AZ" + + // GeoMatchConstraintValueBs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBs = "BS" + + // GeoMatchConstraintValueBh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBh = "BH" + + // GeoMatchConstraintValueBd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBd = "BD" + + // GeoMatchConstraintValueBb is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBb = "BB" + + // GeoMatchConstraintValueBy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBy = "BY" + + // GeoMatchConstraintValueBe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBe = "BE" + + // GeoMatchConstraintValueBz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBz = "BZ" + + // GeoMatchConstraintValueBj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBj = "BJ" + + // GeoMatchConstraintValueBm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBm = "BM" + + // GeoMatchConstraintValueBt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBt = "BT" + + // GeoMatchConstraintValueBo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBo = "BO" + + // GeoMatchConstraintValueBq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBq = "BQ" + + // GeoMatchConstraintValueBa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBa = "BA" + + // GeoMatchConstraintValueBw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBw = "BW" + + // GeoMatchConstraintValueBv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBv = "BV" + + // GeoMatchConstraintValueBr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBr = "BR" + + // GeoMatchConstraintValueIo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIo = "IO" + + // GeoMatchConstraintValueBn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBn = "BN" + + // GeoMatchConstraintValueBg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBg = "BG" + + // GeoMatchConstraintValueBf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBf = "BF" + + // GeoMatchConstraintValueBi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBi = "BI" + + // GeoMatchConstraintValueKh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKh = "KH" + + // GeoMatchConstraintValueCm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCm = "CM" + + // GeoMatchConstraintValueCa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCa = "CA" + + // GeoMatchConstraintValueCv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCv = "CV" + + // GeoMatchConstraintValueKy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKy = "KY" + + // GeoMatchConstraintValueCf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCf = "CF" + + // GeoMatchConstraintValueTd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTd = "TD" + + // GeoMatchConstraintValueCl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCl = "CL" + + // GeoMatchConstraintValueCn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCn = "CN" + + // GeoMatchConstraintValueCx is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCx = "CX" + + // GeoMatchConstraintValueCc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCc = "CC" + + // GeoMatchConstraintValueCo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCo = "CO" + + // GeoMatchConstraintValueKm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKm = "KM" + + // GeoMatchConstraintValueCg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCg = "CG" + + // GeoMatchConstraintValueCd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCd = "CD" + + // GeoMatchConstraintValueCk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCk = "CK" + + // GeoMatchConstraintValueCr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCr = "CR" + + // GeoMatchConstraintValueCi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCi = "CI" + + // GeoMatchConstraintValueHr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHr = "HR" + + // GeoMatchConstraintValueCu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCu = "CU" + + // GeoMatchConstraintValueCw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCw = "CW" + + // GeoMatchConstraintValueCy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCy = "CY" + + // GeoMatchConstraintValueCz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCz = "CZ" + + // GeoMatchConstraintValueDk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDk = "DK" + + // GeoMatchConstraintValueDj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDj = "DJ" + + // GeoMatchConstraintValueDm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDm = "DM" + + // GeoMatchConstraintValueDo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDo = "DO" + + // GeoMatchConstraintValueEc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEc = "EC" + + // GeoMatchConstraintValueEg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEg = "EG" + + // GeoMatchConstraintValueSv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSv = "SV" + + // GeoMatchConstraintValueGq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGq = "GQ" + + // GeoMatchConstraintValueEr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEr = "ER" + + // GeoMatchConstraintValueEe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEe = "EE" + + // GeoMatchConstraintValueEt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEt = "ET" + + // GeoMatchConstraintValueFk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFk = "FK" + + // GeoMatchConstraintValueFo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFo = "FO" + + // GeoMatchConstraintValueFj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFj = "FJ" + + // GeoMatchConstraintValueFi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFi = "FI" + + // GeoMatchConstraintValueFr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFr = "FR" + + // GeoMatchConstraintValueGf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGf = "GF" + + // GeoMatchConstraintValuePf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePf = "PF" + + // GeoMatchConstraintValueTf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTf = "TF" + + // GeoMatchConstraintValueGa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGa = "GA" + + // GeoMatchConstraintValueGm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGm = "GM" + + // GeoMatchConstraintValueGe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGe = "GE" + + // GeoMatchConstraintValueDe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDe = "DE" + + // GeoMatchConstraintValueGh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGh = "GH" + + // GeoMatchConstraintValueGi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGi = "GI" + + // GeoMatchConstraintValueGr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGr = "GR" + + // GeoMatchConstraintValueGl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGl = "GL" + + // GeoMatchConstraintValueGd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGd = "GD" + + // GeoMatchConstraintValueGp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGp = "GP" + + // GeoMatchConstraintValueGu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGu = "GU" + + // GeoMatchConstraintValueGt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGt = "GT" + + // GeoMatchConstraintValueGg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGg = "GG" + + // GeoMatchConstraintValueGn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGn = "GN" + + // GeoMatchConstraintValueGw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGw = "GW" + + // GeoMatchConstraintValueGy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGy = "GY" + + // GeoMatchConstraintValueHt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHt = "HT" + + // GeoMatchConstraintValueHm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHm = "HM" + + // GeoMatchConstraintValueVa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVa = "VA" + + // GeoMatchConstraintValueHn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHn = "HN" + + // GeoMatchConstraintValueHk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHk = "HK" + + // GeoMatchConstraintValueHu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHu = "HU" + + // GeoMatchConstraintValueIs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIs = "IS" + + // GeoMatchConstraintValueIn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIn = "IN" + + // GeoMatchConstraintValueId is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueId = "ID" + + // GeoMatchConstraintValueIr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIr = "IR" + + // GeoMatchConstraintValueIq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIq = "IQ" + + // GeoMatchConstraintValueIe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIe = "IE" + + // GeoMatchConstraintValueIm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIm = "IM" + + // GeoMatchConstraintValueIl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIl = "IL" + + // GeoMatchConstraintValueIt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIt = "IT" + + // GeoMatchConstraintValueJm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueJm = "JM" + + // GeoMatchConstraintValueJp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueJp = "JP" + + // GeoMatchConstraintValueJe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueJe = "JE" + + // GeoMatchConstraintValueJo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueJo = "JO" + + // GeoMatchConstraintValueKz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKz = "KZ" + + // GeoMatchConstraintValueKe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKe = "KE" + + // GeoMatchConstraintValueKi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKi = "KI" + + // GeoMatchConstraintValueKp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKp = "KP" + + // GeoMatchConstraintValueKr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKr = "KR" + + // GeoMatchConstraintValueKw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKw = "KW" + + // GeoMatchConstraintValueKg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKg = "KG" + + // GeoMatchConstraintValueLa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLa = "LA" + + // GeoMatchConstraintValueLv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLv = "LV" + + // GeoMatchConstraintValueLb is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLb = "LB" + + // GeoMatchConstraintValueLs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLs = "LS" + + // GeoMatchConstraintValueLr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLr = "LR" + + // GeoMatchConstraintValueLy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLy = "LY" + + // GeoMatchConstraintValueLi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLi = "LI" + + // GeoMatchConstraintValueLt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLt = "LT" + + // GeoMatchConstraintValueLu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLu = "LU" + + // GeoMatchConstraintValueMo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMo = "MO" + + // GeoMatchConstraintValueMk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMk = "MK" + + // GeoMatchConstraintValueMg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMg = "MG" + + // GeoMatchConstraintValueMw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMw = "MW" + + // GeoMatchConstraintValueMy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMy = "MY" + + // GeoMatchConstraintValueMv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMv = "MV" + + // GeoMatchConstraintValueMl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMl = "ML" + + // GeoMatchConstraintValueMt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMt = "MT" + + // GeoMatchConstraintValueMh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMh = "MH" + + // GeoMatchConstraintValueMq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMq = "MQ" + + // GeoMatchConstraintValueMr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMr = "MR" + + // GeoMatchConstraintValueMu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMu = "MU" + + // GeoMatchConstraintValueYt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueYt = "YT" + + // GeoMatchConstraintValueMx is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMx = "MX" + + // GeoMatchConstraintValueFm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFm = "FM" + + // GeoMatchConstraintValueMd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMd = "MD" + + // GeoMatchConstraintValueMc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMc = "MC" + + // GeoMatchConstraintValueMn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMn = "MN" + + // GeoMatchConstraintValueMe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMe = "ME" + + // GeoMatchConstraintValueMs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMs = "MS" + + // GeoMatchConstraintValueMa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMa = "MA" + + // GeoMatchConstraintValueMz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMz = "MZ" + + // GeoMatchConstraintValueMm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMm = "MM" + + // GeoMatchConstraintValueNa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNa = "NA" + + // GeoMatchConstraintValueNr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNr = "NR" + + // GeoMatchConstraintValueNp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNp = "NP" + + // GeoMatchConstraintValueNl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNl = "NL" + + // GeoMatchConstraintValueNc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNc = "NC" + + // GeoMatchConstraintValueNz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNz = "NZ" + + // GeoMatchConstraintValueNi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNi = "NI" + + // GeoMatchConstraintValueNe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNe = "NE" + + // GeoMatchConstraintValueNg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNg = "NG" + + // GeoMatchConstraintValueNu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNu = "NU" + + // GeoMatchConstraintValueNf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNf = "NF" + + // GeoMatchConstraintValueMp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMp = "MP" + + // GeoMatchConstraintValueNo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNo = "NO" + + // GeoMatchConstraintValueOm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueOm = "OM" + + // GeoMatchConstraintValuePk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePk = "PK" + + // GeoMatchConstraintValuePw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePw = "PW" + + // GeoMatchConstraintValuePs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePs = "PS" + + // GeoMatchConstraintValuePa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePa = "PA" + + // GeoMatchConstraintValuePg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePg = "PG" + + // GeoMatchConstraintValuePy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePy = "PY" + + // GeoMatchConstraintValuePe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePe = "PE" + + // GeoMatchConstraintValuePh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePh = "PH" + + // GeoMatchConstraintValuePn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePn = "PN" + + // GeoMatchConstraintValuePl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePl = "PL" + + // GeoMatchConstraintValuePt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePt = "PT" + + // GeoMatchConstraintValuePr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePr = "PR" + + // GeoMatchConstraintValueQa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueQa = "QA" + + // GeoMatchConstraintValueRe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRe = "RE" + + // GeoMatchConstraintValueRo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRo = "RO" + + // GeoMatchConstraintValueRu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRu = "RU" + + // GeoMatchConstraintValueRw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRw = "RW" + + // GeoMatchConstraintValueBl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBl = "BL" + + // GeoMatchConstraintValueSh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSh = "SH" + + // GeoMatchConstraintValueKn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKn = "KN" + + // GeoMatchConstraintValueLc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLc = "LC" + + // GeoMatchConstraintValueMf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMf = "MF" + + // GeoMatchConstraintValuePm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePm = "PM" + + // GeoMatchConstraintValueVc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVc = "VC" + + // GeoMatchConstraintValueWs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueWs = "WS" + + // GeoMatchConstraintValueSm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSm = "SM" + + // GeoMatchConstraintValueSt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSt = "ST" + + // GeoMatchConstraintValueSa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSa = "SA" + + // GeoMatchConstraintValueSn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSn = "SN" + + // GeoMatchConstraintValueRs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRs = "RS" + + // GeoMatchConstraintValueSc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSc = "SC" + + // GeoMatchConstraintValueSl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSl = "SL" + + // GeoMatchConstraintValueSg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSg = "SG" + + // GeoMatchConstraintValueSx is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSx = "SX" + + // GeoMatchConstraintValueSk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSk = "SK" + + // GeoMatchConstraintValueSi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSi = "SI" + + // GeoMatchConstraintValueSb is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSb = "SB" + + // GeoMatchConstraintValueSo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSo = "SO" + + // GeoMatchConstraintValueZa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueZa = "ZA" + + // GeoMatchConstraintValueGs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGs = "GS" + + // GeoMatchConstraintValueSs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSs = "SS" + + // GeoMatchConstraintValueEs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEs = "ES" + + // GeoMatchConstraintValueLk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLk = "LK" + + // GeoMatchConstraintValueSd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSd = "SD" + + // GeoMatchConstraintValueSr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSr = "SR" + + // GeoMatchConstraintValueSj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSj = "SJ" + + // GeoMatchConstraintValueSz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSz = "SZ" + + // GeoMatchConstraintValueSe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSe = "SE" + + // GeoMatchConstraintValueCh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCh = "CH" + + // GeoMatchConstraintValueSy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSy = "SY" + + // GeoMatchConstraintValueTw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTw = "TW" + + // GeoMatchConstraintValueTj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTj = "TJ" + + // GeoMatchConstraintValueTz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTz = "TZ" + + // GeoMatchConstraintValueTh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTh = "TH" + + // GeoMatchConstraintValueTl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTl = "TL" + + // GeoMatchConstraintValueTg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTg = "TG" + + // GeoMatchConstraintValueTk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTk = "TK" + + // GeoMatchConstraintValueTo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTo = "TO" + + // GeoMatchConstraintValueTt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTt = "TT" + + // GeoMatchConstraintValueTn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTn = "TN" + + // GeoMatchConstraintValueTr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTr = "TR" + + // GeoMatchConstraintValueTm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTm = "TM" + + // GeoMatchConstraintValueTc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTc = "TC" + + // GeoMatchConstraintValueTv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTv = "TV" + + // GeoMatchConstraintValueUg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUg = "UG" + + // GeoMatchConstraintValueUa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUa = "UA" + + // GeoMatchConstraintValueAe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAe = "AE" + + // GeoMatchConstraintValueGb is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGb = "GB" + + // GeoMatchConstraintValueUs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUs = "US" + + // GeoMatchConstraintValueUm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUm = "UM" + + // GeoMatchConstraintValueUy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUy = "UY" + + // GeoMatchConstraintValueUz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUz = "UZ" + + // GeoMatchConstraintValueVu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVu = "VU" + + // GeoMatchConstraintValueVe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVe = "VE" + + // GeoMatchConstraintValueVn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVn = "VN" + + // GeoMatchConstraintValueVg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVg = "VG" + + // GeoMatchConstraintValueVi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVi = "VI" + + // GeoMatchConstraintValueWf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueWf = "WF" + + // GeoMatchConstraintValueEh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEh = "EH" + + // GeoMatchConstraintValueYe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueYe = "YE" + + // GeoMatchConstraintValueZm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueZm = "ZM" + + // GeoMatchConstraintValueZw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueZw = "ZW" +) + const ( // IPSetDescriptorTypeIpv4 is a IPSetDescriptorType enum value IPSetDescriptorTypeIpv4 = "IPV4" @@ -12622,6 +17256,12 @@ const ( // ParameterExceptionFieldSizeConstraintComparisonOperator is a ParameterExceptionField enum value ParameterExceptionFieldSizeConstraintComparisonOperator = "SIZE_CONSTRAINT_COMPARISON_OPERATOR" + // ParameterExceptionFieldGeoMatchLocationType is a ParameterExceptionField enum value + ParameterExceptionFieldGeoMatchLocationType = "GEO_MATCH_LOCATION_TYPE" + + // ParameterExceptionFieldGeoMatchLocationValue is a ParameterExceptionField enum value + ParameterExceptionFieldGeoMatchLocationValue = "GEO_MATCH_LOCATION_VALUE" + // ParameterExceptionFieldRateKey is a ParameterExceptionField enum value ParameterExceptionFieldRateKey = "RATE_KEY" @@ -12667,11 +17307,17 @@ const ( // PredicateTypeSqlInjectionMatch is a PredicateType enum value PredicateTypeSqlInjectionMatch = "SqlInjectionMatch" + // PredicateTypeGeoMatch is a PredicateType enum value + PredicateTypeGeoMatch = "GeoMatch" + // PredicateTypeSizeConstraint is a PredicateType enum value PredicateTypeSizeConstraint = "SizeConstraint" // PredicateTypeXssMatch is a PredicateType enum value PredicateTypeXssMatch = "XssMatch" + + // PredicateTypeRegexMatch is a PredicateType enum value + PredicateTypeRegexMatch = "RegexMatch" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go b/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go index 4f7176335..403183379 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go @@ -18,7 +18,7 @@ // // Using the Client // -// To AWS WAF with the SDK use the New function to create +// To contact AWS WAF with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go index 67a17577f..83f4870dc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go @@ -71,7 +71,7 @@ const ( // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than - // HEADER, QUERY_STRING, or URI. + // HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -80,6 +80,12 @@ const ( // a resource with which a web ACL cannot be associated. ErrCodeInvalidParameterException = "InvalidParameterException" + // ErrCodeInvalidRegexPatternException for service response error code + // "InvalidRegexPatternException". + // + // The regular expression (regex) you specified in RegexPatternString is invalid. + ErrCodeInvalidRegexPatternException = "InvalidRegexPatternException" + // ErrCodeLimitsExceededException for service response error code // "LimitsExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go index dcf329a0a..4e966dd9e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go @@ -92,7 +92,7 @@ func (c *WAFRegional) AssociateWebACLRequest(input *AssociateWebACLInput) (req * // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -236,7 +236,7 @@ func (c *WAFRegional) CreateByteMatchSetRequest(input *waf.CreateByteMatchSetInp // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -276,6 +276,152 @@ func (c *WAFRegional) CreateByteMatchSetWithContext(ctx aws.Context, input *waf. return out, req.Send() } +const opCreateGeoMatchSet = "CreateGeoMatchSet" + +// CreateGeoMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the CreateGeoMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGeoMatchSet for more information on using the CreateGeoMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGeoMatchSetRequest method. +// req, resp := client.CreateGeoMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateGeoMatchSet +func (c *WAFRegional) CreateGeoMatchSetRequest(input *waf.CreateGeoMatchSetInput) (req *request.Request, output *waf.CreateGeoMatchSetOutput) { + op := &request.Operation{ + Name: opCreateGeoMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.CreateGeoMatchSetInput{} + } + + output = &waf.CreateGeoMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGeoMatchSet API operation for AWS WAF Regional. +// +// Creates an GeoMatchSet, which you use to specify which web requests you want +// to allow or block based on the country that the requests originate from. +// For example, if you're receiving a lot of requests from one or more countries +// and you want to block the requests, you can create an GeoMatchSet that contains +// those countries and then configure AWS WAF to block the requests. +// +// To create and configure a GeoMatchSet, perform the following steps: +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a CreateGeoMatchSet request. +// +// Submit a CreateGeoMatchSet request. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateGeoMatchSet request. +// +// Submit an UpdateGeoMatchSetSet request to specify the countries that you +// want AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation CreateGeoMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" +// The name specified is invalid. +// +// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateGeoMatchSet +func (c *WAFRegional) CreateGeoMatchSet(input *waf.CreateGeoMatchSetInput) (*waf.CreateGeoMatchSetOutput, error) { + req, out := c.CreateGeoMatchSetRequest(input) + return out, req.Send() +} + +// CreateGeoMatchSetWithContext is the same as CreateGeoMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGeoMatchSet for details on how to use this API operation. +// +// 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 *WAFRegional) CreateGeoMatchSetWithContext(ctx aws.Context, input *waf.CreateGeoMatchSetInput, opts ...request.Option) (*waf.CreateGeoMatchSetOutput, error) { + req, out := c.CreateGeoMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the @@ -387,7 +533,7 @@ func (c *WAFRegional) CreateIPSetRequest(input *waf.CreateIPSetInput) (req *requ // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -569,7 +715,7 @@ func (c *WAFRegional) CreateRateBasedRuleRequest(input *waf.CreateRateBasedRuleI // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -605,6 +751,232 @@ func (c *WAFRegional) CreateRateBasedRuleWithContext(ctx aws.Context, input *waf return out, req.Send() } +const opCreateRegexMatchSet = "CreateRegexMatchSet" + +// CreateRegexMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the CreateRegexMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRegexMatchSet for more information on using the CreateRegexMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRegexMatchSetRequest method. +// req, resp := client.CreateRegexMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRegexMatchSet +func (c *WAFRegional) CreateRegexMatchSetRequest(input *waf.CreateRegexMatchSetInput) (req *request.Request, output *waf.CreateRegexMatchSetOutput) { + op := &request.Operation{ + Name: opCreateRegexMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.CreateRegexMatchSetInput{} + } + + output = &waf.CreateRegexMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRegexMatchSet API operation for AWS WAF Regional. +// +// Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify the +// part of a web request that you want AWS WAF to inspect, such as the values +// of the User-Agent header or the query string. For example, you can create +// a RegexMatchSet that contains a RegexMatchTuple that looks for any requests +// with User-Agent headers that match a RegexPatternSet with pattern B[a@]dB[o0]t. +// You can then configure AWS WAF to reject those requests. +// +// To create and configure a RegexMatchSet, perform the following steps: +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a CreateRegexMatchSet request. +// +// Submit a CreateRegexMatchSet request. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateRegexMatchSet request. +// +// Submit an UpdateRegexMatchSet request to specify the part of the request +// that you want AWS WAF to inspect (for example, the header or the URI) and +// the value, using a RegexPatternSet, that you want AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation CreateRegexMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" +// The name specified is invalid. +// +// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRegexMatchSet +func (c *WAFRegional) CreateRegexMatchSet(input *waf.CreateRegexMatchSetInput) (*waf.CreateRegexMatchSetOutput, error) { + req, out := c.CreateRegexMatchSetRequest(input) + return out, req.Send() +} + +// CreateRegexMatchSetWithContext is the same as CreateRegexMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRegexMatchSet for details on how to use this API operation. +// +// 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 *WAFRegional) CreateRegexMatchSetWithContext(ctx aws.Context, input *waf.CreateRegexMatchSetInput, opts ...request.Option) (*waf.CreateRegexMatchSetOutput, error) { + req, out := c.CreateRegexMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateRegexPatternSet = "CreateRegexPatternSet" + +// CreateRegexPatternSetRequest generates a "aws/request.Request" representing the +// client's request for the CreateRegexPatternSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRegexPatternSet for more information on using the CreateRegexPatternSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRegexPatternSetRequest method. +// req, resp := client.CreateRegexPatternSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRegexPatternSet +func (c *WAFRegional) CreateRegexPatternSetRequest(input *waf.CreateRegexPatternSetInput) (req *request.Request, output *waf.CreateRegexPatternSetOutput) { + op := &request.Operation{ + Name: opCreateRegexPatternSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.CreateRegexPatternSetInput{} + } + + output = &waf.CreateRegexPatternSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRegexPatternSet API operation for AWS WAF Regional. +// +// Creates a RegexPatternSet. You then use UpdateRegexPatternSet to specify +// the regular expression (regex) pattern that you want AWS WAF to search for, +// such as B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. +// +// To create and configure a RegexPatternSet, perform the following steps: +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a CreateRegexPatternSet request. +// +// Submit a CreateRegexPatternSet request. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateRegexPatternSet request. +// +// Submit an UpdateRegexPatternSet request to specify the string that you want +// AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation CreateRegexPatternSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" +// The name specified is invalid. +// +// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateRegexPatternSet +func (c *WAFRegional) CreateRegexPatternSet(input *waf.CreateRegexPatternSetInput) (*waf.CreateRegexPatternSetOutput, error) { + req, out := c.CreateRegexPatternSetRequest(input) + return out, req.Send() +} + +// CreateRegexPatternSetWithContext is the same as CreateRegexPatternSet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRegexPatternSet for details on how to use this API operation. +// +// 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 *WAFRegional) CreateRegexPatternSetWithContext(ctx aws.Context, input *waf.CreateRegexPatternSetInput, opts ...request.Option) (*waf.CreateRegexPatternSetOutput, error) { + req, out := c.CreateRegexPatternSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the @@ -726,7 +1098,7 @@ func (c *WAFRegional) CreateRuleRequest(input *waf.CreateRuleInput) (req *reques // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -874,7 +1246,7 @@ func (c *WAFRegional) CreateSizeConstraintSetRequest(input *waf.CreateSizeConstr // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -1014,7 +1386,7 @@ func (c *WAFRegional) CreateSqlInjectionMatchSetRequest(input *waf.CreateSqlInje // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -1174,7 +1546,7 @@ func (c *WAFRegional) CreateWebACLRequest(input *waf.CreateWebACLInput) (req *re // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -1315,7 +1687,7 @@ func (c *WAFRegional) CreateXssMatchSetRequest(input *waf.CreateXssMatchSetInput // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -1482,6 +1854,132 @@ func (c *WAFRegional) DeleteByteMatchSetWithContext(ctx aws.Context, input *waf. return out, req.Send() } +const opDeleteGeoMatchSet = "DeleteGeoMatchSet" + +// DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGeoMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGeoMatchSet for more information on using the DeleteGeoMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGeoMatchSetRequest method. +// req, resp := client.DeleteGeoMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteGeoMatchSet +func (c *WAFRegional) DeleteGeoMatchSetRequest(input *waf.DeleteGeoMatchSetInput) (req *request.Request, output *waf.DeleteGeoMatchSetOutput) { + op := &request.Operation{ + Name: opDeleteGeoMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.DeleteGeoMatchSetInput{} + } + + output = &waf.DeleteGeoMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGeoMatchSet API operation for AWS WAF Regional. +// +// Permanently deletes a GeoMatchSet. You can't delete a GeoMatchSet if it's +// still used in any Rules or if it still includes any countries. +// +// If you just want to remove a GeoMatchSet from a Rule, use UpdateRule. +// +// To permanently delete a GeoMatchSet from AWS WAF, perform the following steps: +// +// Update the GeoMatchSet to remove any countries. For more information, see +// UpdateGeoMatchSet. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a DeleteGeoMatchSet request. +// +// Submit a DeleteGeoMatchSet request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation DeleteGeoMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" +// The operation failed because you tried to delete an object that is still +// in use. For example: +// +// * You tried to delete a ByteMatchSet that is still referenced by a Rule. +// +// * You tried to delete a Rule that is still referenced by a WebACL. +// +// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" +// The operation failed because you tried to delete an object that isn't empty. +// For example: +// +// * You tried to delete a WebACL that still contains one or more Rule objects. +// +// * You tried to delete a Rule that still contains one or more ByteMatchSet +// objects or other predicates. +// +// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple +// objects. +// +// * You tried to delete an IPSet that references one or more IP addresses. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteGeoMatchSet +func (c *WAFRegional) DeleteGeoMatchSet(input *waf.DeleteGeoMatchSetInput) (*waf.DeleteGeoMatchSetOutput, error) { + req, out := c.DeleteGeoMatchSetRequest(input) + return out, req.Send() +} + +// DeleteGeoMatchSetWithContext is the same as DeleteGeoMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGeoMatchSet for details on how to use this API operation. +// +// 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 *WAFRegional) DeleteGeoMatchSetWithContext(ctx aws.Context, input *waf.DeleteGeoMatchSetInput, opts ...request.Option) (*waf.DeleteGeoMatchSetOutput, error) { + req, out := c.DeleteGeoMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the @@ -1736,6 +2234,248 @@ func (c *WAFRegional) DeleteRateBasedRuleWithContext(ctx aws.Context, input *waf return out, req.Send() } +const opDeleteRegexMatchSet = "DeleteRegexMatchSet" + +// DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRegexMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRegexMatchSet for more information on using the DeleteRegexMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRegexMatchSetRequest method. +// req, resp := client.DeleteRegexMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexMatchSet +func (c *WAFRegional) DeleteRegexMatchSetRequest(input *waf.DeleteRegexMatchSetInput) (req *request.Request, output *waf.DeleteRegexMatchSetOutput) { + op := &request.Operation{ + Name: opDeleteRegexMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.DeleteRegexMatchSetInput{} + } + + output = &waf.DeleteRegexMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRegexMatchSet API operation for AWS WAF Regional. +// +// Permanently deletes a RegexMatchSet. You can't delete a RegexMatchSet if +// it's still used in any Rules or if it still includes any RegexMatchTuples +// objects (any filters). +// +// If you just want to remove a RegexMatchSet from a Rule, use UpdateRule. +// +// To permanently delete a RegexMatchSet, perform the following steps: +// +// Update the RegexMatchSet to remove filters, if any. For more information, +// see UpdateRegexMatchSet. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of a DeleteRegexMatchSet request. +// +// Submit a DeleteRegexMatchSet request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation DeleteRegexMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" +// The operation failed because you tried to delete an object that is still +// in use. For example: +// +// * You tried to delete a ByteMatchSet that is still referenced by a Rule. +// +// * You tried to delete a Rule that is still referenced by a WebACL. +// +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" +// The operation failed because you tried to delete an object that isn't empty. +// For example: +// +// * You tried to delete a WebACL that still contains one or more Rule objects. +// +// * You tried to delete a Rule that still contains one or more ByteMatchSet +// objects or other predicates. +// +// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple +// objects. +// +// * You tried to delete an IPSet that references one or more IP addresses. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexMatchSet +func (c *WAFRegional) DeleteRegexMatchSet(input *waf.DeleteRegexMatchSetInput) (*waf.DeleteRegexMatchSetOutput, error) { + req, out := c.DeleteRegexMatchSetRequest(input) + return out, req.Send() +} + +// DeleteRegexMatchSetWithContext is the same as DeleteRegexMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRegexMatchSet for details on how to use this API operation. +// +// 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 *WAFRegional) DeleteRegexMatchSetWithContext(ctx aws.Context, input *waf.DeleteRegexMatchSetInput, opts ...request.Option) (*waf.DeleteRegexMatchSetOutput, error) { + req, out := c.DeleteRegexMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteRegexPatternSet = "DeleteRegexPatternSet" + +// DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRegexPatternSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRegexPatternSet for more information on using the DeleteRegexPatternSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRegexPatternSetRequest method. +// req, resp := client.DeleteRegexPatternSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexPatternSet +func (c *WAFRegional) DeleteRegexPatternSetRequest(input *waf.DeleteRegexPatternSetInput) (req *request.Request, output *waf.DeleteRegexPatternSetOutput) { + op := &request.Operation{ + Name: opDeleteRegexPatternSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.DeleteRegexPatternSetInput{} + } + + output = &waf.DeleteRegexPatternSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRegexPatternSet API operation for AWS WAF Regional. +// +// Permanently deletes a RegexPatternSet. You can't delete a RegexPatternSet +// if it's still used in any RegexMatchSet or if the RegexPatternSet is not +// empty. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation DeleteRegexPatternSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" +// The operation failed because you tried to delete an object that is still +// in use. For example: +// +// * You tried to delete a ByteMatchSet that is still referenced by a Rule. +// +// * You tried to delete a Rule that is still referenced by a WebACL. +// +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFNonEmptyEntityException "WAFNonEmptyEntityException" +// The operation failed because you tried to delete an object that isn't empty. +// For example: +// +// * You tried to delete a WebACL that still contains one or more Rule objects. +// +// * You tried to delete a Rule that still contains one or more ByteMatchSet +// objects or other predicates. +// +// * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple +// objects. +// +// * You tried to delete an IPSet that references one or more IP addresses. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexPatternSet +func (c *WAFRegional) DeleteRegexPatternSet(input *waf.DeleteRegexPatternSetInput) (*waf.DeleteRegexPatternSetOutput, error) { + req, out := c.DeleteRegexPatternSetRequest(input) + return out, req.Send() +} + +// DeleteRegexPatternSetWithContext is the same as DeleteRegexPatternSet with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRegexPatternSet for details on how to use this API operation. +// +// 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 *WAFRegional) DeleteRegexPatternSetWithContext(ctx aws.Context, input *waf.DeleteRegexPatternSetInput, opts ...request.Option) (*waf.DeleteRegexPatternSetOutput, error) { + req, out := c.DeleteRegexPatternSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the @@ -2450,7 +3190,7 @@ func (c *WAFRegional) DisassociateWebACLRequest(input *DisassociateWebACLInput) // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -2757,6 +3497,93 @@ func (c *WAFRegional) GetChangeTokenStatusWithContext(ctx aws.Context, input *wa return out, req.Send() } +const opGetGeoMatchSet = "GetGeoMatchSet" + +// GetGeoMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the GetGeoMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGeoMatchSet for more information on using the GetGeoMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGeoMatchSetRequest method. +// req, resp := client.GetGeoMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetGeoMatchSet +func (c *WAFRegional) GetGeoMatchSetRequest(input *waf.GetGeoMatchSetInput) (req *request.Request, output *waf.GetGeoMatchSetOutput) { + op := &request.Operation{ + Name: opGetGeoMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.GetGeoMatchSetInput{} + } + + output = &waf.GetGeoMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGeoMatchSet API operation for AWS WAF Regional. +// +// Returns the GeoMatchSet that is specified by GeoMatchSetId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation GetGeoMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetGeoMatchSet +func (c *WAFRegional) GetGeoMatchSet(input *waf.GetGeoMatchSetInput) (*waf.GetGeoMatchSetOutput, error) { + req, out := c.GetGeoMatchSetRequest(input) + return out, req.Send() +} + +// GetGeoMatchSetWithContext is the same as GetGeoMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See GetGeoMatchSet for details on how to use this API operation. +// +// 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 *WAFRegional) GetGeoMatchSetWithContext(ctx aws.Context, input *waf.GetGeoMatchSetInput, opts ...request.Option) (*waf.GetGeoMatchSetOutput, error) { + req, out := c.GetGeoMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the @@ -3021,7 +3848,7 @@ func (c *WAFRegional) GetRateBasedRuleManagedKeysRequest(input *waf.GetRateBased // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -3051,6 +3878,180 @@ func (c *WAFRegional) GetRateBasedRuleManagedKeysWithContext(ctx aws.Context, in return out, req.Send() } +const opGetRegexMatchSet = "GetRegexMatchSet" + +// GetRegexMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the GetRegexMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRegexMatchSet for more information on using the GetRegexMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRegexMatchSetRequest method. +// req, resp := client.GetRegexMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRegexMatchSet +func (c *WAFRegional) GetRegexMatchSetRequest(input *waf.GetRegexMatchSetInput) (req *request.Request, output *waf.GetRegexMatchSetOutput) { + op := &request.Operation{ + Name: opGetRegexMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.GetRegexMatchSetInput{} + } + + output = &waf.GetRegexMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRegexMatchSet API operation for AWS WAF Regional. +// +// Returns the RegexMatchSet specified by RegexMatchSetId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation GetRegexMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRegexMatchSet +func (c *WAFRegional) GetRegexMatchSet(input *waf.GetRegexMatchSetInput) (*waf.GetRegexMatchSetOutput, error) { + req, out := c.GetRegexMatchSetRequest(input) + return out, req.Send() +} + +// GetRegexMatchSetWithContext is the same as GetRegexMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See GetRegexMatchSet for details on how to use this API operation. +// +// 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 *WAFRegional) GetRegexMatchSetWithContext(ctx aws.Context, input *waf.GetRegexMatchSetInput, opts ...request.Option) (*waf.GetRegexMatchSetOutput, error) { + req, out := c.GetRegexMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRegexPatternSet = "GetRegexPatternSet" + +// GetRegexPatternSetRequest generates a "aws/request.Request" representing the +// client's request for the GetRegexPatternSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRegexPatternSet for more information on using the GetRegexPatternSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRegexPatternSetRequest method. +// req, resp := client.GetRegexPatternSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRegexPatternSet +func (c *WAFRegional) GetRegexPatternSetRequest(input *waf.GetRegexPatternSetInput) (req *request.Request, output *waf.GetRegexPatternSetOutput) { + op := &request.Operation{ + Name: opGetRegexPatternSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.GetRegexPatternSetInput{} + } + + output = &waf.GetRegexPatternSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRegexPatternSet API operation for AWS WAF Regional. +// +// Returns the RegexPatternSet specified by RegexPatternSetId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation GetRegexPatternSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetRegexPatternSet +func (c *WAFRegional) GetRegexPatternSet(input *waf.GetRegexPatternSetInput) (*waf.GetRegexPatternSetOutput, error) { + req, out := c.GetRegexPatternSetRequest(input) + return out, req.Send() +} + +// GetRegexPatternSetWithContext is the same as GetRegexPatternSet with the addition of +// the ability to pass a context and additional request options. +// +// See GetRegexPatternSet for details on how to use this API operation. +// +// 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 *WAFRegional) GetRegexPatternSetWithContext(ctx aws.Context, input *waf.GetRegexPatternSetInput, opts ...request.Option) (*waf.GetRegexPatternSetOutput, error) { + req, out := c.GetRegexPatternSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetRule = "GetRule" // GetRuleRequest generates a "aws/request.Request" representing the @@ -3579,7 +4580,7 @@ func (c *WAFRegional) GetWebACLForResourceRequest(input *GetWebACLForResourceInp // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -3784,6 +4785,90 @@ func (c *WAFRegional) ListByteMatchSetsWithContext(ctx aws.Context, input *waf.L return out, req.Send() } +const opListGeoMatchSets = "ListGeoMatchSets" + +// ListGeoMatchSetsRequest generates a "aws/request.Request" representing the +// client's request for the ListGeoMatchSets operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGeoMatchSets for more information on using the ListGeoMatchSets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGeoMatchSetsRequest method. +// req, resp := client.ListGeoMatchSetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListGeoMatchSets +func (c *WAFRegional) ListGeoMatchSetsRequest(input *waf.ListGeoMatchSetsInput) (req *request.Request, output *waf.ListGeoMatchSetsOutput) { + op := &request.Operation{ + Name: opListGeoMatchSets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.ListGeoMatchSetsInput{} + } + + output = &waf.ListGeoMatchSetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGeoMatchSets API operation for AWS WAF Regional. +// +// Returns an array of GeoMatchSetSummary objects in the response. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation ListGeoMatchSets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListGeoMatchSets +func (c *WAFRegional) ListGeoMatchSets(input *waf.ListGeoMatchSetsInput) (*waf.ListGeoMatchSetsOutput, error) { + req, out := c.ListGeoMatchSetsRequest(input) + return out, req.Send() +} + +// ListGeoMatchSetsWithContext is the same as ListGeoMatchSets with the addition of +// the ability to pass a context and additional request options. +// +// See ListGeoMatchSets for details on how to use this API operation. +// +// 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 *WAFRegional) ListGeoMatchSetsWithContext(ctx aws.Context, input *waf.ListGeoMatchSetsInput, opts ...request.Option) (*waf.ListGeoMatchSetsOutput, error) { + req, out := c.ListGeoMatchSetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the @@ -3952,6 +5037,174 @@ func (c *WAFRegional) ListRateBasedRulesWithContext(ctx aws.Context, input *waf. return out, req.Send() } +const opListRegexMatchSets = "ListRegexMatchSets" + +// ListRegexMatchSetsRequest generates a "aws/request.Request" representing the +// client's request for the ListRegexMatchSets operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRegexMatchSets for more information on using the ListRegexMatchSets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRegexMatchSetsRequest method. +// req, resp := client.ListRegexMatchSetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRegexMatchSets +func (c *WAFRegional) ListRegexMatchSetsRequest(input *waf.ListRegexMatchSetsInput) (req *request.Request, output *waf.ListRegexMatchSetsOutput) { + op := &request.Operation{ + Name: opListRegexMatchSets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.ListRegexMatchSetsInput{} + } + + output = &waf.ListRegexMatchSetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRegexMatchSets API operation for AWS WAF Regional. +// +// Returns an array of RegexMatchSetSummary objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation ListRegexMatchSets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRegexMatchSets +func (c *WAFRegional) ListRegexMatchSets(input *waf.ListRegexMatchSetsInput) (*waf.ListRegexMatchSetsOutput, error) { + req, out := c.ListRegexMatchSetsRequest(input) + return out, req.Send() +} + +// ListRegexMatchSetsWithContext is the same as ListRegexMatchSets with the addition of +// the ability to pass a context and additional request options. +// +// See ListRegexMatchSets for details on how to use this API operation. +// +// 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 *WAFRegional) ListRegexMatchSetsWithContext(ctx aws.Context, input *waf.ListRegexMatchSetsInput, opts ...request.Option) (*waf.ListRegexMatchSetsOutput, error) { + req, out := c.ListRegexMatchSetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListRegexPatternSets = "ListRegexPatternSets" + +// ListRegexPatternSetsRequest generates a "aws/request.Request" representing the +// client's request for the ListRegexPatternSets operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRegexPatternSets for more information on using the ListRegexPatternSets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRegexPatternSetsRequest method. +// req, resp := client.ListRegexPatternSetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRegexPatternSets +func (c *WAFRegional) ListRegexPatternSetsRequest(input *waf.ListRegexPatternSetsInput) (req *request.Request, output *waf.ListRegexPatternSetsOutput) { + op := &request.Operation{ + Name: opListRegexPatternSets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.ListRegexPatternSetsInput{} + } + + output = &waf.ListRegexPatternSetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRegexPatternSets API operation for AWS WAF Regional. +// +// Returns an array of RegexPatternSetSummary objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation ListRegexPatternSets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListRegexPatternSets +func (c *WAFRegional) ListRegexPatternSets(input *waf.ListRegexPatternSetsInput) (*waf.ListRegexPatternSetsOutput, error) { + req, out := c.ListRegexPatternSetsRequest(input) + return out, req.Send() +} + +// ListRegexPatternSetsWithContext is the same as ListRegexPatternSets with the addition of +// the ability to pass a context and additional request options. +// +// See ListRegexPatternSets for details on how to use this API operation. +// +// 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 *WAFRegional) ListRegexPatternSetsWithContext(ctx aws.Context, input *waf.ListRegexPatternSetsInput, opts ...request.Option) (*waf.ListRegexPatternSetsOutput, error) { + req, out := c.ListRegexPatternSetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListResourcesForWebACL = "ListResourcesForWebACL" // ListResourcesForWebACLRequest generates a "aws/request.Request" representing the @@ -4599,7 +5852,7 @@ func (c *WAFRegional) UpdateByteMatchSetRequest(input *waf.UpdateByteMatchSetInp // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -4658,6 +5911,204 @@ func (c *WAFRegional) UpdateByteMatchSetWithContext(ctx aws.Context, input *waf. return out, req.Send() } +const opUpdateGeoMatchSet = "UpdateGeoMatchSet" + +// UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGeoMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGeoMatchSet for more information on using the UpdateGeoMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGeoMatchSetRequest method. +// req, resp := client.UpdateGeoMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateGeoMatchSet +func (c *WAFRegional) UpdateGeoMatchSetRequest(input *waf.UpdateGeoMatchSetInput) (req *request.Request, output *waf.UpdateGeoMatchSetOutput) { + op := &request.Operation{ + Name: opUpdateGeoMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.UpdateGeoMatchSetInput{} + } + + output = &waf.UpdateGeoMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGeoMatchSet API operation for AWS WAF Regional. +// +// Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet. For each +// GeoMatchConstraint object, you specify the following values: +// +// * Whether to insert or delete the object from the array. If you want to +// change an GeoMatchConstraint object, you delete the existing object and +// add a new one. +// +// * The Type. The only valid value for Type is Country. +// +// * The Value, which is a two character code for the country to add to the +// GeoMatchConstraint object. Valid codes are listed in GeoMatchConstraint$Value. +// +// To create and configure an GeoMatchSet, perform the following steps: +// +// Submit a CreateGeoMatchSet request. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateGeoMatchSet request. +// +// Submit an UpdateGeoMatchSet request to specify the country that you want +// AWS WAF to watch for. +// +// When you update an GeoMatchSet, you specify the country that you want to +// add and/or the country that you want to delete. If you want to change a country, +// you delete the existing country and add the new one. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation UpdateGeoMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add an IP address to an IPSet, but the IP address already +// exists in the specified IPSet. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// +// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" +// The operation failed because you tried to add an object to or delete an object +// from another object that doesn't exist. For example: +// +// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't +// exist. +// +// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule +// that doesn't exist. +// +// * You tried to add an IP address to or delete an IP address from an IPSet +// that doesn't exist. +// +// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from +// a ByteMatchSet that doesn't exist. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFReferencedItemException "WAFReferencedItemException" +// The operation failed because you tried to delete an object that is still +// in use. For example: +// +// * You tried to delete a ByteMatchSet that is still referenced by a Rule. +// +// * You tried to delete a Rule that is still referenced by a WebACL. +// +// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateGeoMatchSet +func (c *WAFRegional) UpdateGeoMatchSet(input *waf.UpdateGeoMatchSetInput) (*waf.UpdateGeoMatchSetOutput, error) { + req, out := c.UpdateGeoMatchSetRequest(input) + return out, req.Send() +} + +// UpdateGeoMatchSetWithContext is the same as UpdateGeoMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGeoMatchSet for details on how to use this API operation. +// +// 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 *WAFRegional) UpdateGeoMatchSetWithContext(ctx aws.Context, input *waf.UpdateGeoMatchSetInput, opts ...request.Option) (*waf.UpdateGeoMatchSetOutput, error) { + req, out := c.UpdateGeoMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the @@ -4814,7 +6265,7 @@ func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *requ // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -5022,7 +6473,7 @@ func (c *WAFRegional) UpdateRateBasedRuleRequest(input *waf.UpdateRateBasedRuleI // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -5085,6 +6536,342 @@ func (c *WAFRegional) UpdateRateBasedRuleWithContext(ctx aws.Context, input *waf return out, req.Send() } +const opUpdateRegexMatchSet = "UpdateRegexMatchSet" + +// UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRegexMatchSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRegexMatchSet for more information on using the UpdateRegexMatchSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRegexMatchSetRequest method. +// req, resp := client.UpdateRegexMatchSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRegexMatchSet +func (c *WAFRegional) UpdateRegexMatchSetRequest(input *waf.UpdateRegexMatchSetInput) (req *request.Request, output *waf.UpdateRegexMatchSetOutput) { + op := &request.Operation{ + Name: opUpdateRegexMatchSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.UpdateRegexMatchSetInput{} + } + + output = &waf.UpdateRegexMatchSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRegexMatchSet API operation for AWS WAF Regional. +// +// Inserts or deletes RegexMatchSetUpdate objects (filters) in a RegexMatchSet. +// For each RegexMatchSetUpdate object, you specify the following values: +// +// * Whether to insert or delete the object from the array. If you want to +// change a RegexMatchSetUpdate object, you delete the existing object and +// add a new one. +// +// * The part of a web request that you want AWS WAF to inspect, such as +// a query string or the value of the User-Agent header. +// +// * The identifier of the pattern (a regular expression) that you want AWS +// WAF to look for. For more information, see RegexPatternSet. +// +// * Whether to perform any conversions on the request, such as converting +// it to lowercase, before inspecting it for the specified string. +// +// For example, you can create a RegexPatternSet that matches any requests with +// User-Agent headers that contain the string B[a@]dB[o0]t. You can then configure +// AWS WAF to reject those requests. +// +// To create and configure a RegexMatchSet, perform the following steps: +// +// Create a RegexMatchSet. For more information, see CreateRegexMatchSet. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateRegexMatchSet request. +// +// Submit an UpdateRegexMatchSet request to specify the part of the request +// that you want AWS WAF to inspect (for example, the header or the URI) and +// the identifier of the RegexPatternSet that contain the regular expression +// patters you want AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation UpdateRegexMatchSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFDisallowedNameException "WAFDisallowedNameException" +// The name specified is invalid. +// +// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" +// The operation failed because you tried to add an object to or delete an object +// from another object that doesn't exist. For example: +// +// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't +// exist. +// +// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule +// that doesn't exist. +// +// * You tried to add an IP address to or delete an IP address from an IPSet +// that doesn't exist. +// +// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from +// a ByteMatchSet that doesn't exist. +// +// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add an IP address to an IPSet, but the IP address already +// exists in the specified IPSet. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRegexMatchSet +func (c *WAFRegional) UpdateRegexMatchSet(input *waf.UpdateRegexMatchSetInput) (*waf.UpdateRegexMatchSetOutput, error) { + req, out := c.UpdateRegexMatchSetRequest(input) + return out, req.Send() +} + +// UpdateRegexMatchSetWithContext is the same as UpdateRegexMatchSet with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRegexMatchSet for details on how to use this API operation. +// +// 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 *WAFRegional) UpdateRegexMatchSetWithContext(ctx aws.Context, input *waf.UpdateRegexMatchSetInput, opts ...request.Option) (*waf.UpdateRegexMatchSetOutput, error) { + req, out := c.UpdateRegexMatchSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRegexPatternSet = "UpdateRegexPatternSet" + +// UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRegexPatternSet operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRegexPatternSet for more information on using the UpdateRegexPatternSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRegexPatternSetRequest method. +// req, resp := client.UpdateRegexPatternSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRegexPatternSet +func (c *WAFRegional) UpdateRegexPatternSetRequest(input *waf.UpdateRegexPatternSetInput) (req *request.Request, output *waf.UpdateRegexPatternSetOutput) { + op := &request.Operation{ + Name: opUpdateRegexPatternSet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.UpdateRegexPatternSetInput{} + } + + output = &waf.UpdateRegexPatternSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRegexPatternSet API operation for AWS WAF Regional. +// +// Inserts or deletes RegexMatchSetUpdate objects (filters) in a RegexPatternSet. +// For each RegexPatternSet object, you specify the following values: +// +// * Whether to insert or delete the object from the array. If you want to +// change a RegexPatternSet object, you delete the existing object and add +// a new one. +// +// * The regular expression pattern that you want AWS WAF to look for. For +// more information, see RegexPatternSet. +// +// For example, you can create a RegexPatternString such as B[a@]dB[o0]t. AWS +// WAF will match this RegexPatternString to: +// +// * BadBot +// +// * BadB0t +// +// * B@dBot +// +// * B@dB0t +// +// To create and configure a RegexPatternSet, perform the following steps: +// +// Create a RegexPatternSet. For more information, see CreateRegexPatternSet. +// +// Use GetChangeToken to get the change token that you provide in the ChangeToken +// parameter of an UpdateRegexPatternSet request. +// +// Submit an UpdateRegexPatternSet request to specify the regular expression +// pattern that you want AWS WAF to watch for. +// +// For more information about how to use the AWS WAF API to allow or block HTTP +// requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation UpdateRegexPatternSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFLimitsExceededException "WAFLimitsExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// WebACL objects that you can create for an AWS account. For more information, +// see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) +// in the AWS WAF Developer Guide. +// +// * ErrCodeWAFNonexistentContainerException "WAFNonexistentContainerException" +// The operation failed because you tried to add an object to or delete an object +// from another object that doesn't exist. For example: +// +// * You tried to add a Rule to or delete a Rule from a WebACL that doesn't +// exist. +// +// * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule +// that doesn't exist. +// +// * You tried to add an IP address to or delete an IP address from an IPSet +// that doesn't exist. +// +// * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from +// a ByteMatchSet that doesn't exist. +// +// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add an IP address to an IPSet, but the IP address already +// exists in the specified IPSet. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// +// * ErrCodeWAFInvalidAccountException "WAFInvalidAccountException" +// The operation failed because you tried to create, update, or delete an object +// by using an invalid account identifier. +// +// * ErrCodeWAFInvalidRegexPatternException "WAFInvalidRegexPatternException" +// The regular expression (regex) you specified in RegexPatternString is invalid. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/UpdateRegexPatternSet +func (c *WAFRegional) UpdateRegexPatternSet(input *waf.UpdateRegexPatternSetInput) (*waf.UpdateRegexPatternSetOutput, error) { + req, out := c.UpdateRegexPatternSetRequest(input) + return out, req.Send() +} + +// UpdateRegexPatternSetWithContext is the same as UpdateRegexPatternSet with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRegexPatternSet for details on how to use this API operation. +// +// 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 *WAFRegional) UpdateRegexPatternSetWithContext(ctx aws.Context, input *waf.UpdateRegexPatternSetInput, opts ...request.Option) (*waf.UpdateRegexPatternSetOutput, error) { + req, out := c.UpdateRegexPatternSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateRule = "UpdateRule" // UpdateRuleRequest generates a "aws/request.Request" representing the @@ -5225,7 +7012,7 @@ func (c *WAFRegional) UpdateRuleRequest(input *waf.UpdateRuleInput) (req *reques // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -5434,7 +7221,7 @@ func (c *WAFRegional) UpdateSizeConstraintSetRequest(input *waf.UpdateSizeConstr // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -5632,7 +7419,7 @@ func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInje // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -5846,7 +7633,7 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -6044,7 +7831,7 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than -// HEADER, QUERY_STRING, or URI. +// HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -6410,6 +8197,760 @@ const ( ComparisonOperatorGt = "GT" ) +const ( + // GeoMatchConstraintTypeCountry is a GeoMatchConstraintType enum value + GeoMatchConstraintTypeCountry = "Country" +) + +const ( + // GeoMatchConstraintValueAf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAf = "AF" + + // GeoMatchConstraintValueAx is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAx = "AX" + + // GeoMatchConstraintValueAl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAl = "AL" + + // GeoMatchConstraintValueDz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDz = "DZ" + + // GeoMatchConstraintValueAs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAs = "AS" + + // GeoMatchConstraintValueAd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAd = "AD" + + // GeoMatchConstraintValueAo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAo = "AO" + + // GeoMatchConstraintValueAi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAi = "AI" + + // GeoMatchConstraintValueAq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAq = "AQ" + + // GeoMatchConstraintValueAg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAg = "AG" + + // GeoMatchConstraintValueAr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAr = "AR" + + // GeoMatchConstraintValueAm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAm = "AM" + + // GeoMatchConstraintValueAw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAw = "AW" + + // GeoMatchConstraintValueAu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAu = "AU" + + // GeoMatchConstraintValueAt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAt = "AT" + + // GeoMatchConstraintValueAz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAz = "AZ" + + // GeoMatchConstraintValueBs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBs = "BS" + + // GeoMatchConstraintValueBh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBh = "BH" + + // GeoMatchConstraintValueBd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBd = "BD" + + // GeoMatchConstraintValueBb is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBb = "BB" + + // GeoMatchConstraintValueBy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBy = "BY" + + // GeoMatchConstraintValueBe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBe = "BE" + + // GeoMatchConstraintValueBz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBz = "BZ" + + // GeoMatchConstraintValueBj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBj = "BJ" + + // GeoMatchConstraintValueBm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBm = "BM" + + // GeoMatchConstraintValueBt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBt = "BT" + + // GeoMatchConstraintValueBo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBo = "BO" + + // GeoMatchConstraintValueBq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBq = "BQ" + + // GeoMatchConstraintValueBa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBa = "BA" + + // GeoMatchConstraintValueBw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBw = "BW" + + // GeoMatchConstraintValueBv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBv = "BV" + + // GeoMatchConstraintValueBr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBr = "BR" + + // GeoMatchConstraintValueIo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIo = "IO" + + // GeoMatchConstraintValueBn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBn = "BN" + + // GeoMatchConstraintValueBg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBg = "BG" + + // GeoMatchConstraintValueBf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBf = "BF" + + // GeoMatchConstraintValueBi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBi = "BI" + + // GeoMatchConstraintValueKh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKh = "KH" + + // GeoMatchConstraintValueCm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCm = "CM" + + // GeoMatchConstraintValueCa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCa = "CA" + + // GeoMatchConstraintValueCv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCv = "CV" + + // GeoMatchConstraintValueKy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKy = "KY" + + // GeoMatchConstraintValueCf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCf = "CF" + + // GeoMatchConstraintValueTd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTd = "TD" + + // GeoMatchConstraintValueCl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCl = "CL" + + // GeoMatchConstraintValueCn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCn = "CN" + + // GeoMatchConstraintValueCx is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCx = "CX" + + // GeoMatchConstraintValueCc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCc = "CC" + + // GeoMatchConstraintValueCo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCo = "CO" + + // GeoMatchConstraintValueKm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKm = "KM" + + // GeoMatchConstraintValueCg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCg = "CG" + + // GeoMatchConstraintValueCd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCd = "CD" + + // GeoMatchConstraintValueCk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCk = "CK" + + // GeoMatchConstraintValueCr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCr = "CR" + + // GeoMatchConstraintValueCi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCi = "CI" + + // GeoMatchConstraintValueHr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHr = "HR" + + // GeoMatchConstraintValueCu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCu = "CU" + + // GeoMatchConstraintValueCw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCw = "CW" + + // GeoMatchConstraintValueCy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCy = "CY" + + // GeoMatchConstraintValueCz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCz = "CZ" + + // GeoMatchConstraintValueDk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDk = "DK" + + // GeoMatchConstraintValueDj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDj = "DJ" + + // GeoMatchConstraintValueDm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDm = "DM" + + // GeoMatchConstraintValueDo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDo = "DO" + + // GeoMatchConstraintValueEc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEc = "EC" + + // GeoMatchConstraintValueEg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEg = "EG" + + // GeoMatchConstraintValueSv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSv = "SV" + + // GeoMatchConstraintValueGq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGq = "GQ" + + // GeoMatchConstraintValueEr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEr = "ER" + + // GeoMatchConstraintValueEe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEe = "EE" + + // GeoMatchConstraintValueEt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEt = "ET" + + // GeoMatchConstraintValueFk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFk = "FK" + + // GeoMatchConstraintValueFo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFo = "FO" + + // GeoMatchConstraintValueFj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFj = "FJ" + + // GeoMatchConstraintValueFi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFi = "FI" + + // GeoMatchConstraintValueFr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFr = "FR" + + // GeoMatchConstraintValueGf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGf = "GF" + + // GeoMatchConstraintValuePf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePf = "PF" + + // GeoMatchConstraintValueTf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTf = "TF" + + // GeoMatchConstraintValueGa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGa = "GA" + + // GeoMatchConstraintValueGm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGm = "GM" + + // GeoMatchConstraintValueGe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGe = "GE" + + // GeoMatchConstraintValueDe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueDe = "DE" + + // GeoMatchConstraintValueGh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGh = "GH" + + // GeoMatchConstraintValueGi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGi = "GI" + + // GeoMatchConstraintValueGr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGr = "GR" + + // GeoMatchConstraintValueGl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGl = "GL" + + // GeoMatchConstraintValueGd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGd = "GD" + + // GeoMatchConstraintValueGp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGp = "GP" + + // GeoMatchConstraintValueGu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGu = "GU" + + // GeoMatchConstraintValueGt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGt = "GT" + + // GeoMatchConstraintValueGg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGg = "GG" + + // GeoMatchConstraintValueGn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGn = "GN" + + // GeoMatchConstraintValueGw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGw = "GW" + + // GeoMatchConstraintValueGy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGy = "GY" + + // GeoMatchConstraintValueHt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHt = "HT" + + // GeoMatchConstraintValueHm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHm = "HM" + + // GeoMatchConstraintValueVa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVa = "VA" + + // GeoMatchConstraintValueHn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHn = "HN" + + // GeoMatchConstraintValueHk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHk = "HK" + + // GeoMatchConstraintValueHu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueHu = "HU" + + // GeoMatchConstraintValueIs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIs = "IS" + + // GeoMatchConstraintValueIn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIn = "IN" + + // GeoMatchConstraintValueId is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueId = "ID" + + // GeoMatchConstraintValueIr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIr = "IR" + + // GeoMatchConstraintValueIq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIq = "IQ" + + // GeoMatchConstraintValueIe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIe = "IE" + + // GeoMatchConstraintValueIm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIm = "IM" + + // GeoMatchConstraintValueIl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIl = "IL" + + // GeoMatchConstraintValueIt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueIt = "IT" + + // GeoMatchConstraintValueJm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueJm = "JM" + + // GeoMatchConstraintValueJp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueJp = "JP" + + // GeoMatchConstraintValueJe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueJe = "JE" + + // GeoMatchConstraintValueJo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueJo = "JO" + + // GeoMatchConstraintValueKz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKz = "KZ" + + // GeoMatchConstraintValueKe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKe = "KE" + + // GeoMatchConstraintValueKi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKi = "KI" + + // GeoMatchConstraintValueKp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKp = "KP" + + // GeoMatchConstraintValueKr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKr = "KR" + + // GeoMatchConstraintValueKw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKw = "KW" + + // GeoMatchConstraintValueKg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKg = "KG" + + // GeoMatchConstraintValueLa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLa = "LA" + + // GeoMatchConstraintValueLv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLv = "LV" + + // GeoMatchConstraintValueLb is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLb = "LB" + + // GeoMatchConstraintValueLs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLs = "LS" + + // GeoMatchConstraintValueLr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLr = "LR" + + // GeoMatchConstraintValueLy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLy = "LY" + + // GeoMatchConstraintValueLi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLi = "LI" + + // GeoMatchConstraintValueLt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLt = "LT" + + // GeoMatchConstraintValueLu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLu = "LU" + + // GeoMatchConstraintValueMo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMo = "MO" + + // GeoMatchConstraintValueMk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMk = "MK" + + // GeoMatchConstraintValueMg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMg = "MG" + + // GeoMatchConstraintValueMw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMw = "MW" + + // GeoMatchConstraintValueMy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMy = "MY" + + // GeoMatchConstraintValueMv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMv = "MV" + + // GeoMatchConstraintValueMl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMl = "ML" + + // GeoMatchConstraintValueMt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMt = "MT" + + // GeoMatchConstraintValueMh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMh = "MH" + + // GeoMatchConstraintValueMq is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMq = "MQ" + + // GeoMatchConstraintValueMr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMr = "MR" + + // GeoMatchConstraintValueMu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMu = "MU" + + // GeoMatchConstraintValueYt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueYt = "YT" + + // GeoMatchConstraintValueMx is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMx = "MX" + + // GeoMatchConstraintValueFm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueFm = "FM" + + // GeoMatchConstraintValueMd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMd = "MD" + + // GeoMatchConstraintValueMc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMc = "MC" + + // GeoMatchConstraintValueMn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMn = "MN" + + // GeoMatchConstraintValueMe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMe = "ME" + + // GeoMatchConstraintValueMs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMs = "MS" + + // GeoMatchConstraintValueMa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMa = "MA" + + // GeoMatchConstraintValueMz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMz = "MZ" + + // GeoMatchConstraintValueMm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMm = "MM" + + // GeoMatchConstraintValueNa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNa = "NA" + + // GeoMatchConstraintValueNr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNr = "NR" + + // GeoMatchConstraintValueNp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNp = "NP" + + // GeoMatchConstraintValueNl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNl = "NL" + + // GeoMatchConstraintValueNc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNc = "NC" + + // GeoMatchConstraintValueNz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNz = "NZ" + + // GeoMatchConstraintValueNi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNi = "NI" + + // GeoMatchConstraintValueNe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNe = "NE" + + // GeoMatchConstraintValueNg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNg = "NG" + + // GeoMatchConstraintValueNu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNu = "NU" + + // GeoMatchConstraintValueNf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNf = "NF" + + // GeoMatchConstraintValueMp is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMp = "MP" + + // GeoMatchConstraintValueNo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueNo = "NO" + + // GeoMatchConstraintValueOm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueOm = "OM" + + // GeoMatchConstraintValuePk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePk = "PK" + + // GeoMatchConstraintValuePw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePw = "PW" + + // GeoMatchConstraintValuePs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePs = "PS" + + // GeoMatchConstraintValuePa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePa = "PA" + + // GeoMatchConstraintValuePg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePg = "PG" + + // GeoMatchConstraintValuePy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePy = "PY" + + // GeoMatchConstraintValuePe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePe = "PE" + + // GeoMatchConstraintValuePh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePh = "PH" + + // GeoMatchConstraintValuePn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePn = "PN" + + // GeoMatchConstraintValuePl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePl = "PL" + + // GeoMatchConstraintValuePt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePt = "PT" + + // GeoMatchConstraintValuePr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePr = "PR" + + // GeoMatchConstraintValueQa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueQa = "QA" + + // GeoMatchConstraintValueRe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRe = "RE" + + // GeoMatchConstraintValueRo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRo = "RO" + + // GeoMatchConstraintValueRu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRu = "RU" + + // GeoMatchConstraintValueRw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRw = "RW" + + // GeoMatchConstraintValueBl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueBl = "BL" + + // GeoMatchConstraintValueSh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSh = "SH" + + // GeoMatchConstraintValueKn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueKn = "KN" + + // GeoMatchConstraintValueLc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLc = "LC" + + // GeoMatchConstraintValueMf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueMf = "MF" + + // GeoMatchConstraintValuePm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValuePm = "PM" + + // GeoMatchConstraintValueVc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVc = "VC" + + // GeoMatchConstraintValueWs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueWs = "WS" + + // GeoMatchConstraintValueSm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSm = "SM" + + // GeoMatchConstraintValueSt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSt = "ST" + + // GeoMatchConstraintValueSa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSa = "SA" + + // GeoMatchConstraintValueSn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSn = "SN" + + // GeoMatchConstraintValueRs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueRs = "RS" + + // GeoMatchConstraintValueSc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSc = "SC" + + // GeoMatchConstraintValueSl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSl = "SL" + + // GeoMatchConstraintValueSg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSg = "SG" + + // GeoMatchConstraintValueSx is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSx = "SX" + + // GeoMatchConstraintValueSk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSk = "SK" + + // GeoMatchConstraintValueSi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSi = "SI" + + // GeoMatchConstraintValueSb is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSb = "SB" + + // GeoMatchConstraintValueSo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSo = "SO" + + // GeoMatchConstraintValueZa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueZa = "ZA" + + // GeoMatchConstraintValueGs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGs = "GS" + + // GeoMatchConstraintValueSs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSs = "SS" + + // GeoMatchConstraintValueEs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEs = "ES" + + // GeoMatchConstraintValueLk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueLk = "LK" + + // GeoMatchConstraintValueSd is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSd = "SD" + + // GeoMatchConstraintValueSr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSr = "SR" + + // GeoMatchConstraintValueSj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSj = "SJ" + + // GeoMatchConstraintValueSz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSz = "SZ" + + // GeoMatchConstraintValueSe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSe = "SE" + + // GeoMatchConstraintValueCh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueCh = "CH" + + // GeoMatchConstraintValueSy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueSy = "SY" + + // GeoMatchConstraintValueTw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTw = "TW" + + // GeoMatchConstraintValueTj is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTj = "TJ" + + // GeoMatchConstraintValueTz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTz = "TZ" + + // GeoMatchConstraintValueTh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTh = "TH" + + // GeoMatchConstraintValueTl is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTl = "TL" + + // GeoMatchConstraintValueTg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTg = "TG" + + // GeoMatchConstraintValueTk is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTk = "TK" + + // GeoMatchConstraintValueTo is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTo = "TO" + + // GeoMatchConstraintValueTt is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTt = "TT" + + // GeoMatchConstraintValueTn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTn = "TN" + + // GeoMatchConstraintValueTr is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTr = "TR" + + // GeoMatchConstraintValueTm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTm = "TM" + + // GeoMatchConstraintValueTc is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTc = "TC" + + // GeoMatchConstraintValueTv is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueTv = "TV" + + // GeoMatchConstraintValueUg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUg = "UG" + + // GeoMatchConstraintValueUa is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUa = "UA" + + // GeoMatchConstraintValueAe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueAe = "AE" + + // GeoMatchConstraintValueGb is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueGb = "GB" + + // GeoMatchConstraintValueUs is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUs = "US" + + // GeoMatchConstraintValueUm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUm = "UM" + + // GeoMatchConstraintValueUy is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUy = "UY" + + // GeoMatchConstraintValueUz is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueUz = "UZ" + + // GeoMatchConstraintValueVu is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVu = "VU" + + // GeoMatchConstraintValueVe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVe = "VE" + + // GeoMatchConstraintValueVn is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVn = "VN" + + // GeoMatchConstraintValueVg is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVg = "VG" + + // GeoMatchConstraintValueVi is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueVi = "VI" + + // GeoMatchConstraintValueWf is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueWf = "WF" + + // GeoMatchConstraintValueEh is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueEh = "EH" + + // GeoMatchConstraintValueYe is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueYe = "YE" + + // GeoMatchConstraintValueZm is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueZm = "ZM" + + // GeoMatchConstraintValueZw is a GeoMatchConstraintValue enum value + GeoMatchConstraintValueZw = "ZW" +) + const ( // IPSetDescriptorTypeIpv4 is a IPSetDescriptorType enum value IPSetDescriptorTypeIpv4 = "IPV4" @@ -6463,6 +9004,12 @@ const ( // ParameterExceptionFieldSizeConstraintComparisonOperator is a ParameterExceptionField enum value ParameterExceptionFieldSizeConstraintComparisonOperator = "SIZE_CONSTRAINT_COMPARISON_OPERATOR" + // ParameterExceptionFieldGeoMatchLocationType is a ParameterExceptionField enum value + ParameterExceptionFieldGeoMatchLocationType = "GEO_MATCH_LOCATION_TYPE" + + // ParameterExceptionFieldGeoMatchLocationValue is a ParameterExceptionField enum value + ParameterExceptionFieldGeoMatchLocationValue = "GEO_MATCH_LOCATION_VALUE" + // ParameterExceptionFieldRateKey is a ParameterExceptionField enum value ParameterExceptionFieldRateKey = "RATE_KEY" @@ -6508,11 +9055,17 @@ const ( // PredicateTypeSqlInjectionMatch is a PredicateType enum value PredicateTypeSqlInjectionMatch = "SqlInjectionMatch" + // PredicateTypeGeoMatch is a PredicateType enum value + PredicateTypeGeoMatch = "GeoMatch" + // PredicateTypeSizeConstraint is a PredicateType enum value PredicateTypeSizeConstraint = "SizeConstraint" // PredicateTypeXssMatch is a PredicateType enum value PredicateTypeXssMatch = "XssMatch" + + // PredicateTypeRegexMatch is a PredicateType enum value + PredicateTypeRegexMatch = "RegexMatch" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go index 454fdefac..8431ff1d5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go @@ -20,7 +20,7 @@ // // Using the Client // -// To AWS WAF Regional with the SDK use the New function to create +// To contact AWS WAF Regional with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go index 11577d5b9..fad8a7766 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go @@ -71,7 +71,7 @@ const ( // BLOCK, or COUNT. // // * You tried to update a ByteMatchSet with a FieldToMatchType other than - // HEADER, QUERY_STRING, or URI. + // HEADER, METHOD, QUERY_STRING, URI, or BODY. // // * You tried to update a ByteMatchSet with a Field of HEADER but no value // for Data. @@ -80,6 +80,12 @@ const ( // a resource with which a web ACL cannot be associated. ErrCodeWAFInvalidParameterException = "WAFInvalidParameterException" + // ErrCodeWAFInvalidRegexPatternException for service response error code + // "WAFInvalidRegexPatternException". + // + // The regular expression (regex) you specified in RegexPatternString is invalid. + ErrCodeWAFInvalidRegexPatternException = "WAFInvalidRegexPatternException" + // ErrCodeWAFLimitsExceededException for service response error code // "WAFLimitsExceededException". // diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/arn.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/arn.go new file mode 100644 index 000000000..de72a23eb --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/arn.go @@ -0,0 +1,26 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/iam" +) + +func arnString(partition, region, service, accountId, resource string) string { + return arn.ARN{ + Partition: partition, + Region: region, + Service: service, + AccountID: accountId, + Resource: resource, + }.String() +} + +// See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam +func iamArnString(partition, accountId, resource string) string { + return arnString( + partition, + "", + iam.ServiceName, + accountId, + resource) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/auth_helpers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/auth_helpers.go index 89e17693a..ca183ff1d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/auth_helpers.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/auth_helpers.go @@ -13,6 +13,7 @@ import ( awsCredentials "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" + "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/iam" @@ -108,7 +109,7 @@ func parseAccountInfoFromArn(arn string) (string, string, error) { // environment in the case that they're not explicitly specified // in the Terraform configuration. func GetCredentials(c *Config) (*awsCredentials.Credentials, error) { - // build a chain provider, lazy-evaulated by aws-sdk + // build a chain provider, lazy-evaluated by aws-sdk providers := []awsCredentials.Provider{ &awsCredentials.StaticProvider{Value: awsCredentials.Value{ AccessKeyID: c.AccessKey, @@ -149,6 +150,12 @@ func GetCredentials(c *Config) (*awsCredentials.Credentials, error) { } usedEndpoint := setOptionalEndpoint(cfg) + // Add the default AWS provider for ECS Task Roles if the relevant env variable is set + if uri := os.Getenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"); len(uri) > 0 { + providers = append(providers, defaults.RemoteCredProvider(*cfg, defaults.Handlers())) + log.Print("[INFO] ECS container credentials detected, RemoteCredProvider added to auth chain") + } + if !c.SkipMetadataApiCheck { // Real AWS should reply to a simple metadata request. // We check it actually does to ensure something else didn't just diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go index b0ca74009..fb12edd6a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go @@ -31,3 +31,24 @@ func retryOnAwsCode(code string, f func() (interface{}, error)) (interface{}, er }) return resp, err } + +func retryOnAwsCodes(codes []string, f func() (interface{}, error)) (interface{}, error) { + var resp interface{} + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = f() + if err != nil { + awsErr, ok := err.(awserr.Error) + if ok { + for _, code := range codes { + if awsErr.Code() == code { + return resource.RetryableError(err) + } + } + } + return resource.NonRetryableError(err) + } + return nil + }) + return resp, err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go index a47217647..64c440247 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go @@ -1096,8 +1096,12 @@ func viewerCertificateHash(v interface{}) int { } else { buf.WriteString(fmt.Sprintf("%t-", m["cloudfront_default_certificate"].(bool))) } - if v, ok := m["minimum_protocol_version"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) + // if minimum_protocol_version is not specified and we use cloudfront_default_certificate, + // ignore current value of minimum_protocol_version + if c, ok := m["cloudfront_default_certificate"]; !(ok && c.(bool)) { + if v, ok := m["minimum_protocol_version"]; ok && v.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } } return hashcode.String(buf.String()) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go index 757b1704e..c9d1b996c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go @@ -17,7 +17,9 @@ import ( "github.com/aws/aws-sdk-go/service/acm" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/applicationautoscaling" + "github.com/aws/aws-sdk-go/service/athena" "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/aws/aws-sdk-go/service/batch" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudfront" "github.com/aws/aws-sdk-go/service/cloudtrail" @@ -32,6 +34,7 @@ import ( "github.com/aws/aws-sdk-go/service/configservice" "github.com/aws/aws-sdk-go/service/databasemigrationservice" "github.com/aws/aws-sdk-go/service/devicefarm" + "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -59,6 +62,7 @@ import ( "github.com/aws/aws-sdk-go/service/redshift" "github.com/aws/aws-sdk-go/service/route53" "github.com/aws/aws-sdk-go/service/s3" + "github.com/aws/aws-sdk-go/service/servicecatalog" "github.com/aws/aws-sdk-go/service/ses" "github.com/aws/aws-sdk-go/service/sfn" "github.com/aws/aws-sdk-go/service/simpledb" @@ -143,6 +147,7 @@ type AWSClient struct { appautoscalingconn *applicationautoscaling.ApplicationAutoScaling autoscalingconn *autoscaling.AutoScaling s3conn *s3.S3 + scconn *servicecatalog.ServiceCatalog sesConn *ses.SES simpledbconn *simpledb.SimpleDB sqsconn *sqs.SQS @@ -176,6 +181,9 @@ type AWSClient struct { wafconn *waf.WAF wafregionalconn *wafregional.WAFRegional iotconn *iot.IoT + batchconn *batch.Batch + athenaconn *athena.Athena + dxconn *directconnect.DirectConnect } func (c *AWSClient) S3() *s3.S3 { @@ -224,44 +232,63 @@ func (c *Config) Client() (interface{}, error) { if err != nil { return nil, err } + + // define the AWS Session options + // Credentials or Profile will be set in the Options below + // MaxRetries may be set once we validate credentials + var opt = session.Options{ + Config: aws.Config{ + Region: aws.String(c.Region), + MaxRetries: aws.Int(0), + HTTPClient: cleanhttp.DefaultClient(), + S3ForcePathStyle: aws.Bool(c.S3ForcePathStyle), + }, + } + // Call Get to check for credential provider. If nothing found, we'll get an // error, and we can present it nicely to the user cp, err := creds.Get() + if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoCredentialProviders" { + // If a profile wasn't specified then error out + if c.Profile == "" { + return nil, errors.New(`No valid credential sources found for AWS Provider. + Please see https://terraform.io/docs/providers/aws/index.html for more information on + providing credentials for the AWS Provider`) + } + // add the profile and enable share config file usage + log.Printf("[INFO] AWS Auth using Profile: %q", c.Profile) + opt.Profile = c.Profile + opt.SharedConfigState = session.SharedConfigEnable + } else { + return nil, fmt.Errorf("Error loading credentials for AWS Provider: %s", err) + } + } else { + // add the validated credentials to the session options + log.Printf("[INFO] AWS Auth provider used: %q", cp.ProviderName) + opt.Config.Credentials = creds + } + + if logging.IsDebugOrHigher() { + opt.Config.LogLevel = aws.LogLevel(aws.LogDebugWithHTTPBody | aws.LogDebugWithRequestRetries | aws.LogDebugWithRequestErrors) + opt.Config.Logger = awsLogger{} + } + + if c.Insecure { + transport := opt.Config.HTTPClient.Transport.(*http.Transport) + transport.TLSClientConfig = &tls.Config{ + InsecureSkipVerify: true, + } + } + + // create base session with no retries. MaxRetries will be set later + sess, err := session.NewSessionWithOptions(opt) if err != nil { if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoCredentialProviders" { return nil, errors.New(`No valid credential sources found for AWS Provider. Please see https://terraform.io/docs/providers/aws/index.html for more information on providing credentials for the AWS Provider`) } - - return nil, fmt.Errorf("Error loading credentials for AWS Provider: %s", err) - } - - log.Printf("[INFO] AWS Auth provider used: %q", cp.ProviderName) - - awsConfig := &aws.Config{ - Credentials: creds, - Region: aws.String(c.Region), - MaxRetries: aws.Int(c.MaxRetries), - HTTPClient: cleanhttp.DefaultClient(), - S3ForcePathStyle: aws.Bool(c.S3ForcePathStyle), - } - - if logging.IsDebugOrHigher() { - awsConfig.LogLevel = aws.LogLevel(aws.LogDebugWithHTTPBody | aws.LogDebugWithRequestRetries | aws.LogDebugWithRequestErrors) - awsConfig.Logger = awsLogger{} - } - - if c.Insecure { - transport := awsConfig.HTTPClient.Transport.(*http.Transport) - transport.TLSClientConfig = &tls.Config{ - InsecureSkipVerify: true, - } - } - - // Set up base session - sess, err := session.NewSession(awsConfig) - if err != nil { return nil, errwrap.Wrapf("Error creating AWS session: {{err}}", err) } @@ -271,6 +298,11 @@ func (c *Config) Client() (interface{}, error) { sess.Handlers.UnmarshalError.PushFrontNamed(debugAuthFailure) } + // if the desired number of retries is non-zero, update the session + if c.MaxRetries > 0 { + sess = sess.Copy(&aws.Config{MaxRetries: aws.Int(c.MaxRetries)}) + } + // This restriction should only be used for Route53 sessions. // Other resources that have restrictions should allow the API to fail, rather // than Terraform abstracting the region for the user. This can lead to breaking @@ -377,6 +409,7 @@ func (c *Config) Client() (interface{}, error) { client.redshiftconn = redshift.New(sess) client.simpledbconn = simpledb.New(sess) client.s3conn = s3.New(awsS3Sess) + client.scconn = servicecatalog.New(sess) client.sesConn = ses.New(sess) client.sfnconn = sfn.New(sess) client.snsconn = sns.New(awsSnsSess) @@ -384,6 +417,9 @@ func (c *Config) Client() (interface{}, error) { client.ssmconn = ssm.New(sess) client.wafconn = waf.New(sess) client.wafregionalconn = wafregional.New(sess) + client.batchconn = batch.New(sess) + client.athenaconn = athena.New(sess) + client.dxconn = directconnect.New(sess) // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go index 3439adaef..be9ba72b0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go @@ -106,6 +106,10 @@ func dataSourceAwsAmi() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "root_snapshot_id": { + Type: schema.TypeString, + Computed: true, + }, "sriov_net_support": { Type: schema.TypeString, Computed: true, @@ -165,7 +169,7 @@ func dataSourceAwsAmi() *schema.Resource { Type: schema.TypeMap, Computed: true, }, - "tags": dataSourceTagsSchema(), + "tags": tagsSchemaComputed(), }, } } @@ -284,6 +288,7 @@ func amiDescriptionAttributes(d *schema.ResourceData, image *ec2.Image) error { d.Set("root_device_name", image.RootDeviceName) } d.Set("root_device_type", image.RootDeviceType) + d.Set("root_snapshot_id", amiRootSnapshotId(image)) if image.SriovNetSupport != nil { d.Set("sriov_net_support", image.SriovNetSupport) } @@ -299,7 +304,7 @@ func amiDescriptionAttributes(d *schema.ResourceData, image *ec2.Image) error { if err := d.Set("state_reason", amiStateReason(image.StateReason)); err != nil { return err } - if err := d.Set("tags", dataSourceTags(image.Tags)); err != nil { + if err := d.Set("tags", tagsToMap(image.Tags)); err != nil { return err } return nil @@ -358,6 +363,22 @@ func amiProductCodes(m []*ec2.ProductCode) *schema.Set { return s } +// Returns the root snapshot ID for an image, if it has one +func amiRootSnapshotId(image *ec2.Image) string { + if image.RootDeviceName == nil { + return "" + } + for _, bdm := range image.BlockDeviceMappings { + if bdm.DeviceName == nil || *bdm.DeviceName != *image.RootDeviceName { + continue + } + if bdm.Ebs != nil && bdm.Ebs.SnapshotId != nil { + return *bdm.Ebs.SnapshotId + } + } + return "" +} + // Returns the state reason. func amiStateReason(m *ec2.StateReason) map[string]interface{} { s := make(map[string]interface{}) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go index 20df34ac3..bce1a70a2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go @@ -34,7 +34,6 @@ func dataSourceAwsAmiIds() *schema.Resource { ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, - "tags": dataSourceTagsSchema(), "ids": &schema.Schema{ Type: schema.TypeList, Computed: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go index edab7c926..6fdf34281 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zone.go @@ -79,7 +79,6 @@ func dataSourceAwsAvailabilityZoneRead(d *schema.ResourceData, meta interface{}) nameSuffix := (*az.ZoneName)[len(*az.RegionName):] d.SetId(*az.ZoneName) - d.Set("id", az.ZoneName) d.Set("name", az.ZoneName) d.Set("name_suffix", nameSuffix) d.Set("region", az.RegionName) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go index ba6a0b098..0c8a89e39 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_canonical_user_id.go @@ -14,10 +14,6 @@ func dataSourceAwsCanonicalUserId() *schema.Resource { Read: dataSourceAwsCanonicalUserIdRead, Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, "display_name": { Type: schema.TypeString, Computed: true, @@ -41,7 +37,6 @@ func dataSourceAwsCanonicalUserIdRead(d *schema.ResourceData, meta interface{}) } d.SetId(aws.StringValue(resp.Owner.ID)) - d.Set("id", resp.Owner.ID) d.Set("display_name", resp.Owner.DisplayName) return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go new file mode 100644 index 000000000..e41b6fb3d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go @@ -0,0 +1,57 @@ +package aws + +import ( + "fmt" + + "github.com/hashicorp/terraform/helper/schema" +) + +// See http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html +var cloudTrailServiceAccountPerRegionMap = map[string]string{ + "us-east-1": "086441151436", + "us-east-2": "475085895292", + "us-west-1": "388731089494", + "us-west-2": "113285607260", + "ap-south-1": "977081816279", + "ap-northeast-2": "492519147666", + "ap-southeast-1": "903692715234", + "ap-southeast-2": "284668455005", + "ap-northeast-1": "216624486486", + "ca-central-1": "819402241893", + "eu-central-1": "035351147821", + "eu-west-1": "859597730677", + "eu-west-2": "282025262664", + "sa-east-1": "814480443879", +} + +func dataSourceAwsCloudTrailServiceAccount() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsCloudTrailServiceAccountRead, + + Schema: map[string]*schema.Schema{ + "region": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsCloudTrailServiceAccountRead(d *schema.ResourceData, meta interface{}) error { + region := meta.(*AWSClient).region + if v, ok := d.GetOk("region"); ok { + region = v.(string) + } + + if accid, ok := cloudTrailServiceAccountPerRegionMap[region]; ok { + d.SetId(accid) + d.Set("arn", iamArnString(meta.(*AWSClient).partition, accid, "root")) + return nil + } + + return fmt.Errorf("Unknown region (%q)", region) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_common_schema.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_common_schema.go index 839f8a67b..bd7fb3333 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_common_schema.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_common_schema.go @@ -1,37 +1,11 @@ package aws import ( - "bytes" - "fmt" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" ) -func dataSourceTagsHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["key"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["value"].(string))) - return hashcode.String(buf.String()) -} - -func dataSourceTags(m []*ec2.Tag) *schema.Set { - s := &schema.Set{ - F: dataSourceTagsHash, - } - for _, v := range m { - tag := map[string]interface{}{ - "key": *v.Key, - "value": *v.Value, - } - s.Add(tag) - } - return s -} - func buildAwsDataSourceFilters(set *schema.Set) []*ec2.Filter { var filters []*ec2.Filter for _, v := range set.List() { @@ -69,23 +43,3 @@ func dataSourceFiltersSchema() *schema.Schema { }, } } - -func dataSourceTagsSchema() *schema.Schema { - return &schema.Schema{ - Type: schema.TypeSet, - Computed: true, - Set: dataSourceTagsHash, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "key": { - Type: schema.TypeString, - Computed: true, - }, - "value": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go index 506fa005b..77521a052 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go @@ -232,7 +232,7 @@ func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error d.Set("availability_zone", dbInstance.AvailabilityZone) d.Set("backup_retention_period", dbInstance.BackupRetentionPeriod) d.Set("db_cluster_identifier", dbInstance.DBClusterIdentifier) - d.Set("db_instance_arn", dbInstance.DBClusterIdentifier) + d.Set("db_instance_arn", dbInstance.DBInstanceArn) d.Set("db_instance_class", dbInstance.DBInstanceClass) d.Set("db_name", dbInstance.DBName) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_snapshot.go index a5fad3129..1aa9819eb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_snapshot.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_snapshot.go @@ -196,6 +196,7 @@ func dbSnapshotDescriptionAttributes(d *schema.ResourceData, snapshot *rds.DBSna d.Set("db_instance_identifier", snapshot.DBInstanceIdentifier) d.Set("db_snapshot_identifier", snapshot.DBSnapshotIdentifier) d.Set("snapshot_type", snapshot.SnapshotType) + d.Set("storage_type", snapshot.StorageType) d.Set("allocated_storage", snapshot.AllocatedStorage) d.Set("availability_zone", snapshot.AvailabilityZone) d.Set("db_snapshot_arn", snapshot.DBSnapshotArn) @@ -211,7 +212,9 @@ func dbSnapshotDescriptionAttributes(d *schema.ResourceData, snapshot *rds.DBSna d.Set("source_region", snapshot.SourceRegion) d.Set("status", snapshot.Status) d.Set("vpc_id", snapshot.VpcId) - d.Set("snapshot_create_time", snapshot.SnapshotCreateTime.Format(time.RFC3339)) + if snapshot.SnapshotCreateTime != nil { + d.Set("snapshot_create_time", snapshot.SnapshotCreateTime.Format(time.RFC3339)) + } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dynamodb_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dynamodb_table.go new file mode 100644 index 000000000..998d022eb --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dynamodb_table.go @@ -0,0 +1,195 @@ +package aws + +import ( + "bytes" + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dynamodb" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsDynamoDbTable() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsDynamoDbTableRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "attribute": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + }, + "type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + Set: func(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) + return hashcode.String(buf.String()) + }, + }, + "global_secondary_index": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + }, + "write_capacity": { + Type: schema.TypeInt, + Computed: true, + }, + "read_capacity": { + Type: schema.TypeInt, + Computed: true, + }, + "hash_key": { + Type: schema.TypeString, + Computed: true, + }, + "range_key": { + Type: schema.TypeString, + Computed: true, + }, + "projection_type": { + Type: schema.TypeString, + Computed: true, + }, + "non_key_attributes": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "hash_key": { + Type: schema.TypeString, + Computed: true, + }, + "local_secondary_index": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + }, + "range_key": { + Type: schema.TypeString, + Computed: true, + }, + "projection_type": { + Type: schema.TypeString, + Computed: true, + }, + "non_key_attributes": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + Set: func(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) + return hashcode.String(buf.String()) + }, + }, + "range_key": { + Type: schema.TypeString, + Computed: true, + }, + "read_capacity": { + Type: schema.TypeInt, + Computed: true, + }, + "stream_arn": { + Type: schema.TypeString, + Computed: true, + }, + "stream_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "stream_label": { + Type: schema.TypeString, + Computed: true, + }, + "stream_view_type": { + Type: schema.TypeString, + Computed: true, + StateFunc: func(v interface{}) string { + value := v.(string) + return strings.ToUpper(value) + }, + }, + "tags": tagsSchemaComputed(), + "ttl": { + Type: schema.TypeSet, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "attribute_name": { + Type: schema.TypeString, + Computed: true, + }, + "enabled": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, + "write_capacity": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func dataSourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) error { + dynamodbconn := meta.(*AWSClient).dynamodbconn + + name := d.Get("name").(string) + log.Printf("[DEBUG] Loading data for DynamoDB table %q", name) + req := &dynamodb.DescribeTableInput{ + TableName: aws.String(name), + } + + result, err := dynamodbconn.DescribeTable(req) + + if err != nil { + return errwrap.Wrapf("Error retrieving DynamoDB table: {{err}}", err) + } + + d.SetId(*result.Table.TableName) + + return flattenAwsDynamoDbTableResource(d, meta, result.Table) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go index c0e386643..6d3c95fc2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go @@ -80,7 +80,7 @@ func dataSourceAwsEbsSnapshot() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "tags": dataSourceTagsSchema(), + "tags": tagsSchemaComputed(), }, } } @@ -154,7 +154,7 @@ func snapshotDescriptionAttributes(d *schema.ResourceData, snapshot *ec2.Snapsho d.Set("owner_id", snapshot.OwnerId) d.Set("owner_alias", snapshot.OwnerAlias) - if err := d.Set("tags", dataSourceTags(snapshot.Tags)); err != nil { + if err := d.Set("tags", tagsToMap(snapshot.Tags)); err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go index bd4f2ad8b..17714acb6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go @@ -26,7 +26,6 @@ func dataSourceAwsEbsSnapshotIds() *schema.Resource { ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, - "tags": dataSourceTagsSchema(), "ids": &schema.Schema{ Type: schema.TypeList, Computed: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go index 7794ecf28..325c64bdd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go @@ -54,7 +54,7 @@ func dataSourceAwsEbsVolume() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "tags": dataSourceTagsSchema(), + "tags": tagsSchemaComputed(), }, } } @@ -128,7 +128,7 @@ func volumeDescriptionAttributes(d *schema.ResourceData, volume *ec2.Volume) err d.Set("snapshot_id", volume.SnapshotId) d.Set("volume_type", volume.VolumeType) - if err := d.Set("tags", dataSourceTags(volume.Tags)); err != nil { + if err := d.Set("tags", tagsToMap(volume.Tags)); err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go index 25566df4e..2f91772c0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go @@ -40,6 +40,10 @@ func dataSourceAwsEfsFileSystem() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "dns_name": { + Type: schema.TypeString, + Computed: true, + }, "tags": tagsSchemaComputed(), }, } @@ -119,5 +123,11 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er d.Set("encrypted", fs.Encrypted) d.Set("kms_key_id", fs.KmsKeyId) + region := meta.(*AWSClient).region + err = d.Set("dns_name", resourceAwsEfsDnsName(*fs.FileSystemId, region)) + if err != nil { + return err + } + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go index 0352f48bf..fa6126e57 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go @@ -19,7 +19,6 @@ func dataSourceAwsEip() *schema.Resource { Optional: true, Computed: true, }, - "public_ip": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -34,7 +33,7 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { req := &ec2.DescribeAddressesInput{} - if id := d.Get("id"); id != "" { + if id, ok := d.GetOk("id"); ok { req.AllocationIds = []*string{aws.String(id.(string))} } @@ -57,7 +56,6 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { eip := resp.Addresses[0] d.SetId(*eip.AllocationId) - d.Set("id", eip.AllocationId) d.Set("public_ip", eip.PublicIp) return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go new file mode 100644 index 000000000..02aa41cfe --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go @@ -0,0 +1,111 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/elasticache" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsElasticacheReplicationGroup() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsElasticacheReplicationGroupRead, + Schema: map[string]*schema.Schema{ + "replication_group_id": { + Type: schema.TypeString, + Required: true, + }, + "replication_group_description": { + Type: schema.TypeString, + Computed: true, + }, + "auth_token_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "automatic_failover_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "configuration_endpoint_address": { + Type: schema.TypeString, + Computed: true, + }, + "primary_endpoint_address": { + Type: schema.TypeString, + Computed: true, + }, + "number_cache_clusters": { + Type: schema.TypeInt, + Computed: true, + }, + "node_type": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_window": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_retention_limit": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func dataSourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).elasticacheconn + input := &elasticache.DescribeReplicationGroupsInput{ + ReplicationGroupId: aws.String(d.Get("replication_group_id").(string)), + } + + resp, err := conn.DescribeReplicationGroups(input) + if err != nil { + return err + } + + var rg *elasticache.ReplicationGroup + for _, r := range resp.ReplicationGroups { + if *r.ReplicationGroupId == d.Get("replication_group_id").(string) { + rg = r + } + } + if rg == nil { + return fmt.Errorf("Elasticache Replication Group (%s) not found", d.Get("replication_group_id").(string)) + } + + d.SetId(*rg.ReplicationGroupId) + d.Set("replication_group_description", rg.Description) + d.Set("auth_token_enabled", rg.AuthTokenEnabled) + if rg.AutomaticFailover != nil { + switch *rg.AutomaticFailover { + case elasticache.AutomaticFailoverStatusDisabled, elasticache.AutomaticFailoverStatusDisabling: + d.Set("automatic_failover_enabled", false) + case elasticache.AutomaticFailoverStatusEnabled, elasticache.AutomaticFailoverStatusEnabling: + d.Set("automatic_failover_enabled", true) + } + } + if rg.ConfigurationEndpoint != nil { + d.Set("port", rg.ConfigurationEndpoint.Port) + d.Set("configuration_endpoint_address", rg.ConfigurationEndpoint.Address) + } else { + if rg.NodeGroups == nil { + d.SetId("") + return fmt.Errorf("Elasticache Replication Group (%s) doesn't have node groups.", d.Get("replication_group_id").(string)) + } + d.Set("port", rg.NodeGroups[0].PrimaryEndpoint.Port) + d.Set("primary_endpoint_address", rg.NodeGroups[0].PrimaryEndpoint.Address) + } + d.Set("number_cache_clusters", len(rg.MemberClusters)) + d.Set("node_type", rg.CacheNodeType) + d.Set("snapshot_window", rg.SnapshotWindow) + d.Set("snapshot_retention_limit", rg.SnapshotRetentionLimit) + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go index 854bc39b4..4be794623 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go @@ -58,11 +58,6 @@ func dataSourceAwsIAMServerCertificate() *schema.Resource { Computed: true, }, - "id": { - Type: schema.TypeString, - Computed: true, - }, - "path": { Type: schema.TypeString, Computed: true, @@ -130,7 +125,6 @@ func dataSourceAwsIAMServerCertificateRead(d *schema.ResourceData, meta interfac d.SetId(*metadata.ServerCertificateId) d.Set("arn", *metadata.Arn) d.Set("path", *metadata.Path) - d.Set("id", *metadata.ServerCertificateId) d.Set("name", *metadata.ServerCertificateName) if metadata.Expiration != nil { d.Set("expiration_date", metadata.Expiration.Format("2006-01-02T15:04:05")) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go new file mode 100644 index 000000000..e3c82667e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go @@ -0,0 +1,54 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iam" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsIAMUser() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsIAMUserRead, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "path": { + Type: schema.TypeString, + Computed: true, + }, + "user_id": { + Type: schema.TypeString, + Computed: true, + }, + "user_name": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func dataSourceAwsIAMUserRead(d *schema.ResourceData, meta interface{}) error { + iamconn := meta.(*AWSClient).iamconn + userName := d.Get("user_name").(string) + req := &iam.GetUserInput{ + UserName: aws.String(userName), + } + + resp, err := iamconn.GetUser(req) + if err != nil { + return errwrap.Wrapf("error getting user: {{err}}", err) + } + + user := resp.User + d.SetId(*user.UserId) + d.Set("arn", user.Arn) + d.Set("path", user.Path) + d.Set("user_id", user.UserId) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go index 446b0dcd5..0033a09c9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go @@ -15,7 +15,7 @@ func dataSourceAwsInstance() *schema.Resource { Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), - "tags": dataSourceTagsSchema(), + "tags": tagsSchemaComputed(), "instance_tags": tagsSchemaComputed(), "instance_id": { Type: schema.TypeString, @@ -313,7 +313,7 @@ func instanceDescriptionAttributes(d *schema.ResourceData, instance *ec2.Instanc d.Set("monitoring", monitoringState == "enabled" || monitoringState == "pending") } - d.Set("tags", dataSourceTags(instance.Tags)) + d.Set("tags", tagsToMap(instance.Tags)) // Security Groups if err := readSecurityGroups(d, instance, conn); err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go index 3f15965ca..4ffc3465f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_ciphertext.go @@ -10,9 +10,9 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func dataSourceAwsKmsCiphetext() *schema.Resource { +func dataSourceAwsKmsCiphertext() *schema.Resource { return &schema.Resource{ - Read: dataSourceAwsKmsCiphetextRead, + Read: dataSourceAwsKmsCiphertextRead, Schema: map[string]*schema.Schema{ "plaintext": { @@ -39,7 +39,7 @@ func dataSourceAwsKmsCiphetext() *schema.Resource { } } -func dataSourceAwsKmsCiphetextRead(d *schema.ResourceData, meta interface{}) error { +func dataSourceAwsKmsCiphertextRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kmsconn d.SetId(time.Now().UTC().String()) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb.go similarity index 66% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb.go index d314e0ed7..2b3864112 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb.go @@ -9,9 +9,9 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func dataSourceAwsAlb() *schema.Resource { +func dataSourceAwsLb() *schema.Resource { return &schema.Resource{ - Read: dataSourceAwsAlbRead, + Read: dataSourceAwsLbRead, Schema: map[string]*schema.Schema{ "arn": { Type: schema.TypeString, @@ -35,6 +35,11 @@ func dataSourceAwsAlb() *schema.Resource { Computed: true, }, + "load_balancer_type": { + Type: schema.TypeString, + Computed: true, + }, + "security_groups": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, @@ -49,6 +54,23 @@ func dataSourceAwsAlb() *schema.Resource { Set: schema.HashString, }, + "subnet_mapping": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "subnet_id": { + Type: schema.TypeString, + Required: true, + }, + "allocation_id": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "access_logs": { Type: schema.TypeList, Computed: true, @@ -101,27 +123,27 @@ func dataSourceAwsAlb() *schema.Resource { } } -func dataSourceAwsAlbRead(d *schema.ResourceData, meta interface{}) error { +func dataSourceAwsLbRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - albArn := d.Get("arn").(string) - albName := d.Get("name").(string) + lbArn := d.Get("arn").(string) + lbName := d.Get("name").(string) - describeAlbOpts := &elbv2.DescribeLoadBalancersInput{} + describeLbOpts := &elbv2.DescribeLoadBalancersInput{} switch { - case albArn != "": - describeAlbOpts.LoadBalancerArns = []*string{aws.String(albArn)} - case albName != "": - describeAlbOpts.Names = []*string{aws.String(albName)} + case lbArn != "": + describeLbOpts.LoadBalancerArns = []*string{aws.String(lbArn)} + case lbName != "": + describeLbOpts.Names = []*string{aws.String(lbName)} } - describeResp, err := elbconn.DescribeLoadBalancers(describeAlbOpts) + describeResp, err := elbconn.DescribeLoadBalancers(describeLbOpts) if err != nil { - return errwrap.Wrapf("Error retrieving ALB: {{err}}", err) + return errwrap.Wrapf("Error retrieving LB: {{err}}", err) } if len(describeResp.LoadBalancers) != 1 { return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(describeResp.LoadBalancers)) } d.SetId(*describeResp.LoadBalancers[0].LoadBalancerArn) - return flattenAwsAlbResource(d, meta, describeResp.LoadBalancers[0]) + return flattenAwsLbResource(d, meta, describeResp.LoadBalancers[0]) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb_listener.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go similarity index 81% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb_listener.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go index 63ec4ed1a..dd7570a9f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb_listener.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go @@ -2,9 +2,9 @@ package aws import "github.com/hashicorp/terraform/helper/schema" -func dataSourceAwsAlbListener() *schema.Resource { +func dataSourceAwsLbListener() *schema.Resource { return &schema.Resource{ - Read: dataSourceAwsAlbListenerRead, + Read: dataSourceAwsLbListenerRead, Schema: map[string]*schema.Schema{ "arn": { @@ -56,7 +56,7 @@ func dataSourceAwsAlbListener() *schema.Resource { } } -func dataSourceAwsAlbListenerRead(d *schema.ResourceData, meta interface{}) error { +func dataSourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { d.SetId(d.Get("arn").(string)) - return resourceAwsAlbListenerRead(d, meta) + return resourceAwsLbListenerRead(d, meta) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go similarity index 89% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb_target_group.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go index 82dd8e304..741772ce2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_alb_target_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go @@ -9,9 +9,9 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func dataSourceAwsAlbTargetGroup() *schema.Resource { +func dataSourceAwsLbTargetGroup() *schema.Resource { return &schema.Resource{ - Read: dataSourceAwsAlbTargetGroupRead, + Read: dataSourceAwsLbTargetGroupRead, Schema: map[string]*schema.Schema{ "arn": { Type: schema.TypeString, @@ -125,7 +125,7 @@ func dataSourceAwsAlbTargetGroup() *schema.Resource { } } -func dataSourceAwsAlbTargetGroupRead(d *schema.ResourceData, meta interface{}) error { +func dataSourceAwsLbTargetGroupRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn tgArn := d.Get("arn").(string) tgName := d.Get("name").(string) @@ -140,7 +140,7 @@ func dataSourceAwsAlbTargetGroupRead(d *schema.ResourceData, meta interface{}) e describeResp, err := elbconn.DescribeTargetGroups(describeTgOpts) if err != nil { - return errwrap.Wrapf("Error retrieving ALB Target Group: {{err}}", err) + return errwrap.Wrapf("Error retrieving LB Target Group: {{err}}", err) } if len(describeResp.TargetGroups) != 1 { return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(describeResp.TargetGroups)) @@ -149,5 +149,5 @@ func dataSourceAwsAlbTargetGroupRead(d *schema.ResourceData, meta interface{}) e targetGroup := describeResp.TargetGroups[0] d.SetId(*targetGroup.TargetGroupArn) - return flattenAwsAlbTargetGroupResource(d, meta, targetGroup) + return flattenAwsLbTargetGroupResource(d, meta, targetGroup) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go new file mode 100644 index 000000000..852976252 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go @@ -0,0 +1,114 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsNatGateway() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsNatGatewayRead, + + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "subnet_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "tags": tagsSchemaComputed(), + + "filter": ec2CustomFiltersSchema(), + }, + } +} + +func dataSourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeNatGatewaysInput{} + + if id, ok := d.GetOk("id"); ok { + req.NatGatewayIds = aws.StringSlice([]string{id.(string)}) + } + + if vpc_id, ok := d.GetOk("vpc_id"); ok { + req.Filter = append(req.Filter, buildEC2AttributeFilterList( + map[string]string{ + "vpc-id": vpc_id.(string), + }, + )...) + } + + if state, ok := d.GetOk("state"); ok { + req.Filter = append(req.Filter, buildEC2AttributeFilterList( + map[string]string{ + "state": state.(string), + }, + )...) + } + + if subnet_id, ok := d.GetOk("subnet_id"); ok { + req.Filter = append(req.Filter, buildEC2AttributeFilterList( + map[string]string{ + "subnet-id": subnet_id.(string), + }, + )...) + } + + req.Filter = append(req.Filter, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + if len(req.Filter) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filter = nil + } + log.Printf("[DEBUG] Reading NAT Gateway: %s", req) + resp, err := conn.DescribeNatGateways(req) + if err != nil { + return err + } + if resp == nil || len(resp.NatGateways) == 0 { + return fmt.Errorf("no matching NAT gateway found: %#v", req) + } + if len(resp.NatGateways) > 1 { + return fmt.Errorf("multiple NAT gateways matched; use additional constraints to reduce matches to a single NAT gateway") + } + + ngw := resp.NatGateways[0] + + d.SetId(aws.StringValue(ngw.NatGatewayId)) + d.Set("state", ngw.State) + d.Set("subnet_id", ngw.SubnetId) + d.Set("vpc_id", ngw.VpcId) + + for _, address := range ngw.NatGatewayAddresses { + if *address.AllocationId != "" { + d.Set("allocation_id", address.AllocationId) + d.Set("network_interface_id", address.NetworkInterfaceId) + d.Set("private_ip", address.PrivateIp) + d.Set("public_ip", address.PublicIp) + break + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_prefix_list.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_prefix_list.go index 8bed85506..876af586d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_prefix_list.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_prefix_list.go @@ -23,11 +23,6 @@ func dataSourceAwsPrefixList() *schema.Resource { Optional: true, Computed: true, }, - // Computed values. - "id": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, "cidr_blocks": &schema.Schema{ Type: schema.TypeList, Computed: true, @@ -63,7 +58,6 @@ func dataSourceAwsPrefixListRead(d *schema.ResourceData, meta interface{}) error pl := resp.PrefixLists[0] d.SetId(*pl.PrefixListId) - d.Set("id", pl.PrefixListId) d.Set("name", pl.PrefixListName) cidrs := make([]string, len(pl.Cidrs)) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go new file mode 100644 index 000000000..0e5e3ee7c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go @@ -0,0 +1,164 @@ +package aws + +import ( + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsRdsCluster() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsRdsClusterRead, + Schema: map[string]*schema.Schema{ + "cluster_identifier": { + Type: schema.TypeString, + Required: true, + }, + + "availability_zones": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + Set: schema.HashString, + }, + + "backup_retention_period": { + Type: schema.TypeInt, + Computed: true, + }, + + "cluster_members": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + Set: schema.HashString, + }, + + "cluster_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + + "database_name": { + Type: schema.TypeString, + Computed: true, + }, + + "db_subnet_group_name": { + Type: schema.TypeString, + Computed: true, + }, + + "db_cluster_parameter_group_name": { + Type: schema.TypeString, + Computed: true, + }, + + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "engine": { + Type: schema.TypeString, + Computed: true, + }, + + "engine_version": { + Type: schema.TypeString, + Computed: true, + }, + + "final_snapshot_identifier": { + Type: schema.TypeString, + Computed: true, + }, + + "iam_database_authentication_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + + "iam_roles": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + + "master_username": { + Type: schema.TypeString, + Computed: true, + }, + + "preferred_backup_window": { + Type: schema.TypeString, + Computed: true, + }, + + "preferred_maintenance_window": { + Type: schema.TypeString, + Computed: true, + StateFunc: func(val interface{}) string { + if val == nil { + return "" + } + return strings.ToLower(val.(string)) + }, + }, + + "port": { + Type: schema.TypeInt, + Computed: true, + }, + + "reader_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "replication_source_identifier": { + Type: schema.TypeString, + Computed: true, + }, + + "storage_encrypted": { + Type: schema.TypeBool, + Computed: true, + }, + + "tags": tagsSchemaComputed(), + + "vpc_security_group_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsRdsClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + resp, err := conn.DescribeDBClusters(&rds.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + }) + + if err != nil { + return errwrap.Wrapf("Error retrieving RDS cluster: {{err}}", err) + } + + d.SetId(*resp.DBClusters[0].DBClusterIdentifier) + + return flattenAwsRdsClusterResource(d, meta, resp.DBClusters[0]) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go index faa210fff..b7a9a2307 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_service_account.go @@ -20,6 +20,8 @@ var redshiftServiceAccountPerRegionMap = map[string]string{ "ca-central-1": "907379612154", "eu-central-1": "053454850223", "eu-west-1": "210876761215", + "eu-west-2": "307160386991", + "sa-east-1": "075028567923", } func dataSourceAwsRedshiftServiceAccount() *schema.Resource { @@ -31,6 +33,10 @@ func dataSourceAwsRedshiftServiceAccount() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -43,6 +49,7 @@ func dataSourceAwsRedshiftServiceAccountRead(d *schema.ResourceData, meta interf if accid, ok := redshiftServiceAccountPerRegionMap[region]; ok { d.SetId(accid) + d.Set("arn", iamArnString(meta.(*AWSClient).partition, accid, "user/logs")) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go index ed75f7056..6d2a21d1d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go @@ -75,7 +75,6 @@ func dataSourceAwsRegionRead(d *schema.ResourceData, meta interface{}) error { region := resp.Regions[0] d.SetId(*region.RegionName) - d.Set("id", region.RegionName) d.Set("name", region.RegionName) d.Set("endpoint", region.Endpoint) d.Set("current", *region.RegionName == currentRegion) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go new file mode 100644 index 000000000..6a62841f1 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go @@ -0,0 +1,115 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsS3Bucket() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsS3BucketRead, + + Schema: map[string]*schema.Schema{ + "bucket": { + Type: schema.TypeString, + Required: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "bucket_domain_name": { + Type: schema.TypeString, + Computed: true, + }, + "hosted_zone_id": { + Type: schema.TypeString, + Computed: true, + }, + "region": { + Type: schema.TypeString, + Computed: true, + }, + "website_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "website_domain": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + + bucket := d.Get("bucket").(string) + + input := &s3.HeadBucketInput{ + Bucket: aws.String(bucket), + } + + log.Printf("[DEBUG] Reading S3 bucket: %s", input) + _, err := conn.HeadBucket(input) + + if err != nil { + return fmt.Errorf("Failed getting S3 bucket: %s Bucket: %q", err, bucket) + } + + d.SetId(bucket) + d.Set("arn", fmt.Sprintf("arn:%s:s3:::%s", meta.(*AWSClient).partition, bucket)) + d.Set("bucket_domain_name", bucketDomainName(bucket)) + + if err := bucketLocation(d, bucket, conn); err != nil { + return err + } + + return nil +} + +func bucketLocation(d *schema.ResourceData, bucket string, conn *s3.S3) error { + location, err := conn.GetBucketLocation( + &s3.GetBucketLocationInput{ + Bucket: aws.String(bucket), + }, + ) + if err != nil { + return err + } + var region string + if location.LocationConstraint != nil { + region = *location.LocationConstraint + } + region = normalizeRegion(region) + if err := d.Set("region", region); err != nil { + return err + } + + hostedZoneID := HostedZoneIDForRegion(region) + if err := d.Set("hosted_zone_id", hostedZoneID); err != nil { + return err + } + + _, websiteErr := conn.GetBucketWebsite( + &s3.GetBucketWebsiteInput{ + Bucket: aws.String(bucket), + }, + ) + + if websiteErr == nil { + websiteEndpoint := WebsiteEndpoint(bucket, region) + if err := d.Set("website_endpoint", websiteEndpoint.Endpoint); err != nil { + return err + } + if err := d.Set("website_domain", websiteEndpoint.Domain); err != nil { + return err + } + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_group.go index 223d33823..ec659e400 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_group.go @@ -38,6 +38,11 @@ func dataSourceAwsSecurityGroup() *schema.Resource { }, "tags": tagsSchemaComputed(), + + "description": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -46,7 +51,7 @@ func dataSourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) er conn := meta.(*AWSClient).ec2conn req := &ec2.DescribeSecurityGroupsInput{} - if id, idExists := d.GetOk("id"); idExists { + if id, ok := d.GetOk("id"); ok { req.GroupIds = []*string{aws.String(id.(string))} } @@ -82,7 +87,6 @@ func dataSourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) er sg := resp.SecurityGroups[0] d.SetId(*sg.GroupId) - d.Set("id", sg.VpcId) d.Set("name", sg.GroupName) d.Set("description", sg.Description) d.Set("vpc_id", sg.VpcId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go index 388366686..0de1a1cca 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go @@ -34,11 +34,13 @@ func dataSourceAwsSsmParameter() *schema.Resource { func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn - log.Printf("[DEBUG] Reading SSM Parameter: %s", d.Id()) + name := d.Get("name").(string) + + log.Printf("[DEBUG] Reading SSM Parameter: %q", name) paramInput := &ssm.GetParametersInput{ Names: []*string{ - aws.String(d.Get("name").(string)), + aws.String(name), }, WithDecryption: aws.Bool(true), } @@ -50,7 +52,7 @@ func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { } if len(resp.InvalidParameters) > 0 { - return fmt.Errorf("[ERROR] SSM Parameter %s is invalid", d.Get("name").(string)) + return fmt.Errorf("[ERROR] SSM Parameter %s is invalid", name) } param := resp.Parameters[0] diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go index 188a09dd2..70cb8fbdf 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet.go @@ -83,7 +83,7 @@ func dataSourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { req := &ec2.DescribeSubnetsInput{} - if id := d.Get("id"); id != "" { + if id, ok := d.GetOk("id"); ok { req.SubnetIds = []*string{aws.String(id.(string))} } @@ -139,7 +139,6 @@ func dataSourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { subnet := resp.Subnets[0] d.SetId(*subnet.SubnetId) - d.Set("id", subnet.SubnetId) d.Set("vpc_id", subnet.VpcId) d.Set("availability_zone", subnet.AvailabilityZone) d.Set("cidr_block", subnet.CidrBlock) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go index a4acbfc43..1b8852b17 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go @@ -81,8 +81,13 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { req := &ec2.DescribeVpcsInput{} - if id := d.Get("id"); id != "" { - req.VpcIds = []*string{aws.String(id.(string))} + var id string + if cid, ok := d.GetOk("id"); ok { + id = cid.(string) + } + + if id != "" { + req.VpcIds = []*string{aws.String(id)} } // We specify "default" as boolean, but EC2 filters want @@ -129,7 +134,6 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { vpc := resp.Vpcs[0] d.SetId(*vpc.VpcId) - d.Set("id", vpc.VpcId) d.Set("cidr_block", vpc.CidrBlock) d.Set("dhcp_options_id", vpc.DhcpOptionsId) d.Set("instance_tenancy", vpc.InstanceTenancy) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go index c15933129..0503fe43e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" @@ -39,12 +40,16 @@ func dataSourceAwsVpcEndpoint() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "route_table_ids": &schema.Schema{ + "route_table_ids": { Type: schema.TypeSet, Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, }, + "prefix_list_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -89,12 +94,35 @@ func dataSourceAwsVpcEndpointRead(d *schema.ResourceData, meta interface{}) erro return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) } + prefixListServiceName := *vpce.ServiceName + prefixListInput := &ec2.DescribePrefixListsInput{ + Filters: []*ec2.Filter{ + {Name: aws.String("prefix-list-name"), Values: []*string{aws.String(prefixListServiceName)}}, + }, + } + log.Printf("[DEBUG] Reading VPC Endpoint prefix list: %s", prefixListServiceName) + prefixListsOutput, err := conn.DescribePrefixLists(prefixListInput) + + if err != nil { + _, ok := err.(awserr.Error) + if !ok { + return fmt.Errorf("Error reading VPC Endpoint prefix list: %s", err.Error()) + } + } + + if len(prefixListsOutput.PrefixLists) != 1 { + return fmt.Errorf("There are multiple prefix lists associated with the service name '%s'. Unexpected", prefixListServiceName) + } + d.SetId(aws.StringValue(vpce.VpcEndpointId)) - d.Set("id", vpce.VpcEndpointId) d.Set("state", vpce.State) d.Set("vpc_id", vpce.VpcId) d.Set("service_name", vpce.ServiceName) d.Set("policy", policy) + + pl := prefixListsOutput.PrefixLists[0] + d.Set("prefix_list_id", pl.PrefixListId) + if err := d.Set("route_table_ids", aws.StringValueSlice(vpce.RouteTableIds)); err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go index 8d800751f..489a72624 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go @@ -117,7 +117,6 @@ func dataSourceAwsVpcPeeringConnectionRead(d *schema.ResourceData, meta interfac pcx := resp.VpcPeeringConnections[0] d.SetId(aws.StringValue(pcx.VpcPeeringConnectionId)) - d.Set("id", pcx.VpcPeeringConnectionId) d.Set("status", pcx.Status.Code) d.Set("vpc_id", pcx.RequesterVpcInfo.VpcId) d.Set("owner_id", pcx.RequesterVpcInfo.OwnerId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go new file mode 100644 index 000000000..abad556cd --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go @@ -0,0 +1,80 @@ +package aws + +import ( + "bytes" + "encoding/json" + "reflect" + + "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" + "github.com/aws/aws-sdk-go/service/ecs" + "github.com/mitchellh/copystructure" +) + +func ecsContainerDefinitionsAreEquivalent(def1, def2 string) (bool, error) { + var obj1 containerDefinitions + err := json.Unmarshal([]byte(def1), &obj1) + if err != nil { + return false, err + } + err = obj1.Reduce() + if err != nil { + return false, err + } + canonicalJson1, err := jsonutil.BuildJSON(obj1) + if err != nil { + return false, err + } + + var obj2 containerDefinitions + err = json.Unmarshal([]byte(def2), &obj2) + if err != nil { + return false, err + } + err = obj2.Reduce() + if err != nil { + return false, err + } + canonicalJson2, err := jsonutil.BuildJSON(obj2) + if err != nil { + return false, err + } + + return bytes.Compare(canonicalJson1, canonicalJson2) == 0, nil +} + +type containerDefinitions []*ecs.ContainerDefinition + +func (cd containerDefinitions) Reduce() error { + for i, def := range cd { + // Deal with special fields which have defaults + for j, pm := range def.PortMappings { + if pm.Protocol != nil && *pm.Protocol == "tcp" { + cd[i].PortMappings[j].Protocol = nil + } + if pm.HostPort != nil && *pm.HostPort == 0 { + cd[i].PortMappings[j].HostPort = nil + } + } + + // Create a mutable copy + defCopy, err := copystructure.Copy(def) + if err != nil { + return err + } + + definition := reflect.ValueOf(defCopy).Elem() + for i := 0; i < definition.NumField(); i++ { + sf := definition.Field(i) + + // Set all empty slices to nil + if sf.Kind() == reflect.Slice { + if sf.IsValid() && !sf.IsNil() && sf.Len() == 0 { + sf.Set(reflect.Zero(sf.Type())) + } + } + } + iface := definition.Interface().(ecs.ContainerDefinition) + cd[i] = &iface + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/opsworks_layers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/opsworks_layers.go index c4bfeb6b2..42ba86285 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/opsworks_layers.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/opsworks_layers.go @@ -45,11 +45,6 @@ var ( func (lt *opsworksLayerType) SchemaResource() *schema.Resource { resourceSchema := map[string]*schema.Schema{ - "id": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - "auto_assign_elastic_ips": &schema.Schema{ Type: schema.TypeBool, Optional: true, @@ -281,7 +276,7 @@ func (lt *opsworksLayerType) Read(d *schema.ResourceData, client *opsworks.OpsWo } layer := resp.Layers[0] - d.Set("id", layer.LayerId) + d.SetId(aws.StringValue(layer.LayerId)) d.Set("auto_assign_elastic_ips", layer.AutoAssignElasticIps) d.Set("auto_assign_public_ips", layer.AutoAssignPublicIps) d.Set("custom_instance_profile_arn", layer.CustomInstanceProfileArn) @@ -370,7 +365,6 @@ func (lt *opsworksLayerType) Create(d *schema.ResourceData, client *opsworks.Ops layerId := *resp.LayerId d.SetId(layerId) - d.Set("id", layerId) loadBalancer := aws.String(d.Get("elastic_load_balancer").(string)) if loadBalancer != nil && *loadBalancer != "" { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go index 89381b736..219efe2fe 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go @@ -160,33 +160,33 @@ func Provider() terraform.ResourceProvider { }, DataSourcesMap: map[string]*schema.Resource{ - "aws_acm_certificate": dataSourceAwsAcmCertificate(), - "aws_alb": dataSourceAwsAlb(), - "aws_alb_listener": dataSourceAwsAlbListener(), - "aws_alb_target_group": dataSourceAwsAlbTargetGroup(), - "aws_ami": dataSourceAwsAmi(), - "aws_ami_ids": dataSourceAwsAmiIds(), - "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), - "aws_availability_zone": dataSourceAwsAvailabilityZone(), - "aws_availability_zones": dataSourceAwsAvailabilityZones(), - "aws_billing_service_account": dataSourceAwsBillingServiceAccount(), - "aws_caller_identity": dataSourceAwsCallerIdentity(), - "aws_canonical_user_id": dataSourceAwsCanonicalUserId(), - "aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), - "aws_db_instance": dataSourceAwsDbInstance(), - "aws_db_snapshot": dataSourceAwsDbSnapshot(), - "aws_ebs_snapshot": dataSourceAwsEbsSnapshot(), - "aws_ebs_snapshot_ids": dataSourceAwsEbsSnapshotIds(), - "aws_ebs_volume": dataSourceAwsEbsVolume(), - "aws_ecr_repository": dataSourceAwsEcrRepository(), - "aws_ecs_cluster": dataSourceAwsEcsCluster(), - "aws_ecs_container_definition": dataSourceAwsEcsContainerDefinition(), - "aws_ecs_task_definition": dataSourceAwsEcsTaskDefinition(), - "aws_efs_file_system": dataSourceAwsEfsFileSystem(), - "aws_efs_mount_target": dataSourceAwsEfsMountTarget(), - "aws_eip": dataSourceAwsEip(), + "aws_acm_certificate": dataSourceAwsAcmCertificate(), + "aws_ami": dataSourceAwsAmi(), + "aws_ami_ids": dataSourceAwsAmiIds(), + "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), + "aws_availability_zone": dataSourceAwsAvailabilityZone(), + "aws_availability_zones": dataSourceAwsAvailabilityZones(), + "aws_billing_service_account": dataSourceAwsBillingServiceAccount(), + "aws_caller_identity": dataSourceAwsCallerIdentity(), + "aws_canonical_user_id": dataSourceAwsCanonicalUserId(), + "aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), + "aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), + "aws_db_instance": dataSourceAwsDbInstance(), + "aws_db_snapshot": dataSourceAwsDbSnapshot(), + "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), + "aws_ebs_snapshot": dataSourceAwsEbsSnapshot(), + "aws_ebs_snapshot_ids": dataSourceAwsEbsSnapshotIds(), + "aws_ebs_volume": dataSourceAwsEbsVolume(), + "aws_ecr_repository": dataSourceAwsEcrRepository(), + "aws_ecs_cluster": dataSourceAwsEcsCluster(), + "aws_ecs_container_definition": dataSourceAwsEcsContainerDefinition(), + "aws_ecs_task_definition": dataSourceAwsEcsTaskDefinition(), + "aws_efs_file_system": dataSourceAwsEfsFileSystem(), + "aws_efs_mount_target": dataSourceAwsEfsMountTarget(), + "aws_eip": dataSourceAwsEip(), "aws_elastic_beanstalk_solution_stack": dataSourceAwsElasticBeanstalkSolutionStack(), "aws_elasticache_cluster": dataSourceAwsElastiCacheCluster(), + "aws_elasticache_replication_group": dataSourceAwsElasticacheReplicationGroup(), "aws_elb_hosted_zone_id": dataSourceAwsElbHostedZoneId(), "aws_elb_service_account": dataSourceAwsElbServiceAccount(), "aws_iam_account_alias": dataSourceAwsIamAccountAlias(), @@ -195,19 +195,23 @@ func Provider() terraform.ResourceProvider { "aws_iam_policy_document": dataSourceAwsIamPolicyDocument(), "aws_iam_role": dataSourceAwsIAMRole(), "aws_iam_server_certificate": dataSourceAwsIAMServerCertificate(), + "aws_iam_user": dataSourceAwsIAMUser(), "aws_internet_gateway": dataSourceAwsInternetGateway(), "aws_instance": dataSourceAwsInstance(), "aws_ip_ranges": dataSourceAwsIPRanges(), "aws_kinesis_stream": dataSourceAwsKinesisStream(), "aws_kms_alias": dataSourceAwsKmsAlias(), - "aws_kms_ciphertext": dataSourceAwsKmsCiphetext(), + "aws_kms_ciphertext": dataSourceAwsKmsCiphertext(), "aws_kms_secret": dataSourceAwsKmsSecret(), + "aws_nat_gateway": dataSourceAwsNatGateway(), "aws_partition": dataSourceAwsPartition(), "aws_prefix_list": dataSourceAwsPrefixList(), + "aws_rds_cluster": dataSourceAwsRdsCluster(), "aws_redshift_service_account": dataSourceAwsRedshiftServiceAccount(), "aws_region": dataSourceAwsRegion(), "aws_route_table": dataSourceAwsRouteTable(), "aws_route53_zone": dataSourceAwsRoute53Zone(), + "aws_s3_bucket": dataSourceAwsS3Bucket(), "aws_s3_bucket_object": dataSourceAwsS3BucketObject(), "aws_sns_topic": dataSourceAwsSnsTopic(), "aws_ssm_parameter": dataSourceAwsSsmParameter(), @@ -219,14 +223,17 @@ func Provider() terraform.ResourceProvider { "aws_vpc_endpoint_service": dataSourceAwsVpcEndpointService(), "aws_vpc_peering_connection": dataSourceAwsVpcPeeringConnection(), "aws_vpn_gateway": dataSourceAwsVpnGateway(), + + // Adding the Aliases for the ALB -> LB Rename + "aws_lb": dataSourceAwsLb(), + "aws_alb": dataSourceAwsLb(), + "aws_lb_listener": dataSourceAwsLbListener(), + "aws_alb_listener": dataSourceAwsLbListener(), + "aws_lb_target_group": dataSourceAwsLbTargetGroup(), + "aws_alb_target_group": dataSourceAwsLbTargetGroup(), }, ResourcesMap: map[string]*schema.Resource{ - "aws_alb": resourceAwsAlb(), - "aws_alb_listener": resourceAwsAlbListener(), - "aws_alb_listener_rule": resourceAwsAlbListenerRule(), - "aws_alb_target_group": resourceAwsAlbTargetGroup(), - "aws_alb_target_group_attachment": resourceAwsAlbTargetGroupAttachment(), "aws_ami": resourceAwsAmi(), "aws_ami_copy": resourceAwsAmiCopy(), "aws_ami_from_instance": resourceAwsAmiFromInstance(), @@ -254,6 +261,8 @@ func Provider() terraform.ResourceProvider { "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), + "aws_athena_database": resourceAwsAthenaDatabase(), + "aws_athena_named_query": resourceAwsAthenaNamedQuery(), "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), "aws_autoscaling_group": resourceAwsAutoscalingGroup(), "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), @@ -276,6 +285,7 @@ func Provider() terraform.ResourceProvider { "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), + "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), "aws_autoscaling_lifecycle_hook": resourceAwsAutoscalingLifecycleHook(), "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), @@ -301,9 +311,12 @@ func Provider() terraform.ResourceProvider { "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), "aws_dms_replication_task": resourceAwsDmsReplicationTask(), + "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_connection": resourceAwsDxConnection(), "aws_dynamodb_table": resourceAwsDynamoDbTable(), "aws_ebs_snapshot": resourceAwsEbsSnapshot(), "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), "aws_ecr_repository": resourceAwsEcrRepository(), "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), "aws_ecs_cluster": resourceAwsEcsCluster(), @@ -425,11 +438,13 @@ func Provider() terraform.ResourceProvider { "aws_route_table_association": resourceAwsRouteTableAssociation(), "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), "aws_ses_event_destination": resourceAwsSesEventDestination(), + "aws_ses_template": resourceAwsSesTemplate(), "aws_s3_bucket": resourceAwsS3Bucket(), "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), "aws_s3_bucket_object": resourceAwsS3BucketObject(), @@ -438,6 +453,7 @@ func Provider() terraform.ResourceProvider { "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), "aws_default_security_group": resourceAwsDefaultSecurityGroup(), "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), "aws_simpledb_domain": resourceAwsSimpleDBDomain(), "aws_ssm_activation": resourceAwsSsmActivation(), "aws_ssm_association": resourceAwsSsmAssociation(), @@ -448,6 +464,7 @@ func Provider() terraform.ResourceProvider { "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), "aws_ssm_parameter": resourceAwsSsmParameter(), + "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), @@ -479,12 +496,31 @@ func Provider() terraform.ResourceProvider { "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), "aws_waf_ipset": resourceAwsWafIPSet(), "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), "aws_waf_web_acl": resourceAwsWafWebAcl(), "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), + "aws_batch_job_definition": resourceAwsBatchJobDefinition(), + "aws_batch_job_queue": resourceAwsBatchJobQueue(), + + // ALBs are actually LBs because they can be type `network` or `application` + // To avoid regressions, we will add a new resource for each and they both point + // back to the old ALB version. IF the Terraform supported aliases for resources + // this would be a whole lot simplier + "aws_alb": resourceAwsLb(), + "aws_lb": resourceAwsLb(), + "aws_alb_listener": resourceAwsLbListener(), + "aws_lb_listener": resourceAwsLbListener(), + "aws_alb_listener_rule": resourceAwsLbbListenerRule(), + "aws_lb_listener_rule": resourceAwsLbbListenerRule(), + "aws_alb_target_group": resourceAwsLbTargetGroup(), + "aws_lb_target_group": resourceAwsLbTargetGroup(), + "aws_alb_target_group_attachment": resourceAwsLbTargetGroupAttachment(), + "aws_lb_target_group_attachment": resourceAwsLbTargetGroupAttachment(), }, ConfigureFunc: providerConfigure, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go index f6b4ffb07..7e89d4286 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go @@ -31,6 +31,12 @@ func resourceAwsAmi() *schema.Resource { return &schema.Resource{ Create: resourceAwsAmiCreate, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(AWSAMIRetryTimeout), + Update: schema.DefaultTimeout(AWSAMIRetryTimeout), + Delete: schema.DefaultTimeout(AWSAMIDeleteRetryTimeout), + }, + Schema: resourceSchema, // The Read, Update and Delete operations are shared with aws_ami_copy @@ -110,14 +116,12 @@ func resourceAwsAmiCreate(d *schema.ResourceData, meta interface{}) error { id := *res.ImageId d.SetId(id) - d.Partial(true) // make sure we record the id even if the rest of this gets interrupted - d.Set("id", id) + d.Partial(true) d.Set("manage_ebs_block_devices", false) - d.SetPartial("id") d.SetPartial("manage_ebs_block_devices") d.Partial(false) - _, err = resourceAwsAmiWaitForAvailable(id, client) + _, err = resourceAwsAmiWaitForAvailable(d.Timeout(schema.TimeoutCreate), id, client) if err != nil { return err } @@ -170,7 +174,7 @@ func resourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { // before we continue. We should never take this branch in normal // circumstances since we would've waited for availability during // the "Create" step. - image, err = resourceAwsAmiWaitForAvailable(id, client) + image, err = resourceAwsAmiWaitForAvailable(d.Timeout(schema.TimeoutCreate), id, client) if err != nil { return err } @@ -193,6 +197,7 @@ func resourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { d.Set("kernel_id", image.KernelId) d.Set("ramdisk_id", image.RamdiskId) d.Set("root_device_name", image.RootDeviceName) + d.Set("root_snapshot_id", amiRootSnapshotId(image)) d.Set("sriov_net_support", image.SriovNetSupport) d.Set("virtualization_type", image.VirtualizationType) @@ -302,7 +307,7 @@ func resourceAwsAmiDelete(d *schema.ResourceData, meta interface{}) error { } // Verify that the image is actually removed, if not we need to wait for it to be removed - if err := resourceAwsAmiWaitForDestroy(d.Id(), client); err != nil { + if err := resourceAwsAmiWaitForDestroy(d.Timeout(schema.TimeoutDelete), d.Id(), client); err != nil { return err } @@ -335,16 +340,16 @@ func AMIStateRefreshFunc(client *ec2.EC2, id string) resource.StateRefreshFunc { } } -func resourceAwsAmiWaitForDestroy(id string, client *ec2.EC2) error { +func resourceAwsAmiWaitForDestroy(timeout time.Duration, id string, client *ec2.EC2) error { log.Printf("Waiting for AMI %s to be deleted...", id) stateConf := &resource.StateChangeConf{ Pending: []string{"available", "pending", "failed"}, Target: []string{"destroyed"}, Refresh: AMIStateRefreshFunc(client, id), - Timeout: AWSAMIDeleteRetryTimeout, + Timeout: timeout, Delay: AWSAMIRetryDelay, - MinTimeout: AWSAMIRetryTimeout, + MinTimeout: AWSAMIRetryMinTimeout, } _, err := stateConf.WaitForState() @@ -355,14 +360,14 @@ func resourceAwsAmiWaitForDestroy(id string, client *ec2.EC2) error { return nil } -func resourceAwsAmiWaitForAvailable(id string, client *ec2.EC2) (*ec2.Image, error) { +func resourceAwsAmiWaitForAvailable(timeout time.Duration, id string, client *ec2.EC2) (*ec2.Image, error) { log.Printf("Waiting for AMI %s to become available...", id) stateConf := &resource.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"available"}, Refresh: AMIStateRefreshFunc(client, id), - Timeout: AWSAMIRetryTimeout, + Timeout: timeout, Delay: AWSAMIRetryDelay, MinTimeout: AWSAMIRetryMinTimeout, } @@ -397,10 +402,6 @@ func resourceAwsAmiCommonSchema(computed bool) map[string]*schema.Schema { } return map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, "image_location": { Type: schema.TypeString, Optional: !computed, @@ -441,6 +442,10 @@ func resourceAwsAmiCommonSchema(computed bool) map[string]*schema.Schema { Computed: computed, ForceNew: !computed, }, + "root_snapshot_id": { + Type: schema.TypeString, + Computed: true, + }, "sriov_net_support": { Type: schema.TypeString, Optional: !computed, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_copy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_copy.go index 3452d5b52..efd27146f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_copy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_copy.go @@ -42,6 +42,12 @@ func resourceAwsAmiCopy() *schema.Resource { return &schema.Resource{ Create: resourceAwsAmiCopyCreate, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(AWSAMIRetryTimeout), + Update: schema.DefaultTimeout(AWSAMIRetryTimeout), + Delete: schema.DefaultTimeout(AWSAMIDeleteRetryTimeout), + }, + Schema: resourceSchema, // The remaining operations are shared with the generic aws_ami resource, @@ -75,13 +81,11 @@ func resourceAwsAmiCopyCreate(d *schema.ResourceData, meta interface{}) error { id := *res.ImageId d.SetId(id) d.Partial(true) // make sure we record the id even if the rest of this gets interrupted - d.Set("id", id) d.Set("manage_ebs_snapshots", true) - d.SetPartial("id") d.SetPartial("manage_ebs_snapshots") d.Partial(false) - _, err = resourceAwsAmiWaitForAvailable(id, client) + _, err = resourceAwsAmiWaitForAvailable(d.Timeout(schema.TimeoutCreate), id, client) if err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_from_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_from_instance.go index cc272d3c1..0db9d3363 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_from_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_from_instance.go @@ -27,6 +27,12 @@ func resourceAwsAmiFromInstance() *schema.Resource { return &schema.Resource{ Create: resourceAwsAmiFromInstanceCreate, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(AWSAMIRetryTimeout), + Update: schema.DefaultTimeout(AWSAMIRetryTimeout), + Delete: schema.DefaultTimeout(AWSAMIDeleteRetryTimeout), + }, + Schema: resourceSchema, // The remaining operations are shared with the generic aws_ami resource, @@ -55,13 +61,11 @@ func resourceAwsAmiFromInstanceCreate(d *schema.ResourceData, meta interface{}) id := *res.ImageId d.SetId(id) d.Partial(true) // make sure we record the id even if the rest of this gets interrupted - d.Set("id", id) d.Set("manage_ebs_snapshots", true) - d.SetPartial("id") d.SetPartial("manage_ebs_snapshots") d.Partial(false) - _, err = resourceAwsAmiWaitForAvailable(id, client) + _, err = resourceAwsAmiWaitForAvailable(d.Timeout(schema.TimeoutCreate), id, client) if err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go index 3b555b6b9..e74577974 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go @@ -34,7 +34,6 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { "binary_media_types": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -166,6 +165,33 @@ func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*api }) } + if d.HasChange("binary_media_types") { + o, n := d.GetChange("binary_media_types") + prefix := "binaryMediaTypes" + + old := o.([]interface{}) + new := n.([]interface{}) + + // Remove every binary media types. Simpler to remove and add new ones, + // since there are no replacings. + for _, v := range old { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("remove"), + Path: aws.String(fmt.Sprintf("/%s/%s", prefix, escapeJsonPointer(v.(string)))), + }) + } + + // Handle additions + if len(new) > 0 { + for _, v := range new { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("add"), + Path: aws.String(fmt.Sprintf("/%s/%s", prefix, escapeJsonPointer(v.(string)))), + }) + } + } + } + return operations } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go index 0d4930d08..9556278a2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go @@ -92,7 +92,7 @@ func resourceAwsApiGatewayUsagePlan() *schema.Resource { }, "rate_limit": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Default: 0, Optional: true, }, @@ -188,7 +188,7 @@ func resourceAwsApiGatewayUsagePlanCreate(d *schema.ResourceData, meta interface } if sv, ok := q["rate_limit"].(float64); ok { - ts.RateLimit = aws.Float64(float64(sv)) + ts.RateLimit = aws.Float64(sv) } params.Throttle = ts @@ -355,7 +355,7 @@ func resourceAwsApiGatewayUsagePlanUpdate(d *schema.ResourceData, meta interface operations = append(operations, &apigateway.PatchOperation{ Op: aws.String("replace"), Path: aws.String("/throttle/rateLimit"), - Value: aws.String(strconv.Itoa(d["rate_limit"].(int))), + Value: aws.String(strconv.FormatFloat(d["rate_limit"].(float64), 'f', -1, 64)), }) operations = append(operations, &apigateway.PatchOperation{ Op: aws.String("replace"), @@ -369,7 +369,7 @@ func resourceAwsApiGatewayUsagePlanUpdate(d *schema.ResourceData, meta interface operations = append(operations, &apigateway.PatchOperation{ Op: aws.String("add"), Path: aws.String("/throttle/rateLimit"), - Value: aws.String(strconv.Itoa(d["rate_limit"].(int))), + Value: aws.String(strconv.FormatFloat(d["rate_limit"].(float64), 'f', -1, 64)), }) operations = append(operations, &apigateway.PatchOperation{ Op: aws.String("add"), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go index e75e76152..52fe78e9b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go @@ -5,10 +5,12 @@ import ( "fmt" "log" "strconv" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/applicationautoscaling" "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -58,21 +60,51 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource { ForceNew: true, ValidateFunc: validateAppautoscalingServiceNamespace, }, - "adjustment_type": &schema.Schema{ - Type: schema.TypeString, - Required: true, - }, - "cooldown": &schema.Schema{ - Type: schema.TypeInt, - Required: true, - }, - "metric_aggregation_type": &schema.Schema{ - Type: schema.TypeString, - Required: true, - }, - "min_adjustment_magnitude": &schema.Schema{ - Type: schema.TypeInt, + "step_scaling_policy_configuration": { + Type: schema.TypeList, Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "adjustment_type": { + Type: schema.TypeString, + Optional: true, + }, + "cooldown": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + }, + "metric_aggregation_type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + "min_adjustment_magnitude": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + }, + "step_adjustment": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "metric_interval_lower_bound": &schema.Schema{ + Type: schema.TypeFloat, + Optional: true, + Default: -1, + }, + "metric_interval_upper_bound": &schema.Schema{ + Type: schema.TypeFloat, + Optional: true, + Default: -1, + }, + "scaling_adjustment": &schema.Schema{ + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + }, + }, }, "alarms": &schema.Schema{ Type: schema.TypeList, @@ -80,9 +112,32 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource { ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + + "adjustment_type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Deprecated: "Use step_scaling_policy_configuration -> adjustment_type instead", + }, + "cooldown": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Deprecated: "Use step_scaling_policy_configuration -> cooldown instead", + }, + "metric_aggregation_type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Deprecated: "Use step_scaling_policy_configuration -> metric_aggregation_type instead", + }, + "min_adjustment_magnitude": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + Deprecated: "Use step_scaling_policy_configuration -> min_adjustment_magnitude instead", + }, "step_adjustment": &schema.Schema{ - Type: schema.TypeSet, - Optional: true, + Type: schema.TypeSet, + Optional: true, + Deprecated: "Use step_scaling_policy_configuration -> step_adjustment instead", + Set: resourceAwsAppautoscalingAdjustmentHash, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "metric_interval_lower_bound": &schema.Schema{ @@ -99,7 +154,95 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource { }, }, }, - Set: resourceAwsAppautoscalingAdjustmentHash, + }, + "target_tracking_scaling_policy_configuration": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "customized_metric_specification": &schema.Schema{ + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + ConflictsWith: []string{"target_tracking_scaling_policy_configuration.0.predefined_metric_specification"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "dimensions": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "metric_name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "namespace": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "statistic": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAppautoscalingCustomizedMetricSpecificationStatistic, + }, + "unit": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "predefined_metric_specification": &schema.Schema{ + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + ConflictsWith: []string{"target_tracking_scaling_policy_configuration.0.customized_metric_specification"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "predefined_metric_type": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAppautoscalingPredefinedMetricSpecification, + }, + "resource_label": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateAppautoscalingPredefinedResourceLabel, + }, + }, + }, + }, + "disable_scale_in": &schema.Schema{ + Type: schema.TypeBool, + Default: false, + Optional: true, + }, + "scale_in_cooldown": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + }, + "scale_out_cooldown": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + }, + "target_value": &schema.Schema{ + Type: schema.TypeFloat, + Required: true, + }, + }, + }, }, }, } @@ -114,9 +257,23 @@ func resourceAwsAppautoscalingPolicyCreate(d *schema.ResourceData, meta interfac } log.Printf("[DEBUG] ApplicationAutoScaling PutScalingPolicy: %#v", params) - resp, err := conn.PutScalingPolicy(¶ms) + var resp *applicationautoscaling.PutScalingPolicyOutput + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.PutScalingPolicy(¶ms) + if err != nil { + if isAWSErr(err, "FailedResourceAccessException", "is not authorized to perform") { + return resource.RetryableError(err) + } + if isAWSErr(err, "FailedResourceAccessException", "token included in the request is invalid") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(fmt.Errorf("Error putting scaling policy: %s", err)) + } + return nil + }) if err != nil { - return fmt.Errorf("Error putting scaling policy: %s", err) + return fmt.Errorf("Failed to create scaling policy: %s", err) } d.Set("arn", resp.PolicyARN) @@ -145,7 +302,9 @@ func resourceAwsAppautoscalingPolicyRead(d *schema.ResourceData, meta interface{ d.Set("scalable_dimension", p.ScalableDimension) d.Set("service_namespace", p.ServiceNamespace) d.Set("alarms", p.Alarms) - d.Set("step_scaling_policy_configuration", p.StepScalingPolicyConfiguration) + d.Set("step_scaling_policy_configuration", flattenStepScalingPolicyConfiguration(p.StepScalingPolicyConfiguration)) + d.Set("target_tracking_scaling_policy_configuration", + flattenTargetTrackingScalingPolicyConfiguration(p.TargetTrackingScalingPolicyConfiguration)) return nil } @@ -161,7 +320,7 @@ func resourceAwsAppautoscalingPolicyUpdate(d *schema.ResourceData, meta interfac log.Printf("[DEBUG] Application Autoscaling Update Scaling Policy: %#v", params) _, err := conn.PutScalingPolicy(¶ms) if err != nil { - return err + return fmt.Errorf("Failed to update scaling policy: %s", err) } return resourceAwsAppautoscalingPolicyRead(d, meta) @@ -185,7 +344,7 @@ func resourceAwsAppautoscalingPolicyDelete(d *schema.ResourceData, meta interfac } log.Printf("[DEBUG] Deleting Application AutoScaling Policy opts: %#v", params) if _, err := conn.DeleteScalingPolicy(¶ms); err != nil { - return fmt.Errorf("Application AutoScaling Policy: %s", err) + return fmt.Errorf("Failed to delete autoscaling policy: %s", err) } d.SetId("") @@ -211,6 +370,10 @@ func expandAppautoscalingStepAdjustments(configured []interface{}) ([]*applicati if data["metric_interval_lower_bound"] != "" { bound := data["metric_interval_lower_bound"] switch bound := bound.(type) { + case float64: + if bound >= 0 { + a.MetricIntervalLowerBound = aws.Float64(bound) + } case string: f, err := strconv.ParseFloat(bound, 64) if err != nil { @@ -226,6 +389,10 @@ func expandAppautoscalingStepAdjustments(configured []interface{}) ([]*applicati if data["metric_interval_upper_bound"] != "" { bound := data["metric_interval_upper_bound"] switch bound := bound.(type) { + case float64: + if bound >= 0 { + a.MetricIntervalUpperBound = aws.Float64(bound) + } case string: f, err := strconv.ParseFloat(bound, 64) if err != nil { @@ -244,6 +411,59 @@ func expandAppautoscalingStepAdjustments(configured []interface{}) ([]*applicati return adjustments, nil } +func expandAppautoscalingCustomizedMetricSpecification(configured []interface{}) *applicationautoscaling.CustomizedMetricSpecification { + spec := &applicationautoscaling.CustomizedMetricSpecification{} + + for _, raw := range configured { + data := raw.(map[string]interface{}) + if v, ok := data["metric_name"]; ok { + spec.MetricName = aws.String(v.(string)) + } + + if v, ok := data["namespace"]; ok { + spec.Namespace = aws.String(v.(string)) + } + + if v, ok := data["unit"].(string); ok && v != "" { + spec.Unit = aws.String(v) + } + + if v, ok := data["statistic"]; ok { + spec.Statistic = aws.String(v.(string)) + } + + if s, ok := data["dimensions"].(*schema.Set); ok && s.Len() > 0 { + dimensions := make([]*applicationautoscaling.MetricDimension, s.Len(), s.Len()) + for i, d := range s.List() { + dimension := d.(map[string]interface{}) + dimensions[i] = &applicationautoscaling.MetricDimension{ + Name: aws.String(dimension["name"].(string)), + Value: aws.String(dimension["value"].(string)), + } + } + spec.Dimensions = dimensions + } + } + return spec +} + +func expandAppautoscalingPredefinedMetricSpecification(configured []interface{}) *applicationautoscaling.PredefinedMetricSpecification { + spec := &applicationautoscaling.PredefinedMetricSpecification{} + + for _, raw := range configured { + data := raw.(map[string]interface{}) + + if v, ok := data["predefined_metric_type"]; ok { + spec.PredefinedMetricType = aws.String(v.(string)) + } + + if v, ok := data["resource_label"].(string); ok && v != "" { + spec.ResourceLabel = aws.String(v) + } + } + return spec +} + func getAwsAppautoscalingPutScalingPolicyInput(d *schema.ResourceData) (applicationautoscaling.PutScalingPolicyInput, error) { var params = applicationautoscaling.PutScalingPolicyInput{ PolicyName: aws.String(d.Get("name").(string)), @@ -262,25 +482,78 @@ func getAwsAppautoscalingPutScalingPolicyInput(d *schema.ResourceData) (applicat params.ScalableDimension = aws.String(v.(string)) } - var adjustmentSteps []*applicationautoscaling.StepAdjustment - if v, ok := d.GetOk("step_adjustment"); ok { - steps, err := expandAppautoscalingStepAdjustments(v.(*schema.Set).List()) - if err != nil { - return params, fmt.Errorf("metric_interval_lower_bound and metric_interval_upper_bound must be strings!") + // Deprecated fields + // TODO: Remove in next major version + at, atOk := d.GetOk("adjustment_type") + cd, cdOk := d.GetOk("cooldown") + mat, matOk := d.GetOk("metric_aggregation_type") + mam, mamOk := d.GetOk("min_adjustment_magnitude") + sa, saOk := d.GetOk("step_adjustment") + if atOk || cdOk || matOk || mamOk || saOk { + cfg := &applicationautoscaling.StepScalingPolicyConfiguration{} + + if atOk { + cfg.AdjustmentType = aws.String(at.(string)) } - adjustmentSteps = steps + + if cdOk { + cfg.Cooldown = aws.Int64(int64(cd.(int))) + } + + if matOk { + cfg.MetricAggregationType = aws.String(mat.(string)) + } + + if saOk { + steps, err := expandAppautoscalingStepAdjustments(sa.(*schema.Set).List()) + if err != nil { + return params, fmt.Errorf("metric_interval_lower_bound and metric_interval_upper_bound must be strings!") + } + cfg.StepAdjustments = steps + } + + if mamOk { + cfg.MinAdjustmentMagnitude = aws.Int64(int64(mam.(int))) + } + + params.StepScalingPolicyConfiguration = cfg } - // build StepScalingPolicyConfiguration - params.StepScalingPolicyConfiguration = &applicationautoscaling.StepScalingPolicyConfiguration{ - AdjustmentType: aws.String(d.Get("adjustment_type").(string)), - Cooldown: aws.Int64(int64(d.Get("cooldown").(int))), - MetricAggregationType: aws.String(d.Get("metric_aggregation_type").(string)), - StepAdjustments: adjustmentSteps, + if v, ok := d.GetOk("step_scaling_policy_configuration"); ok { + params.StepScalingPolicyConfiguration = expandStepScalingPolicyConfiguration(v.([]interface{})) } - if v, ok := d.GetOk("min_adjustment_magnitude"); ok { - params.StepScalingPolicyConfiguration.MinAdjustmentMagnitude = aws.Int64(int64(v.(int))) + if l, ok := d.GetOk("target_tracking_scaling_policy_configuration"); ok { + v := l.([]interface{}) + if len(v) < 1 { + return params, fmt.Errorf("Empty target_tracking_scaling_policy_configuration block") + } + ttspCfg := v[0].(map[string]interface{}) + cfg := &applicationautoscaling.TargetTrackingScalingPolicyConfiguration{ + TargetValue: aws.Float64(ttspCfg["target_value"].(float64)), + } + + if v, ok := ttspCfg["scale_in_cooldown"]; ok { + cfg.ScaleInCooldown = aws.Int64(int64(v.(int))) + } + + if v, ok := ttspCfg["scale_out_cooldown"]; ok { + cfg.ScaleOutCooldown = aws.Int64(int64(v.(int))) + } + + if v, ok := ttspCfg["disable_scale_in"]; ok { + cfg.DisableScaleIn = aws.Bool(v.(bool)) + } + + if v, ok := ttspCfg["customized_metric_specification"].([]interface{}); ok && len(v) > 0 { + cfg.CustomizedMetricSpecification = expandAppautoscalingCustomizedMetricSpecification(v) + } + + if v, ok := ttspCfg["predefined_metric_specification"].([]interface{}); ok && len(v) > 0 { + cfg.PredefinedMetricSpecification = expandAppautoscalingPredefinedMetricSpecification(v) + } + + params.TargetTrackingScalingPolicyConfiguration = cfg } return params, nil @@ -301,17 +574,163 @@ func getAwsAppautoscalingPolicy(d *schema.ResourceData, meta interface{}) (*appl } // find scaling policy - name := d.Get("name") + name := d.Get("name").(string) + dimension := d.Get("scalable_dimension").(string) for idx, sp := range resp.ScalingPolicies { - if *sp.PolicyName == name { + if *sp.PolicyName == name && *sp.ScalableDimension == dimension { return resp.ScalingPolicies[idx], nil } } - // policy not found return nil, nil } +func expandStepScalingPolicyConfiguration(cfg []interface{}) *applicationautoscaling.StepScalingPolicyConfiguration { + if len(cfg) < 1 { + return nil + } + + out := &applicationautoscaling.StepScalingPolicyConfiguration{} + + m := cfg[0].(map[string]interface{}) + if v, ok := m["adjustment_type"]; ok { + out.AdjustmentType = aws.String(v.(string)) + } + if v, ok := m["cooldown"]; ok { + out.Cooldown = aws.Int64(int64(v.(int))) + } + if v, ok := m["metric_aggregation_type"]; ok { + out.MetricAggregationType = aws.String(v.(string)) + } + if v, ok := m["min_adjustment_magnitude"].(int); ok && v > 0 { + out.MinAdjustmentMagnitude = aws.Int64(int64(v)) + } + if v, ok := m["step_adjustment"].(*schema.Set); ok && v.Len() > 0 { + out.StepAdjustments, _ = expandAppautoscalingStepAdjustments(v.List()) + } + + return out +} + +func flattenStepScalingPolicyConfiguration(cfg *applicationautoscaling.StepScalingPolicyConfiguration) []interface{} { + if cfg == nil { + return []interface{}{} + } + + m := make(map[string]interface{}, 0) + + if cfg.AdjustmentType != nil { + m["adjustment_type"] = *cfg.AdjustmentType + } + if cfg.Cooldown != nil { + m["cooldown"] = *cfg.Cooldown + } + if cfg.MetricAggregationType != nil { + m["metric_aggregation_type"] = *cfg.MetricAggregationType + } + if cfg.MinAdjustmentMagnitude != nil { + m["min_adjustment_magnitude"] = *cfg.MinAdjustmentMagnitude + } + if cfg.StepAdjustments != nil { + m["step_adjustment"] = flattenAppautoscalingStepAdjustments(cfg.StepAdjustments) + } + + return []interface{}{m} +} + +func flattenAppautoscalingStepAdjustments(adjs []*applicationautoscaling.StepAdjustment) []interface{} { + out := make([]interface{}, len(adjs), len(adjs)) + + for i, adj := range adjs { + m := make(map[string]interface{}, 0) + + m["scaling_adjustment"] = *adj.ScalingAdjustment + + if adj.MetricIntervalLowerBound != nil { + m["metric_interval_lower_bound"] = *adj.MetricIntervalLowerBound + } + if adj.MetricIntervalUpperBound != nil { + m["metric_interval_upper_bound"] = *adj.MetricIntervalUpperBound + } + + out[i] = m + } + + return out +} + +func flattenTargetTrackingScalingPolicyConfiguration(cfg *applicationautoscaling.TargetTrackingScalingPolicyConfiguration) []interface{} { + if cfg == nil { + return []interface{}{} + } + + m := make(map[string]interface{}, 0) + m["target_value"] = *cfg.TargetValue + + if cfg.DisableScaleIn != nil { + m["disable_scale_in"] = *cfg.DisableScaleIn + } + if cfg.ScaleInCooldown != nil { + m["scale_in_cooldown"] = *cfg.ScaleInCooldown + } + if cfg.ScaleOutCooldown != nil { + m["scale_out_cooldown"] = *cfg.ScaleOutCooldown + } + if cfg.CustomizedMetricSpecification != nil { + m["customized_metric_specification"] = flattenCustomizedMetricSpecification(cfg.CustomizedMetricSpecification) + } + if cfg.PredefinedMetricSpecification != nil { + m["predefined_metric_specification"] = flattenPredefinedMetricSpecification(cfg.PredefinedMetricSpecification) + } + + return []interface{}{m} +} + +func flattenCustomizedMetricSpecification(cfg *applicationautoscaling.CustomizedMetricSpecification) []interface{} { + if cfg == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "metric_name": *cfg.MetricName, + "namespace": *cfg.Namespace, + "statistic": *cfg.Statistic, + } + + if len(cfg.Dimensions) > 0 { + m["dimensions"] = flattenMetricDimensions(cfg.Dimensions) + } + + if cfg.Unit != nil { + m["unit"] = *cfg.Unit + } + return []interface{}{m} +} + +func flattenMetricDimensions(ds []*applicationautoscaling.MetricDimension) []interface{} { + l := make([]interface{}, len(ds), len(ds)) + for i, d := range ds { + l[i] = map[string]interface{}{ + "name": *d.Name, + "value": *d.Value, + } + } + return l +} + +func flattenPredefinedMetricSpecification(cfg *applicationautoscaling.PredefinedMetricSpecification) []interface{} { + if cfg == nil { + return []interface{}{} + } + m := map[string]interface{}{ + "predefined_metric_type": *cfg.PredefinedMetricType, + } + if cfg.ResourceLabel != nil { + m["resource_label"] = *cfg.ResourceLabel + } + return []interface{}{m} +} + func resourceAwsAppautoscalingAdjustmentHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go index 2490f4d2d..8734d869f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go @@ -96,7 +96,9 @@ func resourceAwsAppautoscalingTargetCreate(d *schema.ResourceData, meta interfac func resourceAwsAppautoscalingTargetRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appautoscalingconn - t, err := getAwsAppautoscalingTarget(d, conn) + namespace := d.Get("service_namespace").(string) + dimension := d.Get("scalable_dimension").(string) + t, err := getAwsAppautoscalingTarget(d.Id(), namespace, dimension, conn) if err != nil { return err } @@ -119,7 +121,10 @@ func resourceAwsAppautoscalingTargetRead(d *schema.ResourceData, meta interface{ func resourceAwsAppautoscalingTargetDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appautoscalingconn - t, err := getAwsAppautoscalingTarget(d, conn) + namespace := d.Get("service_namespace").(string) + dimension := d.Get("scalable_dimension").(string) + + t, err := getAwsAppautoscalingTarget(d.Id(), namespace, dimension, conn) if err != nil { return err } @@ -153,7 +158,7 @@ func resourceAwsAppautoscalingTargetDelete(d *schema.ResourceData, meta interfac } return resource.Retry(5*time.Minute, func() *resource.RetryError { - if t, _ = getAwsAppautoscalingTarget(d, conn); t != nil { + if t, _ = getAwsAppautoscalingTarget(d.Id(), namespace, dimension, conn); t != nil { return resource.RetryableError( fmt.Errorf("Application AutoScaling Target still exists")) } @@ -161,14 +166,12 @@ func resourceAwsAppautoscalingTargetDelete(d *schema.ResourceData, meta interfac }) } -func getAwsAppautoscalingTarget( - d *schema.ResourceData, +func getAwsAppautoscalingTarget(resourceId, namespace, dimension string, conn *applicationautoscaling.ApplicationAutoScaling) (*applicationautoscaling.ScalableTarget, error) { - tgtName := d.Id() describeOpts := applicationautoscaling.DescribeScalableTargetsInput{ - ResourceIds: []*string{aws.String(tgtName)}, - ServiceNamespace: aws.String(d.Get("service_namespace").(string)), + ResourceIds: []*string{aws.String(resourceId)}, + ServiceNamespace: aws.String(namespace), } log.Printf("[DEBUG] Application AutoScaling Target describe configuration: %#v", describeOpts) @@ -181,7 +184,7 @@ func getAwsAppautoscalingTarget( } for idx, tgt := range describeTargets.ScalableTargets { - if *tgt.ResourceId == tgtName { + if *tgt.ResourceId == resourceId && *tgt.ScalableDimension == dimension { return describeTargets.ScalableTargets[idx], nil } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go new file mode 100644 index 000000000..fdef27aaa --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go @@ -0,0 +1,183 @@ +package aws + +import ( + "fmt" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/athena" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsAthenaDatabase() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAthenaDatabaseCreate, + Read: resourceAwsAthenaDatabaseRead, + Delete: resourceAwsAthenaDatabaseDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bucket": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).athenaconn + + input := &athena.StartQueryExecutionInput{ + QueryString: aws.String(fmt.Sprintf("create database %s;", d.Get("name").(string))), + ResultConfiguration: &athena.ResultConfiguration{ + OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), + }, + } + + resp, err := conn.StartQueryExecution(input) + if err != nil { + return err + } + + if err := executeAndExpectNoRowsWhenCreate(*resp.QueryExecutionId, d, conn); err != nil { + return err + } + d.SetId(d.Get("name").(string)) + return resourceAwsAthenaDatabaseRead(d, meta) +} + +func resourceAwsAthenaDatabaseRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).athenaconn + + bucket := d.Get("bucket").(string) + input := &athena.StartQueryExecutionInput{ + QueryString: aws.String(fmt.Sprint("show databases;")), + ResultConfiguration: &athena.ResultConfiguration{ + OutputLocation: aws.String("s3://" + bucket), + }, + } + + resp, err := conn.StartQueryExecution(input) + if err != nil { + return err + } + + if err := executeAndExpectMatchingRow(*resp.QueryExecutionId, d.Get("name").(string), conn); err != nil { + return err + } + return nil +} + +func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).athenaconn + + bucket := d.Get("bucket").(string) + input := &athena.StartQueryExecutionInput{ + QueryString: aws.String(fmt.Sprintf("drop database %s;", d.Get("name").(string))), + ResultConfiguration: &athena.ResultConfiguration{ + OutputLocation: aws.String("s3://" + bucket), + }, + } + + resp, err := conn.StartQueryExecution(input) + if err != nil { + return err + } + + if err := executeAndExpectNoRowsWhenDrop(*resp.QueryExecutionId, d, conn); err != nil { + return err + } + return nil +} + +func executeAndExpectNoRowsWhenCreate(qeid string, d *schema.ResourceData, conn *athena.Athena) error { + rs, err := queryExecutionResult(qeid, conn) + if err != nil { + return err + } + if len(rs.Rows) != 0 { + return fmt.Errorf("[ERROR] Athena create database, unexpected query result: %s", flattenAthenaResultSet(rs)) + } + return nil +} + +func executeAndExpectMatchingRow(qeid string, dbName string, conn *athena.Athena) error { + rs, err := queryExecutionResult(qeid, conn) + if err != nil { + return err + } + for _, row := range rs.Rows { + for _, datum := range row.Data { + if *datum.VarCharValue == dbName { + return nil + } + } + } + return fmt.Errorf("[ERROR] Athena not found database: %s, query result: %s", dbName, flattenAthenaResultSet(rs)) +} + +func executeAndExpectNoRowsWhenDrop(qeid string, d *schema.ResourceData, conn *athena.Athena) error { + rs, err := queryExecutionResult(qeid, conn) + if err != nil { + return err + } + if len(rs.Rows) != 0 { + return fmt.Errorf("[ERROR] Athena drop database, unexpected query result: %s", flattenAthenaResultSet(rs)) + } + return nil +} + +func queryExecutionResult(qeid string, conn *athena.Athena) (*athena.ResultSet, error) { + executionStateConf := &resource.StateChangeConf{ + Pending: []string{athena.QueryExecutionStateQueued, athena.QueryExecutionStateRunning}, + Target: []string{athena.QueryExecutionStateSucceeded}, + Refresh: queryExecutionStateRefreshFunc(qeid, conn), + Timeout: 10 * time.Minute, + Delay: 3 * time.Second, + MinTimeout: 3 * time.Second, + } + _, err := executionStateConf.WaitForState() + if err != nil { + return nil, err + } + + qrinput := &athena.GetQueryResultsInput{ + QueryExecutionId: aws.String(qeid), + } + resp, err := conn.GetQueryResults(qrinput) + if err != nil { + return nil, err + } + return resp.ResultSet, nil +} + +func queryExecutionStateRefreshFunc(qeid string, conn *athena.Athena) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &athena.GetQueryExecutionInput{ + QueryExecutionId: aws.String(qeid), + } + out, err := conn.GetQueryExecution(input) + if err != nil { + return nil, "failed", err + } + return out, *out.QueryExecution.Status.State, nil + } +} + +func flattenAthenaResultSet(rs *athena.ResultSet) string { + ss := make([]string, 0) + for _, row := range rs.Rows { + for _, datum := range row.Data { + ss = append(ss, *datum.VarCharValue) + } + } + return strings.Join(ss, "\n") +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go new file mode 100644 index 000000000..34392df1e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go @@ -0,0 +1,91 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/athena" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsAthenaNamedQuery() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAthenaNamedQueryCreate, + Read: resourceAwsAthenaNamedQueryRead, + Delete: resourceAwsAthenaNamedQueryDelete, + + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "query": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "database": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsAthenaNamedQueryCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).athenaconn + + input := &athena.CreateNamedQueryInput{ + Database: aws.String(d.Get("database").(string)), + Name: aws.String(d.Get("name").(string)), + QueryString: aws.String(d.Get("query").(string)), + } + if raw, ok := d.GetOk("description"); ok { + input.Description = aws.String(raw.(string)) + } + + resp, err := conn.CreateNamedQuery(input) + if err != nil { + return err + } + d.SetId(*resp.NamedQueryId) + return resourceAwsAthenaNamedQueryRead(d, meta) +} + +func resourceAwsAthenaNamedQueryRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).athenaconn + + input := &athena.GetNamedQueryInput{ + NamedQueryId: aws.String(d.Id()), + } + + _, err := conn.GetNamedQuery(input) + if err != nil { + if isAWSErr(err, athena.ErrCodeInvalidRequestException, d.Id()) { + d.SetId("") + return nil + } + return err + } + return nil +} + +func resourceAwsAthenaNamedQueryDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).athenaconn + + input := &athena.DeleteNamedQueryInput{ + NamedQueryId: aws.String(d.Id()), + } + + _, err := conn.DeleteNamedQuery(input) + if err != nil { + return err + } + d.SetId("") + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_compute_environment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_compute_environment.go new file mode 100644 index 000000000..859280bf1 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_compute_environment.go @@ -0,0 +1,439 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/batch" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsBatchComputeEnvironment() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsBatchComputeEnvironmentCreate, + Read: resourceAwsBatchComputeEnvironmentRead, + Update: resourceAwsBatchComputeEnvironmentUpdate, + Delete: resourceAwsBatchComputeEnvironmentDelete, + + Schema: map[string]*schema.Schema{ + "compute_environment_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateBatchName, + }, + "compute_resources": { + Type: schema.TypeList, + Optional: true, + MinItems: 0, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bid_percentage": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + "desired_vcpus": { + Type: schema.TypeInt, + Optional: true, + }, + "ec2_key_pair": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "image_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "instance_role": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + "instance_type": { + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "max_vcpus": { + Type: schema.TypeInt, + Required: true, + }, + "min_vcpus": { + Type: schema.TypeInt, + Required: true, + }, + "security_group_ids": { + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "spot_iam_fleet_role": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + "subnets": { + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "tags": tagsSchema(), + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{batch.CRTypeEc2, batch.CRTypeSpot}, true), + }, + }, + }, + }, + "service_role": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "state": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{batch.CEStateEnabled, batch.CEStateDisabled}, true), + Default: batch.CEStateEnabled, + }, + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{batch.CETypeManaged, batch.CETypeUnmanaged}, true), + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "ecc_cluster_arn": { + Type: schema.TypeString, + Computed: true, + Deprecated: "Use ecs_cluster_arn instead", + }, + "ecs_cluster_arn": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "status_reason": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsBatchComputeEnvironmentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + computeEnvironmentName := d.Get("compute_environment_name").(string) + + serviceRole := d.Get("service_role").(string) + computeEnvironmentType := d.Get("type").(string) + + input := &batch.CreateComputeEnvironmentInput{ + ComputeEnvironmentName: aws.String(computeEnvironmentName), + ServiceRole: aws.String(serviceRole), + Type: aws.String(computeEnvironmentType), + } + + if v, ok := d.GetOk("state"); ok { + input.State = aws.String(v.(string)) + } + + if computeEnvironmentType == batch.CETypeManaged { + computeResources := d.Get("compute_resources").([]interface{}) + if len(computeResources) == 0 { + return fmt.Errorf("One compute environment is expected, but no compute environments are set") + } + computeResource := computeResources[0].(map[string]interface{}) + + instanceRole := computeResource["instance_role"].(string) + maxvCpus := int64(computeResource["max_vcpus"].(int)) + minvCpus := int64(computeResource["min_vcpus"].(int)) + computeResourceType := computeResource["type"].(string) + + var instanceTypes []*string + for _, v := range computeResource["instance_type"].(*schema.Set).List() { + instanceTypes = append(instanceTypes, aws.String(v.(string))) + } + + var securityGroupIds []*string + for _, v := range computeResource["security_group_ids"].(*schema.Set).List() { + securityGroupIds = append(securityGroupIds, aws.String(v.(string))) + } + + var subnets []*string + for _, v := range computeResource["subnets"].(*schema.Set).List() { + subnets = append(subnets, aws.String(v.(string))) + } + + input.ComputeResources = &batch.ComputeResource{ + InstanceRole: aws.String(instanceRole), + InstanceTypes: instanceTypes, + MaxvCpus: aws.Int64(maxvCpus), + MinvCpus: aws.Int64(minvCpus), + SecurityGroupIds: securityGroupIds, + Subnets: subnets, + Type: aws.String(computeResourceType), + } + + if v, ok := computeResource["bid_percentage"]; ok { + input.ComputeResources.BidPercentage = aws.Int64(int64(v.(int))) + } + if v, ok := computeResource["desired_vcpus"]; ok { + input.ComputeResources.DesiredvCpus = aws.Int64(int64(v.(int))) + } + if v, ok := computeResource["ec2_key_pair"]; ok { + input.ComputeResources.Ec2KeyPair = aws.String(v.(string)) + } + if v, ok := computeResource["image_id"]; ok { + input.ComputeResources.ImageId = aws.String(v.(string)) + } + if v, ok := computeResource["spot_iam_fleet_role"]; ok { + input.ComputeResources.SpotIamFleetRole = aws.String(v.(string)) + } + if v, ok := computeResource["tags"]; ok { + input.ComputeResources.Tags = tagsFromMapGeneric(v.(map[string]interface{})) + } + } + + log.Printf("[DEBUG] Create compute environment %s.\n", input) + + if _, err := conn.CreateComputeEnvironment(input); err != nil { + return err + } + + d.SetId(computeEnvironmentName) + + stateConf := &resource.StateChangeConf{ + Pending: []string{batch.CEStatusCreating}, + Target: []string{batch.CEStatusValid}, + Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 5 * time.Second, + } + if _, err := stateConf.WaitForState(); err != nil { + return err + } + + return resourceAwsBatchComputeEnvironmentRead(d, meta) +} + +func resourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + computeEnvironmentName := d.Get("compute_environment_name").(string) + + input := &batch.DescribeComputeEnvironmentsInput{ + ComputeEnvironments: []*string{ + aws.String(computeEnvironmentName), + }, + } + + log.Printf("[DEBUG] Read compute environment %s.\n", input) + + result, err := conn.DescribeComputeEnvironments(input) + if err != nil { + return err + } + + if len(result.ComputeEnvironments) == 0 { + return fmt.Errorf("One compute environment is expected, but AWS return no compute environment") + } + computeEnvironment := result.ComputeEnvironments[0] + + d.Set("service_role", computeEnvironment.ServiceRole) + d.Set("state", computeEnvironment.State) + d.Set("type", computeEnvironment.Type) + + if *(computeEnvironment.Type) == "MANAGED" { + d.Set("compute_resources", flattenComputeResources(computeEnvironment.ComputeResources)) + } + + d.Set("arn", computeEnvironment.ComputeEnvironmentArn) + d.Set("ecc_cluster_arn", computeEnvironment.EcsClusterArn) + d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn) + d.Set("status", computeEnvironment.Status) + d.Set("status_reason", computeEnvironment.StatusReason) + + return nil +} + +func flattenComputeResources(computeResource *batch.ComputeResource) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + m := make(map[string]interface{}) + + m["bid_percentage"] = computeResource.BidPercentage + m["desired_vcpus"] = computeResource.DesiredvCpus + m["ec2_key_pair"] = computeResource.Ec2KeyPair + m["image_id"] = computeResource.ImageId + m["instance_role"] = computeResource.InstanceRole + m["instance_type"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.InstanceTypes)) + m["max_vcpus"] = computeResource.MaxvCpus + m["min_vcpus"] = computeResource.MinvCpus + m["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.SecurityGroupIds)) + m["spot_iam_fleet_role"] = computeResource.SpotIamFleetRole + m["subnets"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.Subnets)) + m["tags"] = tagsToMapGeneric(computeResource.Tags) + m["type"] = computeResource.Type + + result = append(result, m) + return result +} + +func resourceAwsBatchComputeEnvironmentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + computeEnvironmentName := d.Get("compute_environment_name").(string) + + updateInput := &batch.UpdateComputeEnvironmentInput{ + ComputeEnvironment: aws.String(computeEnvironmentName), + State: aws.String(batch.CEStateDisabled), + } + + log.Printf("[DEBUG] Delete compute environment %s.\n", updateInput) + + if _, err := conn.UpdateComputeEnvironment(updateInput); err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{batch.CEStatusUpdating}, + Target: []string{batch.CEStatusValid}, + Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutDelete), + MinTimeout: 5 * time.Second, + } + if _, err := stateConf.WaitForState(); err != nil { + return err + } + + input := &batch.DeleteComputeEnvironmentInput{ + ComputeEnvironment: aws.String(computeEnvironmentName), + } + + if _, err := conn.DeleteComputeEnvironment(input); err != nil { + return err + } + + stateConfForDelete := &resource.StateChangeConf{ + Pending: []string{batch.CEStatusDeleting}, + Target: []string{batch.CEStatusDeleted}, + Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutDelete), + MinTimeout: 5 * time.Second, + } + if _, err := stateConfForDelete.WaitForState(); err != nil { + return err + } + + d.SetId("") + + return nil +} + +func resourceAwsBatchComputeEnvironmentUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + computeEnvironmentName := d.Get("compute_environment_name").(string) + + input := &batch.UpdateComputeEnvironmentInput{ + ComputeEnvironment: aws.String(computeEnvironmentName), + ComputeResources: &batch.ComputeResourceUpdate{}, + } + + if d.HasChange("service_role") { + input.ServiceRole = aws.String(d.Get("service_role").(string)) + } + if d.HasChange("state") { + input.ServiceRole = aws.String(d.Get("state").(string)) + } + + if d.HasChange("compute_resources") { + computeResources := d.Get("compute_resources").([]interface{}) + if len(computeResources) == 0 { + return fmt.Errorf("One compute environment is expected, but no compute environments are set") + } + computeResource := computeResources[0].(map[string]interface{}) + + input.ComputeResources.DesiredvCpus = aws.Int64(int64(computeResource["desired_vcpus"].(int))) + input.ComputeResources.MaxvCpus = aws.Int64(int64(computeResource["max_vcpus"].(int))) + input.ComputeResources.MinvCpus = aws.Int64(int64(computeResource["min_vcpus"].(int))) + } + + log.Printf("[DEBUG] Update compute environment %s.\n", input) + + if _, err := conn.UpdateComputeEnvironment(input); err != nil { + return err + } + + return resourceAwsBatchComputeEnvironmentRead(d, meta) +} + +func resourceAwsBatchComputeEnvironmentStatusRefreshFunc(d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + conn := meta.(*AWSClient).batchconn + + computeEnvironmentName := d.Get("compute_environment_name").(string) + + result, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{ + ComputeEnvironments: []*string{ + aws.String(computeEnvironmentName), + }, + }) + if err != nil { + return nil, "failed", err + } + + if len(result.ComputeEnvironments) == 0 { + return nil, "failed", fmt.Errorf("One compute environment is expected, but AWS return no compute environment") + } + + computeEnvironment := result.ComputeEnvironments[0] + return result, *(computeEnvironment.Status), nil + } +} + +func resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + conn := meta.(*AWSClient).batchconn + + computeEnvironmentName := d.Get("compute_environment_name").(string) + + result, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{ + ComputeEnvironments: []*string{ + aws.String(computeEnvironmentName), + }, + }) + if err != nil { + return nil, "failed", err + } + + if len(result.ComputeEnvironments) == 0 { + return result, batch.CEStatusDeleted, nil + } + + computeEnvironment := result.ComputeEnvironments[0] + return result, *(computeEnvironment.Status), nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go new file mode 100644 index 000000000..0bea6ff8e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go @@ -0,0 +1,211 @@ +package aws + +import ( + "fmt" + + "encoding/json" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/batch" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsBatchJobDefinition() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsBatchJobDefinitionCreate, + Read: resourceAwsBatchJobDefinitionRead, + Delete: resourceAwsBatchJobDefinitionDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateBatchName, + }, + "container_properties": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + StateFunc: func(v interface{}) string { + json, _ := normalizeJsonString(v) + return json + }, + DiffSuppressFunc: suppressEquivalentJsonDiffs, + ValidateFunc: validateAwsBatchJobContainerProperties, + }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + Elem: schema.TypeString, + }, + "retry_strategy": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "attempts": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{batch.JobDefinitionTypeContainer}, true), + }, + "revision": { + Type: schema.TypeInt, + Computed: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsBatchJobDefinitionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + name := d.Get("name").(string) + + input := &batch.RegisterJobDefinitionInput{ + JobDefinitionName: aws.String(name), + Type: aws.String(d.Get("type").(string)), + } + + if v, ok := d.GetOk("container_properties"); ok { + props, err := expandBatchJobContainerProperties(v.(string)) + if err != nil { + return fmt.Errorf("%s %q", err, name) + } + input.ContainerProperties = props + } + + if v, ok := d.GetOk("parameters"); ok { + input.Parameters = expandJobDefinitionParameters(v.(map[string]interface{})) + } + + if v, ok := d.GetOk("retry_strategy"); ok { + input.RetryStrategy = expandJobDefinitionRetryStrategy(v.([]interface{})) + } + + out, err := conn.RegisterJobDefinition(input) + if err != nil { + return fmt.Errorf("%s %q", err, name) + } + d.SetId(*out.JobDefinitionArn) + d.Set("arn", out.JobDefinitionArn) + return resourceAwsBatchJobDefinitionRead(d, meta) +} + +func resourceAwsBatchJobDefinitionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + arn := d.Get("arn").(string) + job, err := getJobDefinition(conn, arn) + if err != nil { + return fmt.Errorf("%s %q", err, arn) + } + if job == nil { + d.SetId("") + return nil + } + d.Set("arn", job.JobDefinitionArn) + d.Set("container_properties", job.ContainerProperties) + d.Set("parameters", aws.StringValueMap(job.Parameters)) + d.Set("retry_strategy", flattenRetryStrategy(job.RetryStrategy)) + d.Set("revision", job.Revision) + d.Set("type", job.Type) + return nil +} + +func resourceAwsBatchJobDefinitionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + arn := d.Get("arn").(string) + _, err := conn.DeregisterJobDefinition(&batch.DeregisterJobDefinitionInput{ + JobDefinition: aws.String(arn), + }) + if err != nil { + return fmt.Errorf("%s %q", err, arn) + } + d.SetId("") + return nil +} + +func getJobDefinition(conn *batch.Batch, arn string) (*batch.JobDefinition, error) { + describeOpts := &batch.DescribeJobDefinitionsInput{ + JobDefinitions: []*string{aws.String(arn)}, + } + resp, err := conn.DescribeJobDefinitions(describeOpts) + if err != nil { + return nil, err + } + + numJobDefinitions := len(resp.JobDefinitions) + switch { + case numJobDefinitions == 0: + return nil, nil + case numJobDefinitions == 1: + if *resp.JobDefinitions[0].Status == "ACTIVE" { + return resp.JobDefinitions[0], nil + } + return nil, nil + case numJobDefinitions > 1: + return nil, fmt.Errorf("Multiple Job Definitions with name %s", arn) + } + return nil, nil +} + +func validateAwsBatchJobContainerProperties(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + _, err := expandBatchJobContainerProperties(value) + if err != nil { + errors = append(errors, fmt.Errorf("AWS Batch Job container_properties is invalid: %s", err)) + } + return +} + +func expandBatchJobContainerProperties(rawProps string) (*batch.ContainerProperties, error) { + var props *batch.ContainerProperties + + err := json.Unmarshal([]byte(rawProps), &props) + if err != nil { + return nil, fmt.Errorf("Error decoding JSON: %s", err) + } + + return props, nil +} + +func expandJobDefinitionParameters(params map[string]interface{}) map[string]*string { + var jobParams = make(map[string]*string) + for k, v := range params { + jobParams[k] = aws.String(v.(string)) + } + + return jobParams +} + +func expandJobDefinitionRetryStrategy(item []interface{}) *batch.RetryStrategy { + data := item[0].(map[string]interface{}) + return &batch.RetryStrategy{ + Attempts: aws.Int64(int64(data["attempts"].(int))), + } +} + +func flattenRetryStrategy(item *batch.RetryStrategy) []map[string]interface{} { + data := []map[string]interface{}{} + if item != nil { + data = append(data, map[string]interface{}{ + "attempts": item.Attempts, + }) + } + return data +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go new file mode 100644 index 000000000..0a0fd5de0 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go @@ -0,0 +1,242 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/batch" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsBatchJobQueue() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsBatchJobQueueCreate, + Read: resourceAwsBatchJobQueueRead, + Update: resourceAwsBatchJobQueueUpdate, + Delete: resourceAwsBatchJobQueueDelete, + + Schema: map[string]*schema.Schema{ + "compute_environments": { + Type: schema.TypeList, + Required: true, + MaxItems: 3, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateBatchName, + }, + "priority": { + Type: schema.TypeInt, + Required: true, + }, + "state": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{batch.JQStateDisabled, batch.JQStateEnabled}, true), + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsBatchJobQueueCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + input := batch.CreateJobQueueInput{ + ComputeEnvironmentOrder: createComputeEnvironmentOrder(d.Get("compute_environments").([]interface{})), + JobQueueName: aws.String(d.Get("name").(string)), + Priority: aws.Int64(int64(d.Get("priority").(int))), + State: aws.String(d.Get("state").(string)), + } + name := d.Get("name").(string) + out, err := conn.CreateJobQueue(&input) + if err != nil { + return fmt.Errorf("%s %q", err, name) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{batch.JQStatusCreating, batch.JQStatusUpdating}, + Target: []string{batch.JQStatusValid}, + Refresh: batchJobQueueRefreshStatusFunc(conn, name), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("[WARN] Error waiting for JobQueue state to be \"VALID\": %s", err) + } + + arn := *out.JobQueueArn + log.Printf("[DEBUG] JobQueue created: %s", arn) + d.SetId(arn) + + return resourceAwsBatchJobQueueRead(d, meta) +} + +func resourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + jq, err := getJobQueue(conn, d.Get("name").(string)) + if err != nil { + return err + } + if jq == nil { + return fmt.Errorf("[WARN] Error reading JobQueue: \"%s\"", err) + } + d.Set("arn", jq.JobQueueArn) + d.Set("compute_environments", jq.ComputeEnvironmentOrder) + d.Set("name", jq.JobQueueName) + d.Set("priority", jq.Priority) + d.Set("state", jq.State) + return nil +} + +func resourceAwsBatchJobQueueUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + name := d.Get("name").(string) + updateInput := &batch.UpdateJobQueueInput{ + ComputeEnvironmentOrder: createComputeEnvironmentOrder(d.Get("compute_environments").([]interface{})), + JobQueue: aws.String(name), + Priority: aws.Int64(int64(d.Get("priority").(int))), + State: aws.String(d.Get("state").(string)), + } + _, err := conn.UpdateJobQueue(updateInput) + if err != nil { + return err + } + stateConf := &resource.StateChangeConf{ + Pending: []string{batch.JQStatusUpdating}, + Target: []string{batch.JQStatusValid}, + Refresh: batchJobQueueRefreshStatusFunc(conn, name), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + return err + } + return resourceAwsBatchJobQueueRead(d, meta) +} + +func resourceAwsBatchJobQueueDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + sn := d.Get("name").(string) + _, err := conn.UpdateJobQueue(&batch.UpdateJobQueueInput{ + JobQueue: aws.String(sn), + State: aws.String(batch.JQStateDisabled), + }) + if err != nil { + return err + } + + // Wait until the Job Queue is disabled before deleting + stateConf := &resource.StateChangeConf{ + Pending: []string{batch.JQStatusUpdating}, + Target: []string{batch.JQStatusValid}, + Refresh: batchJobQueueRefreshStatusFunc(conn, sn), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return err + } + + log.Printf("[DEBUG] Trying to delete Job Queue %s", sn) + _, err = conn.DeleteJobQueue(&batch.DeleteJobQueueInput{ + JobQueue: aws.String(sn), + }) + if err == nil { + return nil + } + + deleteStateConf := &resource.StateChangeConf{ + Pending: []string{batch.JQStateDisabled, batch.JQStatusDeleting}, + Target: []string{batch.JQStatusDeleted}, + Refresh: batchJobQueueRefreshStatusFunc(conn, sn), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, err = deleteStateConf.WaitForState() + if err != nil { + return fmt.Errorf( + "Error waiting for Job Queue (%s) to be deleted: %s", + sn, err) + } + d.SetId("") + return nil +} + +func createComputeEnvironmentOrder(order []interface{}) (envs []*batch.ComputeEnvironmentOrder) { + for i, env := range order { + envs = append(envs, &batch.ComputeEnvironmentOrder{ + Order: aws.Int64(int64(i)), + ComputeEnvironment: aws.String(env.(string)), + }) + } + return +} + +func getJobQueue(conn *batch.Batch, sn string) (*batch.JobQueueDetail, error) { + describeOpts := &batch.DescribeJobQueuesInput{ + JobQueues: []*string{aws.String(sn)}, + } + resp, err := conn.DescribeJobQueues(describeOpts) + if err != nil { + return nil, err + } + + numJobQueues := len(resp.JobQueues) + switch { + case numJobQueues == 0: + log.Printf("[DEBUG] Job Queue %q is already gone", sn) + return nil, nil + case numJobQueues == 1: + return resp.JobQueues[0], nil + case numJobQueues > 1: + return nil, fmt.Errorf("Multiple Job Queues with name %s", sn) + } + return nil, nil +} + +func batchJobQueueRefreshStatusFunc(conn *batch.Batch, sn string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + ce, err := getJobQueue(conn, sn) + if err != nil { + return nil, "failed", err + } + if ce == nil { + return 42, batch.JQStatusDeleted, nil + } + return ce, *ce.Status, nil + } +} + +func batchJobQueueRefreshStateFunc(conn *batch.Batch, sn string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + ce, err := getJobQueue(conn, sn) + if err != nil { + return nil, "failed", err + } + if ce == nil { + return 42, batch.JQStateDisabled, nil + } + return ce, *ce.State, nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go index c1bf53ec4..eeda93285 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go @@ -484,7 +484,7 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { "minimum_protocol_version": { Type: schema.TypeString, Optional: true, - Default: "SSLv3", + Default: "TLSv1", }, "ssl_support_method": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go index e2237a5ed..5e347b8d1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go @@ -267,7 +267,7 @@ func resourceAwsCloudTrailUpdate(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG] Updating CloudTrail: %s", input) var t *cloudtrail.UpdateTrailOutput - err := resource.Retry(15*time.Second, func() *resource.RetryError { + err := resource.Retry(30*time.Second, func() *resource.RetryError { var err error t, err = conn.UpdateTrail(&input) if err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go index 1678bc645..15561a760 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go @@ -101,6 +101,25 @@ func resourceAwsCloudWatchEventTarget() *schema.Resource { }, }, }, + + "input_transformer": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "input_paths": { + Type: schema.TypeMap, + Optional: true, + }, + "input_template": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 8192), + }, + }, + }, + }, }, } } @@ -190,11 +209,16 @@ func resourceAwsCloudWatchEventTargetRead(d *schema.ResourceData, meta interface } } + if t.InputTransformer != nil { + if err := d.Set("input_transformer", flattenAwsCloudWatchInputTransformer(t.InputTransformer)); err != nil { + return fmt.Errorf("[DEBUG] Error setting input_transformer error: %#v", err) + } + } + return nil } -func findEventTargetById(id, rule string, nextToken *string, conn *events.CloudWatchEvents) ( - *events.Target, error) { +func findEventTargetById(id, rule string, nextToken *string, conn *events.CloudWatchEvents) (*events.Target, error) { input := events.ListTargetsByRuleInput{ Rule: aws.String(rule), NextToken: nextToken, @@ -276,6 +300,10 @@ func buildPutTargetInputStruct(d *schema.ResourceData) *events.PutTargetsInput { e.EcsParameters = expandAwsCloudWatchEventTargetEcsParameters(v.([]interface{})) } + if v, ok := d.GetOk("input_transformer"); ok { + e.InputTransformer = expandAwsCloudWatchEventTransformerParameters(v.([]interface{})) + } + input := events.PutTargetsInput{ Rule: aws.String(d.Get("rule").(string)), Targets: []*events.Target{e}, @@ -316,6 +344,25 @@ func expandAwsCloudWatchEventTargetEcsParameters(config []interface{}) *events.E return ecsParameters } +func expandAwsCloudWatchEventTransformerParameters(config []interface{}) *events.InputTransformer { + transformerParameters := &events.InputTransformer{} + + inputPathsMaps := map[string]*string{} + + for _, c := range config { + param := c.(map[string]interface{}) + inputPaths := param["input_paths"].(map[string]interface{}) + + for k, v := range inputPaths { + inputPathsMaps[k] = aws.String(v.(string)) + } + transformerParameters.InputTemplate = aws.String(param["input_template"].(string)) + } + transformerParameters.InputPathsMap = inputPathsMaps + + return transformerParameters +} + func flattenAwsCloudWatchEventTargetRunParameters(runCommand *events.RunCommandParameters) []map[string]interface{} { result := make([]map[string]interface{}, 0) @@ -337,3 +384,16 @@ func flattenAwsCloudWatchEventTargetEcsParameters(ecsParameters *events.EcsParam result := []map[string]interface{}{config} return result } + +func flattenAwsCloudWatchInputTransformer(inputTransformer *events.InputTransformer) []map[string]interface{} { + config := make(map[string]interface{}) + inputPathsMap := make(map[string]string) + for k, v := range inputTransformer.InputPathsMap { + inputPathsMap[k] = *v + } + config["input_template"] = *inputTransformer.InputTemplate + config["input_paths"] = inputPathsMap + + result := []map[string]interface{}{config} + return result +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go index a4ca7b753..5132d97fc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go @@ -45,6 +45,11 @@ func resourceAwsCloudWatchLogGroup() *schema.Resource { Default: 0, }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + }, + "arn": { Type: schema.TypeString, Computed: true, @@ -69,9 +74,15 @@ func resourceAwsCloudWatchLogGroupCreate(d *schema.ResourceData, meta interface{ log.Printf("[DEBUG] Creating CloudWatch Log Group: %s", logGroupName) - _, err := conn.CreateLogGroup(&cloudwatchlogs.CreateLogGroupInput{ + params := &cloudwatchlogs.CreateLogGroupInput{ LogGroupName: aws.String(logGroupName), - }) + } + + if v, ok := d.GetOk("kms_key_id"); ok { + params.KmsKeyId = aws.String(v.(string)) + } + + _, err := conn.CreateLogGroup(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceAlreadyExistsException" { return fmt.Errorf("Creating CloudWatch Log Group failed: %s: The CloudWatch Log Group '%s' already exists.", err, d.Get("name").(string)) @@ -104,6 +115,7 @@ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{}) d.Set("arn", lg.Arn) d.Set("name", lg.LogGroupName) + d.Set("kms_key_id", lg.KmsKeyId) if lg.RetentionInDays != nil { d.Set("retention_in_days", lg.RetentionInDays) @@ -147,7 +159,7 @@ func lookupCloudWatchLogGroup(conn *cloudwatchlogs.CloudWatchLogs, func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudwatchlogsconn - name := d.Get("name").(string) + name := d.Id() log.Printf("[DEBUG] Updating CloudWatch Log Group: %q", name) if d.HasChange("retention_in_days") { @@ -203,6 +215,27 @@ func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{ } } + if d.HasChange("kms_key_id") && !d.IsNewResource() { + _, newKey := d.GetChange("kms_key_id") + + if newKey.(string) == "" { + _, err := conn.DisassociateKmsKey(&cloudwatchlogs.DisassociateKmsKeyInput{ + LogGroupName: aws.String(name), + }) + if err != nil { + return err + } + } else { + _, err := conn.AssociateKmsKey(&cloudwatchlogs.AssociateKmsKeyInput{ + LogGroupName: aws.String(name), + KmsKeyId: aws.String(newKey.(string)), + }) + if err != nil { + return err + } + } + } + return resourceAwsCloudWatchLogGroupRead(d, meta) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go index 943472f85..f87751ad2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go @@ -21,17 +21,17 @@ func resourceAwsCloudWatchLogMetricFilter() *schema.Resource { Delete: resourceAwsCloudWatchLogMetricFilterDelete, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: validateLogMetricFilterName, }, - "pattern": &schema.Schema{ + "pattern": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(512), + ValidateFunc: validateMaxLength(1024), StateFunc: func(v interface{}) string { s, ok := v.(string) if !ok { @@ -41,34 +41,38 @@ func resourceAwsCloudWatchLogMetricFilter() *schema.Resource { }, }, - "log_group_name": &schema.Schema{ + "log_group_name": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: validateLogGroupName, }, - "metric_transformation": &schema.Schema{ + "metric_transformation": { Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, ValidateFunc: validateLogMetricFilterTransformationName, }, - "namespace": &schema.Schema{ + "namespace": { Type: schema.TypeString, Required: true, ValidateFunc: validateLogMetricFilterTransformationName, }, - "value": &schema.Schema{ + "value": { Type: schema.TypeString, Required: true, ValidateFunc: validateMaxLength(100), }, + "default_value": { + Type: schema.TypeFloat, + Optional: true, + }, }, }, }, @@ -87,10 +91,14 @@ func resourceAwsCloudWatchLogMetricFilterUpdate(d *schema.ResourceData, meta int transformations := d.Get("metric_transformation").([]interface{}) o := transformations[0].(map[string]interface{}) - input.MetricTransformations = expandCloudWachLogMetricTransformations(o) + metricsTransformations, err := expandCloudWachLogMetricTransformations(o) + if err != nil { + return err + } + input.MetricTransformations = metricsTransformations log.Printf("[DEBUG] Creating/Updating CloudWatch Log Metric Filter: %s", input) - _, err := conn.PutMetricFilter(&input) + _, err = conn.PutMetricFilter(&input) if err != nil { return fmt.Errorf("Creating/Updating CloudWatch Log Metric Filter failed: %s", err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go index 4a6d17211..a45ae2094 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go @@ -52,6 +52,92 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { }, }, + "deployment_style": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "deployment_option": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateDeploymentOption, + }, + + "deployment_type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateDeploymentType, + }, + }, + }, + }, + + "blue_green_deployment_config": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "deployment_ready_option": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action_on_timeout": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateDeploymentReadyOption, + }, + "wait_time_in_minutes": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + + "green_fleet_provisioning_option": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateGreenFleetProvisioningOption, + }, + }, + }, + }, + + "terminate_blue_instances_on_deployment_success": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateBlueInstanceTerminationOption, + }, + "termination_wait_time_in_minutes": &schema.Schema{ + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + "service_role_arn": &schema.Schema{ Type: schema.TypeString, Required: true, @@ -85,6 +171,44 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { }, }, + "load_balancer_info": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "elb_info": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Set: loadBalancerInfoHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "target_group_info": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Set: loadBalancerInfoHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + "auto_rollback_configuration": &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -220,20 +344,29 @@ func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta int DeploymentGroupName: aws.String(deploymentGroup), ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), } + + if attr, ok := d.GetOk("deployment_style"); ok { + input.DeploymentStyle = expandDeploymentStyle(attr.([]interface{})) + } + if attr, ok := d.GetOk("deployment_config_name"); ok { input.DeploymentConfigName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("autoscaling_groups"); ok { input.AutoScalingGroups = expandStringList(attr.(*schema.Set).List()) } + if attr, ok := d.GetOk("on_premises_instance_tag_filter"); ok { onPremFilters := buildOnPremTagFilters(attr.(*schema.Set).List()) input.OnPremisesInstanceTagFilters = onPremFilters } + if attr, ok := d.GetOk("ec2_tag_filter"); ok { ec2TagFilters := buildEC2TagFilters(attr.(*schema.Set).List()) input.Ec2TagFilters = ec2TagFilters } + if attr, ok := d.GetOk("trigger_configuration"); ok { triggerConfigs := buildTriggerConfigs(attr.(*schema.Set).List()) input.TriggerConfigurations = triggerConfigs @@ -247,6 +380,14 @@ func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta int input.AlarmConfiguration = buildAlarmConfig(attr.([]interface{})) } + if attr, ok := d.GetOk("load_balancer_info"); ok { + input.LoadBalancerInfo = expandLoadBalancerInfo(attr.([]interface{})) + } + + if attr, ok := d.GetOk("blue_green_deployment_config"); ok { + input.BlueGreenDeploymentConfiguration = expandBlueGreenDeploymentConfig(attr.([]interface{})) + } + // Retry to handle IAM role eventual consistency. var resp *codedeploy.CreateDeploymentGroupOutput var err error @@ -309,12 +450,19 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter d.Set("deployment_config_name", resp.DeploymentGroupInfo.DeploymentConfigName) d.Set("deployment_group_name", resp.DeploymentGroupInfo.DeploymentGroupName) d.Set("service_role_arn", resp.DeploymentGroupInfo.ServiceRoleArn) + + if err := d.Set("deployment_style", flattenDeploymentStyle(resp.DeploymentGroupInfo.DeploymentStyle)); err != nil { + return err + } + if err := d.Set("ec2_tag_filter", ec2TagFiltersToMap(resp.DeploymentGroupInfo.Ec2TagFilters)); err != nil { return err } + if err := d.Set("on_premises_instance_tag_filter", onPremisesTagFiltersToMap(resp.DeploymentGroupInfo.OnPremisesInstanceTagFilters)); err != nil { return err } + if err := d.Set("trigger_configuration", triggerConfigsToMap(resp.DeploymentGroupInfo.TriggerConfigurations)); err != nil { return err } @@ -327,6 +475,14 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter return err } + if err := d.Set("load_balancer_info", flattenLoadBalancerInfo(resp.DeploymentGroupInfo.LoadBalancerInfo)); err != nil { + return err + } + + if err := d.Set("blue_green_deployment_config", flattenBlueGreenDeploymentConfig(resp.DeploymentGroupInfo.BlueGreenDeploymentConfiguration)); err != nil { + return err + } + return nil } @@ -343,26 +499,35 @@ func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta int _, n := d.GetChange("autoscaling_groups") input.AutoScalingGroups = expandStringList(n.(*schema.Set).List()) } + if d.HasChange("deployment_config_name") { _, n := d.GetChange("deployment_config_name") input.DeploymentConfigName = aws.String(n.(string)) } + if d.HasChange("deployment_group_name") { _, n := d.GetChange("deployment_group_name") input.NewDeploymentGroupName = aws.String(n.(string)) } + if d.HasChange("deployment_style") { + _, n := d.GetChange("deployment_style") + input.DeploymentStyle = expandDeploymentStyle(n.([]interface{})) + } + // TagFilters aren't like tags. They don't append. They simply replace. if d.HasChange("on_premises_instance_tag_filter") { _, n := d.GetChange("on_premises_instance_tag_filter") onPremFilters := buildOnPremTagFilters(n.(*schema.Set).List()) input.OnPremisesInstanceTagFilters = onPremFilters } + if d.HasChange("ec2_tag_filter") { _, n := d.GetChange("ec2_tag_filter") ec2Filters := buildEC2TagFilters(n.(*schema.Set).List()) input.Ec2TagFilters = ec2Filters } + if d.HasChange("trigger_configuration") { _, n := d.GetChange("trigger_configuration") triggerConfigs := buildTriggerConfigs(n.(*schema.Set).List()) @@ -379,6 +544,16 @@ func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta int input.AlarmConfiguration = buildAlarmConfig(n.([]interface{})) } + if d.HasChange("load_balancer_info") { + _, n := d.GetChange("load_balancer_info") + input.LoadBalancerInfo = expandLoadBalancerInfo(n.([]interface{})) + } + + if d.HasChange("blue_green_deployment_config") { + _, n := d.GetChange("blue_green_deployment_config") + input.BlueGreenDeploymentConfiguration = expandBlueGreenDeploymentConfig(n.([]interface{})) + } + log.Printf("[DEBUG] Updating CodeDeploy DeploymentGroup %s", d.Id()) // Retry to handle IAM role eventual consistency. err := resource.Retry(5*time.Minute, func() *resource.RetryError { @@ -538,6 +713,134 @@ func buildAlarmConfig(configured []interface{}) *codedeploy.AlarmConfiguration { return result } +// expandDeploymentStyle converts a raw schema list containing a map[string]interface{} +// into a single codedeploy.DeploymentStyle object +func expandDeploymentStyle(list []interface{}) *codedeploy.DeploymentStyle { + if len(list) == 0 || list[0] == nil { + return nil + } + + style := list[0].(map[string]interface{}) + result := &codedeploy.DeploymentStyle{} + + if v, ok := style["deployment_option"]; ok { + result.DeploymentOption = aws.String(v.(string)) + } + if v, ok := style["deployment_type"]; ok { + result.DeploymentType = aws.String(v.(string)) + } + + return result +} + +// expandLoadBalancerInfo converts a raw schema list containing a map[string]interface{} +// into a single codedeploy.LoadBalancerInfo object +func expandLoadBalancerInfo(list []interface{}) *codedeploy.LoadBalancerInfo { + if len(list) == 0 || list[0] == nil { + return nil + } + + lbInfo := list[0].(map[string]interface{}) + loadBalancerInfo := &codedeploy.LoadBalancerInfo{} + + if attr, ok := lbInfo["elb_info"]; ok { + elbs := attr.(*schema.Set).List() + loadBalancerInfo.ElbInfoList = make([]*codedeploy.ELBInfo, 0, len(elbs)) + + for _, v := range elbs { + elb := v.(map[string]interface{}) + name, ok := elb["name"].(string) + if !ok { + continue + } + + loadBalancerInfo.ElbInfoList = append(loadBalancerInfo.ElbInfoList, &codedeploy.ELBInfo{ + Name: aws.String(name), + }) + } + } + + if attr, ok := lbInfo["target_group_info"]; ok { + targetGroups := attr.(*schema.Set).List() + loadBalancerInfo.TargetGroupInfoList = make([]*codedeploy.TargetGroupInfo, 0, len(targetGroups)) + + for _, v := range targetGroups { + targetGroup := v.(map[string]interface{}) + name, ok := targetGroup["name"].(string) + if !ok { + continue + } + + loadBalancerInfo.TargetGroupInfoList = append(loadBalancerInfo.TargetGroupInfoList, &codedeploy.TargetGroupInfo{ + Name: aws.String(name), + }) + } + } + + return loadBalancerInfo +} + +// expandBlueGreenDeploymentConfig converts a raw schema list containing a map[string]interface{} +// into a single codedeploy.BlueGreenDeploymentConfiguration object +func expandBlueGreenDeploymentConfig(list []interface{}) *codedeploy.BlueGreenDeploymentConfiguration { + if len(list) == 0 || list[0] == nil { + return nil + } + + config := list[0].(map[string]interface{}) + blueGreenDeploymentConfig := &codedeploy.BlueGreenDeploymentConfiguration{} + + if attr, ok := config["deployment_ready_option"]; ok { + a := attr.([]interface{}) + + if len(a) > 0 && a[0] != nil { + m := a[0].(map[string]interface{}) + + deploymentReadyOption := &codedeploy.DeploymentReadyOption{} + if v, ok := m["action_on_timeout"]; ok { + deploymentReadyOption.ActionOnTimeout = aws.String(v.(string)) + } + if v, ok := m["wait_time_in_minutes"]; ok { + deploymentReadyOption.WaitTimeInMinutes = aws.Int64(int64(v.(int))) + } + blueGreenDeploymentConfig.DeploymentReadyOption = deploymentReadyOption + } + } + + if attr, ok := config["green_fleet_provisioning_option"]; ok { + a := attr.([]interface{}) + + if len(a) > 0 && a[0] != nil { + m := a[0].(map[string]interface{}) + + greenFleetProvisioningOption := &codedeploy.GreenFleetProvisioningOption{} + if v, ok := m["action"]; ok { + greenFleetProvisioningOption.Action = aws.String(v.(string)) + } + blueGreenDeploymentConfig.GreenFleetProvisioningOption = greenFleetProvisioningOption + } + } + + if attr, ok := config["terminate_blue_instances_on_deployment_success"]; ok { + a := attr.([]interface{}) + + if len(a) > 0 && a[0] != nil { + m := a[0].(map[string]interface{}) + + blueInstanceTerminationOption := &codedeploy.BlueInstanceTerminationOption{} + if v, ok := m["action"]; ok { + blueInstanceTerminationOption.Action = aws.String(v.(string)) + } + if v, ok := m["termination_wait_time_in_minutes"]; ok { + blueInstanceTerminationOption.TerminationWaitTimeInMinutes = aws.Int64(int64(v.(int))) + } + blueGreenDeploymentConfig.TerminateBlueInstancesOnDeploymentSuccess = blueInstanceTerminationOption + } + } + + return blueGreenDeploymentConfig +} + // ec2TagFiltersToMap converts lists of tag filters into a []map[string]string. func ec2TagFiltersToMap(list []*codedeploy.EC2TagFilter) []map[string]string { result := make([]map[string]string, 0, len(list)) @@ -630,6 +933,116 @@ func alarmConfigToMap(config *codedeploy.AlarmConfiguration) []map[string]interf return result } +// flattenDeploymentStyle converts a codedeploy.DeploymentStyle object +// into a []map[string]interface{} list containing a single item +func flattenDeploymentStyle(style *codedeploy.DeploymentStyle) []map[string]interface{} { + if style == nil { + return nil + } + + item := make(map[string]interface{}) + if style.DeploymentOption != nil { + item["deployment_option"] = *style.DeploymentOption + } + if style.DeploymentType != nil { + item["deployment_type"] = *style.DeploymentType + } + + result := make([]map[string]interface{}, 0, 1) + result = append(result, item) + return result +} + +// flattenLoadBalancerInfo converts a codedeploy.LoadBalancerInfo object +// into a []map[string]interface{} list containing a single item +func flattenLoadBalancerInfo(loadBalancerInfo *codedeploy.LoadBalancerInfo) []map[string]interface{} { + if loadBalancerInfo == nil { + return nil + } + + elbs := make([]interface{}, 0, len(loadBalancerInfo.ElbInfoList)) + for _, elb := range loadBalancerInfo.ElbInfoList { + if elb.Name == nil { + continue + } + item := make(map[string]interface{}) + item["name"] = *elb.Name + elbs = append(elbs, item) + } + + targetGroups := make([]interface{}, 0, len(loadBalancerInfo.TargetGroupInfoList)) + for _, targetGroup := range loadBalancerInfo.TargetGroupInfoList { + if targetGroup.Name == nil { + continue + } + item := make(map[string]interface{}) + item["name"] = *targetGroup.Name + targetGroups = append(targetGroups, item) + } + + lbInfo := make(map[string]interface{}) + lbInfo["elb_info"] = schema.NewSet(loadBalancerInfoHash, elbs) + lbInfo["target_group_info"] = schema.NewSet(loadBalancerInfoHash, targetGroups) + + result := make([]map[string]interface{}, 0, 1) + result = append(result, lbInfo) + return result +} + +// flattenBlueGreenDeploymentConfig converts a codedeploy.BlueGreenDeploymentConfiguration object +// into a []map[string]interface{} list containing a single item +func flattenBlueGreenDeploymentConfig(config *codedeploy.BlueGreenDeploymentConfiguration) []map[string]interface{} { + + if config == nil { + return nil + } + + m := make(map[string]interface{}) + + if config.DeploymentReadyOption != nil { + a := make([]map[string]interface{}, 0) + deploymentReadyOption := make(map[string]interface{}) + + if config.DeploymentReadyOption.ActionOnTimeout != nil { + deploymentReadyOption["action_on_timeout"] = *config.DeploymentReadyOption.ActionOnTimeout + } + if config.DeploymentReadyOption.WaitTimeInMinutes != nil { + deploymentReadyOption["wait_time_in_minutes"] = *config.DeploymentReadyOption.WaitTimeInMinutes + } + + m["deployment_ready_option"] = append(a, deploymentReadyOption) + } + + if config.GreenFleetProvisioningOption != nil { + b := make([]map[string]interface{}, 0) + greenFleetProvisioningOption := make(map[string]interface{}) + + if config.GreenFleetProvisioningOption.Action != nil { + greenFleetProvisioningOption["action"] = *config.GreenFleetProvisioningOption.Action + } + + m["green_fleet_provisioning_option"] = append(b, greenFleetProvisioningOption) + } + + if config.TerminateBlueInstancesOnDeploymentSuccess != nil { + c := make([]map[string]interface{}, 0) + blueInstanceTerminationOption := make(map[string]interface{}) + + if config.TerminateBlueInstancesOnDeploymentSuccess.Action != nil { + blueInstanceTerminationOption["action"] = *config.TerminateBlueInstancesOnDeploymentSuccess.Action + } + if config.TerminateBlueInstancesOnDeploymentSuccess.TerminationWaitTimeInMinutes != nil { + blueInstanceTerminationOption["termination_wait_time_in_minutes"] = *config.TerminateBlueInstancesOnDeploymentSuccess.TerminationWaitTimeInMinutes + } + + m["terminate_blue_instances_on_deployment_success"] = append(c, blueInstanceTerminationOption) + } + + list := make([]map[string]interface{}, 0) + list = append(list, m) + return list +} + func resourceAwsCodeDeployTagFilterHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) @@ -670,6 +1083,21 @@ func resourceAwsCodeDeployTriggerConfigHash(v interface{}) int { return hashcode.String(buf.String()) } +func loadBalancerInfoHash(v interface{}) int { + var buf bytes.Buffer + + if v == nil { + return hashcode.String(buf.String()) + } + + m := v.(map[string]interface{}) + if v, ok := m["name"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + + return hashcode.String(buf.String()) +} + func validateTriggerEvent(v interface{}, k string) (ws []string, errors []error) { value := v.(string) triggerEvents := map[string]bool{ @@ -688,3 +1116,68 @@ func validateTriggerEvent(v interface{}, k string) (ws []string, errors []error) } return } + +func validateDeploymentOption(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + validOptions := map[string]bool{ + "WITH_TRAFFIC_CONTROL": true, + "WITHOUT_TRAFFIC_CONTROL": true, + } + + if !validOptions[value] { + errors = append(errors, fmt.Errorf("%q must be a valid deployment option: %q", k, value)) + } + return +} + +func validateDeploymentType(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + validTypes := map[string]bool{ + "IN_PLACE": true, + "BLUE_GREEN": true, + } + + if !validTypes[value] { + errors = append(errors, fmt.Errorf("%q must be a valid deployment type: %q", k, value)) + } + return +} + +func validateDeploymentReadyOption(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + validOptions := map[string]bool{ + "CONTINUE_DEPLOYMENT": true, + "STOP_DEPLOYMENT": true, + } + + if !validOptions[value] { + errors = append(errors, fmt.Errorf("%q must be a valid deployment_ready_option:action_on_timeout value: %q", k, value)) + } + return +} + +func validateGreenFleetProvisioningOption(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + validOptions := map[string]bool{ + "DISCOVER_EXISTING": true, + "COPY_AUTO_SCALING_GROUP": true, + } + + if !validOptions[value] { + errors = append(errors, fmt.Errorf("%q must be a valid green_fleet_provisioning_option:action value: %q", k, value)) + } + return +} + +func validateBlueInstanceTerminationOption(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + validOptions := map[string]bool{ + "TERMINATE": true, + "KEEP_ALIVE": true, + } + + if !validOptions[value] { + errors = append(errors, fmt.Errorf("%q must be a valid terminate_blue_instances_on_deployment_success:action value: %q", k, value)) + } + return +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go index b85472cf9..a4629b399 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go @@ -155,28 +155,20 @@ func resourceAwsCognitoIdentityPoolRead(d *schema.ResourceData, meta interface{} d.Set("allow_unauthenticated_identities", ip.AllowUnauthenticatedIdentities) d.Set("developer_provider_name", ip.DeveloperProviderName) - if ip.CognitoIdentityProviders != nil { - if err := d.Set("cognito_identity_providers", flattenCognitoIdentityProviders(ip.CognitoIdentityProviders)); err != nil { - return fmt.Errorf("[DEBUG] Error setting cognito_identity_providers error: %#v", err) - } + if err := d.Set("cognito_identity_providers", flattenCognitoIdentityProviders(ip.CognitoIdentityProviders)); err != nil { + return fmt.Errorf("[DEBUG] Error setting cognito_identity_providers error: %#v", err) } - if ip.OpenIdConnectProviderARNs != nil { - if err := d.Set("openid_connect_provider_arns", flattenStringList(ip.OpenIdConnectProviderARNs)); err != nil { - return fmt.Errorf("[DEBUG] Error setting openid_connect_provider_arns error: %#v", err) - } + if err := d.Set("openid_connect_provider_arns", flattenStringList(ip.OpenIdConnectProviderARNs)); err != nil { + return fmt.Errorf("[DEBUG] Error setting openid_connect_provider_arns error: %#v", err) } - if ip.SamlProviderARNs != nil { - if err := d.Set("saml_provider_arns", flattenStringList(ip.SamlProviderARNs)); err != nil { - return fmt.Errorf("[DEBUG] Error setting saml_provider_arns error: %#v", err) - } + if err := d.Set("saml_provider_arns", flattenStringList(ip.SamlProviderARNs)); err != nil { + return fmt.Errorf("[DEBUG] Error setting saml_provider_arns error: %#v", err) } - if ip.SupportedLoginProviders != nil { - if err := d.Set("supported_login_providers", flattenCognitoSupportedLoginProviders(ip.SupportedLoginProviders)); err != nil { - return fmt.Errorf("[DEBUG] Error setting supported_login_providers error: %#v", err) - } + if err := d.Set("supported_login_providers", flattenCognitoSupportedLoginProviders(ip.SupportedLoginProviders)); err != nil { + return fmt.Errorf("[DEBUG] Error setting supported_login_providers error: %#v", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go new file mode 100644 index 000000000..5030331b9 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go @@ -0,0 +1,285 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "bytes" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/cognitoidentity" + "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCognitoIdentityPoolRolesAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCognitoIdentityPoolRolesAttachmentCreate, + Read: resourceAwsCognitoIdentityPoolRolesAttachmentRead, + Update: resourceAwsCognitoIdentityPoolRolesAttachmentUpdate, + Delete: resourceAwsCognitoIdentityPoolRolesAttachmentDelete, + + Schema: map[string]*schema.Schema{ + "identity_pool_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "role_mapping": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "identity_provider": { + Type: schema.TypeString, + Required: true, + }, + "ambiguous_role_resolution": { + Type: schema.TypeString, + ValidateFunc: validateCognitoRoleMappingsAmbiguousRoleResolution, + Optional: true, // Required if Type equals Token or Rules. + }, + "mapping_rule": { + Type: schema.TypeList, + Optional: true, + MaxItems: 25, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "claim": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateCognitoRoleMappingsRulesClaim, + }, + "match_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateCognitoRoleMappingsRulesMatchType, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "value": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateCognitoRoleMappingsRulesValue, + }, + }, + }, + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateCognitoRoleMappingsType, + }, + }, + }, + }, + + "roles": { + Type: schema.TypeMap, + Required: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authenticated": { + Type: schema.TypeString, + ValidateFunc: validateArn, + Optional: true, // Required if unauthenticated isn't defined. + }, + "unauthenticated": { + Type: schema.TypeString, + ValidateFunc: validateArn, + Optional: true, // Required if authenticated isn't defined. + }, + }, + }, + }, + }, + } +} + +func resourceAwsCognitoIdentityPoolRolesAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoconn + + // Validates role keys to be either authenticated or unauthenticated, + // since ValidateFunc validates only the value not the key. + if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{}), "roles"); len(errors) > 0 { + return fmt.Errorf("Error validating Roles: %v", errors) + } + + params := &cognitoidentity.SetIdentityPoolRolesInput{ + IdentityPoolId: aws.String(d.Get("identity_pool_id").(string)), + Roles: expandCognitoIdentityPoolRoles(d.Get("roles").(map[string]interface{})), + } + + if v, ok := d.GetOk("role_mapping"); ok { + errors := validateRoleMappings(v.(*schema.Set).List()) + + if len(errors) > 0 { + return fmt.Errorf("Error validating ambiguous role resolution: %v", errors) + } + + params.RoleMappings = expandCognitoIdentityPoolRoleMappingsAttachment(v.(*schema.Set).List()) + } + + log.Printf("[DEBUG] Creating Cognito Identity Pool Roles Association: %#v", params) + _, err := conn.SetIdentityPoolRoles(params) + if err != nil { + return fmt.Errorf("Error creating Cognito Identity Pool Roles Association: %s", err) + } + + d.SetId(d.Get("identity_pool_id").(string)) + + return resourceAwsCognitoIdentityPoolRolesAttachmentRead(d, meta) +} + +func resourceAwsCognitoIdentityPoolRolesAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoconn + log.Printf("[DEBUG] Reading Cognito Identity Pool Roles Association: %s", d.Id()) + + ip, err := conn.GetIdentityPoolRoles(&cognitoidentity.GetIdentityPoolRolesInput{ + IdentityPoolId: aws.String(d.Get("identity_pool_id").(string)), + }) + if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { + log.Printf("[WARN] Cognito Identity Pool Roles Association %s not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if err := d.Set("roles", flattenCognitoIdentityPoolRoles(ip.Roles)); err != nil { + return fmt.Errorf("[DEBUG] Error setting roles error: %#v", err) + } + + if err := d.Set("role_mapping", flattenCognitoIdentityPoolRoleMappingsAttachment(ip.RoleMappings)); err != nil { + return fmt.Errorf("[DEBUG] Error setting role mappings error: %#v", err) + } + + return nil +} + +func resourceAwsCognitoIdentityPoolRolesAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoconn + + // Validates role keys to be either authenticated or unauthenticated, + // since ValidateFunc validates only the value not the key. + if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{}), "roles"); len(errors) > 0 { + return fmt.Errorf("Error validating Roles: %v", errors) + } + + params := &cognitoidentity.SetIdentityPoolRolesInput{ + IdentityPoolId: aws.String(d.Get("identity_pool_id").(string)), + Roles: expandCognitoIdentityPoolRoles(d.Get("roles").(map[string]interface{})), + } + + if d.HasChange("role_mapping") { + v, ok := d.GetOk("role_mapping") + var mappings []interface{} + + if ok { + errors := validateRoleMappings(v.(*schema.Set).List()) + + if len(errors) > 0 { + return fmt.Errorf("Error validating ambiguous role resolution: %v", errors) + } + mappings = v.(*schema.Set).List() + } else { + mappings = []interface{}{} + } + + params.RoleMappings = expandCognitoIdentityPoolRoleMappingsAttachment(mappings) + } + + log.Printf("[DEBUG] Updating Cognito Identity Pool Roles Association: %#v", params) + _, err := conn.SetIdentityPoolRoles(params) + if err != nil { + return fmt.Errorf("Error updating Cognito Identity Pool Roles Association: %s", err) + } + + d.SetId(d.Get("identity_pool_id").(string)) + + return resourceAwsCognitoIdentityPoolRolesAttachmentRead(d, meta) +} + +func resourceAwsCognitoIdentityPoolRolesAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoconn + log.Printf("[DEBUG] Deleting Cognito Identity Pool Roles Association: %s", d.Id()) + + return resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.SetIdentityPoolRoles(&cognitoidentity.SetIdentityPoolRolesInput{ + IdentityPoolId: aws.String(d.Get("identity_pool_id").(string)), + Roles: expandCognitoIdentityPoolRoles(make(map[string]interface{})), + RoleMappings: expandCognitoIdentityPoolRoleMappingsAttachment([]interface{}{}), + }) + + if err == nil { + return nil + } + + return resource.NonRetryableError(err) + }) +} + +// Validating that each role_mapping ambiguous_role_resolution +// is defined when "type" equals Token or Rules. +func validateRoleMappings(roleMappings []interface{}) []error { + errors := make([]error, 0) + + for _, r := range roleMappings { + rm := r.(map[string]interface{}) + + // If Type equals "Token" or "Rules", ambiguous_role_resolution must be defined. + // This should be removed as soon as we can have a ValidateFuncAgainst callable on the schema. + if err := validateCognitoRoleMappingsAmbiguousRoleResolutionAgainstType(rm); len(err) > 0 { + errors = append(errors, fmt.Errorf("Role Mapping %q: %v", rm["identity_provider"].(string), err)) + } + + // Validating that Rules Configuration is defined when Type equals Rules + // but not defined when Type equals Token. + if err := validateCognitoRoleMappingsRulesConfiguration(rm); len(err) > 0 { + errors = append(errors, fmt.Errorf("Role Mapping %q: %v", rm["identity_provider"].(string), err)) + } + } + + return errors +} + +func cognitoRoleMappingHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%s-", m["identity_provider"].(string))) + + return hashcode.String(buf.String()) +} + +func cognitoRoleMappingValueHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) + if d, ok := m["ambiguous_role_resolution"]; ok { + buf.WriteString(fmt.Sprintf("%s-", d.(string))) + } + + return hashcode.String(buf.String()) +} + +func cognitoRoleMappingRulesConfigurationHash(v interface{}) int { + var buf bytes.Buffer + for _, rule := range v.([]interface{}) { + r := rule.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%s-", r["claim"].(string))) + buf.WriteString(fmt.Sprintf("%s-", r["match_type"].(string))) + buf.WriteString(fmt.Sprintf("%s-", r["role_arn"].(string))) + buf.WriteString(fmt.Sprintf("%s-", r["value"].(string))) + } + + return hashcode.String(buf.String()) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go index f2ab24c4a..92001bdec 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go @@ -19,7 +19,7 @@ func resourceAwsDbSnapshot() *schema.Resource { Delete: resourceAwsDbSnapshotDelete, Timeouts: &schema.ResourceTimeout{ - Read: schema.DefaultTimeout(10 * time.Minute), + Read: schema.DefaultTimeout(20 * time.Minute), }, Schema: map[string]*schema.Schema{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go index 4b484a596..54d583998 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go @@ -25,57 +25,60 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { Read: resourceAwsDirectoryServiceDirectoryRead, Update: resourceAwsDirectoryServiceDirectoryUpdate, Delete: resourceAwsDirectoryServiceDirectoryDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "password": &schema.Schema{ + "password": { Type: schema.TypeString, Required: true, ForceNew: true, Sensitive: true, }, - "size": &schema.Schema{ + "size": { Type: schema.TypeString, Optional: true, Default: "Large", ForceNew: true, }, - "alias": &schema.Schema{ + "alias": { Type: schema.TypeString, Optional: true, Computed: true, ForceNew: true, }, - "description": &schema.Schema{ + "description": { Type: schema.TypeString, Optional: true, ForceNew: true, }, - "short_name": &schema.Schema{ + "short_name": { Type: schema.TypeString, Optional: true, Computed: true, ForceNew: true, }, "tags": tagsSchema(), - "vpc_settings": &schema.Schema{ + "vpc_settings": { Type: schema.TypeList, Optional: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "subnet_ids": &schema.Schema{ + "subnet_ids": { Type: schema.TypeSet, Required: true, ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, }, - "vpc_id": &schema.Schema{ + "vpc_id": { Type: schema.TypeString, Required: true, ForceNew: true, @@ -83,32 +86,32 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { }, }, }, - "connect_settings": &schema.Schema{ + "connect_settings": { Type: schema.TypeList, Optional: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "customer_username": &schema.Schema{ + "customer_username": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "customer_dns_ips": &schema.Schema{ + "customer_dns_ips": { Type: schema.TypeSet, Required: true, ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, }, - "subnet_ids": &schema.Schema{ + "subnet_ids": { Type: schema.TypeSet, Required: true, ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, }, - "vpc_id": &schema.Schema{ + "vpc_id": { Type: schema.TypeString, Required: true, ForceNew: true, @@ -116,22 +119,22 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { }, }, }, - "enable_sso": &schema.Schema{ + "enable_sso": { Type: schema.TypeBool, Optional: true, Default: false, }, - "access_url": &schema.Schema{ + "access_url": { Type: schema.TypeString, Computed: true, }, - "dns_ip_addresses": &schema.Schema{ + "dns_ip_addresses": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, Computed: true, }, - "type": &schema.Schema{ + "type": { Type: schema.TypeString, Optional: true, Default: "SimpleAD", diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go new file mode 100644 index 000000000..6074c395b --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go @@ -0,0 +1,117 @@ +package aws + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxConnection() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxConnectionCreate, + Read: resourceAwsDxConnectionRead, + Delete: resourceAwsDxConnectionDelete, + + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bandwidth": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateDxConnectionBandWidth, + }, + "location": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsDxConnectionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + input := &directconnect.CreateConnectionInput{ + Bandwidth: aws.String(d.Get("bandwidth").(string)), + ConnectionName: aws.String(d.Get("name").(string)), + Location: aws.String(d.Get("location").(string)), + } + resp, err := conn.CreateConnection(input) + if err != nil { + return err + } + d.SetId(*resp.ConnectionId) + return resourceAwsDxConnectionRead(d, meta) +} + +func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + connectionId := d.Id() + input := &directconnect.DescribeConnectionsInput{ + ConnectionId: aws.String(connectionId), + } + resp, err := conn.DescribeConnections(input) + if err != nil { + return err + } + if len(resp.Connections) < 1 { + d.SetId("") + return nil + } + if len(resp.Connections) != 1 { + return fmt.Errorf("[ERROR] Number of DX Connection (%s) isn't one, got %d", connectionId, len(resp.Connections)) + } + if d.Id() != *resp.Connections[0].ConnectionId { + return fmt.Errorf("[ERROR] DX Connection (%s) not found", connectionId) + } + return nil +} + +func resourceAwsDxConnectionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + input := &directconnect.DeleteConnectionInput{ + ConnectionId: aws.String(d.Id()), + } + _, err := conn.DeleteConnection(input) + if err != nil { + return err + } + deleteStateConf := &resource.StateChangeConf{ + Pending: []string{directconnect.ConnectionStatePending, directconnect.ConnectionStateOrdering, directconnect.ConnectionStateAvailable, directconnect.ConnectionStateRequested, directconnect.ConnectionStateDeleting}, + Target: []string{directconnect.ConnectionStateDeleted}, + Refresh: dxConnectionRefreshStateFunc(conn, d.Id()), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + _, err = deleteStateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Dx Connection (%s) to be deleted: %s", d.Id(), err) + } + d.SetId("") + return nil +} + +func dxConnectionRefreshStateFunc(conn *directconnect.DirectConnect, connId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &directconnect.DescribeConnectionsInput{ + ConnectionId: aws.String(connId), + } + resp, err := conn.DescribeConnections(input) + if err != nil { + return nil, "failed", err + } + return resp, *resp.Connections[0].ConnectionState, nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go new file mode 100644 index 000000000..89dd99111 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go @@ -0,0 +1,163 @@ +package aws + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxLag() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxLagCreate, + Read: resourceAwsDxLagRead, + Update: resourceAwsDxLagUpdate, + Delete: resourceAwsDxLagDelete, + + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "connections_bandwidth": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateDxConnectionBandWidth, + }, + "location": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "number_of_connections": &schema.Schema{ + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "force_destroy": &schema.Schema{ + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func resourceAwsDxLagCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + input := &directconnect.CreateLagInput{ + ConnectionsBandwidth: aws.String(d.Get("connections_bandwidth").(string)), + LagName: aws.String(d.Get("name").(string)), + Location: aws.String(d.Get("location").(string)), + NumberOfConnections: aws.Int64(int64(d.Get("number_of_connections").(int))), + } + resp, err := conn.CreateLag(input) + if err != nil { + return err + } + d.SetId(*resp.LagId) + return resourceAwsDxLagRead(d, meta) +} + +func resourceAwsDxLagRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + lagId := d.Id() + input := &directconnect.DescribeLagsInput{ + LagId: aws.String(lagId), + } + resp, err := conn.DescribeLags(input) + if err != nil { + return err + } + if len(resp.Lags) < 1 { + d.SetId("") + return nil + } + if len(resp.Lags) != 1 { + return fmt.Errorf("[ERROR] Number of DX Lag (%s) isn't one, got %d", lagId, len(resp.Lags)) + } + if d.Id() != *resp.Lags[0].LagId { + return fmt.Errorf("[ERROR] DX Lag (%s) not found", lagId) + } + return nil +} + +func resourceAwsDxLagUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + input := &directconnect.UpdateLagInput{ + LagId: aws.String(d.Id()), + } + if d.HasChange("name") { + input.LagName = aws.String(d.Get("name").(string)) + } + _, err := conn.UpdateLag(input) + if err != nil { + return err + } + return nil +} + +func resourceAwsDxLagDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + if d.Get("force_destroy").(bool) { + input := &directconnect.DescribeLagsInput{ + LagId: aws.String(d.Id()), + } + resp, err := conn.DescribeLags(input) + if err != nil { + return err + } + lag := resp.Lags[0] + for _, v := range lag.Connections { + dcinput := &directconnect.DeleteConnectionInput{ + ConnectionId: v.ConnectionId, + } + if _, err := conn.DeleteConnection(dcinput); err != nil { + return err + } + } + } + + input := &directconnect.DeleteLagInput{ + LagId: aws.String(d.Id()), + } + _, err := conn.DeleteLag(input) + if err != nil { + return err + } + deleteStateConf := &resource.StateChangeConf{ + Pending: []string{directconnect.LagStateAvailable, directconnect.LagStateRequested, directconnect.LagStatePending, directconnect.LagStateDeleting}, + Target: []string{directconnect.LagStateDeleted}, + Refresh: dxLagRefreshStateFunc(conn, d.Id()), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + _, err = deleteStateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Dx Lag (%s) to be deleted: %s", d.Id(), err) + } + d.SetId("") + return nil +} + +func dxLagRefreshStateFunc(conn *directconnect.DirectConnect, lagId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &directconnect.DescribeLagsInput{ + LagId: aws.String(lagId), + } + resp, err := conn.DescribeLags(input) + if err != nil { + return nil, "failed", err + } + return resp, *resp.Lags[0].LagState, nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go index 1d558cf45..b33b940a0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go @@ -703,7 +703,11 @@ func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) erro return err } - table := result.Table + return flattenAwsDynamoDbTableResource(d, meta, result.Table) +} + +func flattenAwsDynamoDbTableResource(d *schema.ResourceData, meta interface{}, table *dynamodb.TableDescription) error { + dynamodbconn := meta.(*AWSClient).dynamodbconn d.Set("write_capacity", table.ProvisionedThroughput.WriteCapacityUnits) d.Set("read_capacity", table.ProvisionedThroughput.ReadCapacityUnits) @@ -753,7 +757,7 @@ func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) erro lsiList = append(lsiList, lsi) } - err = d.Set("local_secondary_index", lsiList) + err := d.Set("local_secondary_index", lsiList) if err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go new file mode 100644 index 000000000..ebc0942df --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go @@ -0,0 +1,101 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/ecr" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsEcrLifecyclePolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEcrLifecyclePolicyCreate, + Read: resourceAwsEcrLifecyclePolicyRead, + Delete: resourceAwsEcrLifecyclePolicyDelete, + + Schema: map[string]*schema.Schema{ + "repository": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "policy": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateJsonString, + }, + "registry_id": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsEcrLifecyclePolicyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ecrconn + + input := &ecr.PutLifecyclePolicyInput{ + RepositoryName: aws.String(d.Get("repository").(string)), + LifecyclePolicyText: aws.String(d.Get("policy").(string)), + } + + resp, err := conn.PutLifecyclePolicy(input) + if err != nil { + return err + } + d.SetId(*resp.RepositoryName) + d.Set("registry_id", resp.RegistryId) + return resourceAwsEcrLifecyclePolicyRead(d, meta) +} + +func resourceAwsEcrLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ecrconn + + input := &ecr.GetLifecyclePolicyInput{ + RegistryId: aws.String(d.Get("registry_id").(string)), + RepositoryName: aws.String(d.Get("repository").(string)), + } + + _, err := conn.GetLifecyclePolicy(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case ecr.ErrCodeRepositoryNotFoundException, ecr.ErrCodeLifecyclePolicyNotFoundException: + d.SetId("") + return nil + default: + return err + } + } + return err + } + + return nil +} + +func resourceAwsEcrLifecyclePolicyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ecrconn + + input := &ecr.DeleteLifecyclePolicyInput{ + RegistryId: aws.String(d.Get("registry_id").(string)), + RepositoryName: aws.String(d.Get("repository").(string)), + } + + _, err := conn.DeleteLifecyclePolicy(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case ecr.ErrCodeRepositoryNotFoundException, ecr.ErrCodeLifecyclePolicyNotFoundException: + d.SetId("") + return nil + default: + return err + } + } + return err + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go index fa082472b..cb283a7ba 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go @@ -2,8 +2,6 @@ package aws import ( "bytes" - "crypto/sha1" - "encoding/hex" "fmt" "log" "strings" @@ -20,6 +18,9 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { Read: resourceAwsEcsTaskDefinitionRead, Delete: resourceAwsEcsTaskDefinitionDelete, + SchemaVersion: 1, + MigrateState: resourceAwsEcsTaskDefinitionMigrateState, + Schema: map[string]*schema.Schema{ "arn": { Type: schema.TypeString, @@ -42,8 +43,12 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { Required: true, ForceNew: true, StateFunc: func(v interface{}) string { - hash := sha1.Sum([]byte(v.(string))) - return hex.EncodeToString(hash[:]) + json, _ := normalizeJsonString(v) + return json + }, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + equal, _ := ecsContainerDefinitionsAreEquivalent(old, new) + return equal }, ValidateFunc: validateAwsEcsTaskDefinitionContainerDefinitions, }, @@ -214,7 +219,16 @@ func resourceAwsEcsTaskDefinitionRead(d *schema.ResourceData, meta interface{}) d.Set("arn", taskDefinition.TaskDefinitionArn) d.Set("family", taskDefinition.Family) d.Set("revision", taskDefinition.Revision) - d.Set("container_definitions", taskDefinition.ContainerDefinitions) + + defs, err := flattenEcsContainerDefinitions(taskDefinition.ContainerDefinitions) + if err != nil { + return err + } + err = d.Set("container_definitions", defs) + if err != nil { + return err + } + d.Set("task_role_arn", taskDefinition.TaskRoleArn) d.Set("network_mode", taskDefinition.NetworkMode) d.Set("volumes", flattenEcsVolumes(taskDefinition.Volumes)) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition_migrate.go new file mode 100644 index 000000000..179b73bff --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition_migrate.go @@ -0,0 +1,44 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" + "github.com/aws/aws-sdk-go/service/ecs" + "github.com/hashicorp/terraform/terraform" +) + +func resourceAwsEcsTaskDefinitionMigrateState(v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { + conn := meta.(*AWSClient).ecsconn + + switch v { + case 0: + log.Println("[INFO] Found AWS ECS Task Definition State v0; migrating to v1") + return migrateEcsTaskDefinitionStateV0toV1(is, conn) + default: + return is, fmt.Errorf("Unexpected schema version: %d", v) + } +} + +func migrateEcsTaskDefinitionStateV0toV1(is *terraform.InstanceState, conn *ecs.ECS) (*terraform.InstanceState, error) { + arn := is.Attributes["arn"] + + // We need to pull definitions from the API b/c they're unrecoverable from the checksum + td, err := conn.DescribeTaskDefinition(&ecs.DescribeTaskDefinitionInput{ + TaskDefinition: aws.String(arn), + }) + if err != nil { + return nil, err + } + + b, err := jsonutil.BuildJSON(td.TaskDefinition.ContainerDefinitions) + if err != nil { + return nil, err + } + + is.Attributes["container_definitions"] = string(b) + + return is, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go index a0f5a59b6..9edb3c154 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go @@ -64,6 +64,11 @@ func resourceAwsEfsFileSystem() *schema.Resource { ValidateFunc: validateArn, }, + "dns_name": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), }, } @@ -230,6 +235,12 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro d.Set("encrypted", fs.Encrypted) d.Set("kms_key_id", fs.KmsKeyId) + region := meta.(*AWSClient).region + err = d.Set("dns_name", resourceAwsEfsDnsName(*fs.FileSystemId, region)) + if err != nil { + return err + } + return nil } @@ -305,3 +316,7 @@ func hasEmptyFileSystems(fs *efs.DescribeFileSystemsOutput) bool { } return true } + +func resourceAwsEfsDnsName(fileSystemId, region string) string { + return fmt.Sprintf("%s.efs.%s.amazonaws.com", fileSystemId, region) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go index 26bd1e319..c85c0655c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go @@ -254,10 +254,8 @@ func resourceAwsEipUpdate(d *schema.ResourceData, meta interface{}) error { err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := ec2conn.AssociateAddress(assocOpts) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "InvalidAllocationID.NotFound" { - return resource.RetryableError(awsErr) - } + if isAWSErr(err, "InvalidAllocationID.NotFound", "") { + return resource.RetryableError(err) } return resource.NonRetryableError(err) } @@ -340,8 +338,14 @@ func disassociateEip(d *schema.ResourceData, meta interface{}) error { var err error switch resourceAwsEipDomain(d) { case "vpc": + associationID := d.Get("association_id").(string) + if associationID == "" { + // If assiciationID is empty, it means there's no association. + // Hence this disassociation can be skipped. + return nil + } _, err = ec2conn.DisassociateAddress(&ec2.DisassociateAddressInput{ - AssociationId: aws.String(d.Get("association_id").(string)), + AssociationId: aws.String(associationID), }) case "standard": _, err = ec2conn.DisassociateAddress(&ec2.DisassociateAddressInput{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go index 212332526..dd7b7a671 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go @@ -112,11 +112,14 @@ func resourceAwsElasticBeanstalkApplicationDelete(d *schema.ResourceData, meta i _, err = beanstalkConn.DeleteApplication(&elasticbeanstalk.DeleteApplicationInput{ ApplicationName: aws.String(d.Id()), }) + if err != nil { + return err + } return resource.Retry(10*time.Second, func() *resource.RetryError { - if a, _ = getBeanstalkApplication(d, meta); a != nil { + if a, err = getBeanstalkApplication(d, meta); a != nil { return resource.RetryableError( - fmt.Errorf("Beanstalk Application still exists")) + fmt.Errorf("Beanstalk Application (%s) still exists: %s", d.Id(), err)) } return nil }) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go index a2bec932d..049a60f3d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go @@ -157,7 +157,6 @@ func resourceAwsElasticacheCluster() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ForceNew: true, } resourceSchema["availability_zone"] = &schema.Schema{ @@ -380,6 +379,11 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{}) } } d.Set("availability_zone", c.PreferredAvailabilityZone) + if *c.PreferredAvailabilityZone == "Multiple" { + d.Set("az_mode", "cross-az") + } else { + d.Set("az_mode", "single-az") + } if err := setCacheNodeData(d, c); err != nil { return err @@ -473,6 +477,11 @@ func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{ requestUpdate = true } + if d.HasChange("az_mode") { + req.AZMode = aws.String(d.Get("az_mode").(string)) + requestUpdate = true + } + if d.HasChange("num_cache_nodes") { oraw, nraw := d.GetChange("num_cache_nodes") o := oraw.(int) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go index c12e44d40..542afd1c5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go @@ -174,7 +174,16 @@ func resourceAwsElasticacheParameterGroupUpdate(d *schema.ResourceData, meta int } log.Printf("[DEBUG] Reset Cache Parameter Group: %s", resetOpts) - _, err = conn.ResetCacheParameterGroup(&resetOpts) + err := resource.Retry(30*time.Second, func() *resource.RetryError { + _, err = conn.ResetCacheParameterGroup(&resetOpts) + if err != nil { + if isAWSErr(err, "InvalidCacheParameterGroupState", " has pending changes") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { return fmt.Errorf("Error resetting Cache Parameter Group: %s", err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go index ff739f2ce..5f5174668 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go @@ -201,7 +201,7 @@ func resourceAwsElasticacheReplicationGroupCreate(d *schema.ResourceData, meta i Pending: pending, Target: []string{"available"}, Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: 40 * time.Minute, + Timeout: 50 * time.Minute, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go index 68ebbb335..34aee1a0f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go @@ -9,10 +9,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" + "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "strings" ) func resourceAwsElasticSearchDomain() *schema.Resource { @@ -137,6 +137,38 @@ func resourceAwsElasticSearchDomain() *schema.Resource { }, }, }, + "vpc_options": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "availability_zones": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "subnet_ids": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, "elasticsearch_version": { Type: schema.TypeString, Optional: true, @@ -155,9 +187,50 @@ func resourceAwsElasticSearchDomainImport( return []*schema.ResourceData{d}, nil } +// This would be created automatically if the domain is created via Console +// see http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-enabling-slr +func createAwsElasticsearchIAMServiceRoleIfMissing(meta interface{}) error { + serviceRoleName := "AWSServiceRoleForAmazonElasticsearchService" + serviceName := "es.amazonaws.com" + + conn := meta.(*AWSClient).iamconn + + getRequest := &iam.GetRoleInput{ + RoleName: aws.String(serviceRoleName), + } + _, err := conn.GetRole(getRequest) + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "Role not found") { + createRequest := &iam.CreateServiceLinkedRoleInput{ + AWSServiceName: aws.String(serviceName), + } + _, err := conn.CreateServiceLinkedRole(createRequest) + if err != nil { + if isAWSErr(err, iam.ErrCodeInvalidInputException, "has been taken in this account") { + return nil + } + return fmt.Errorf("Error creating IAM Service-Linked Role %s: %s", serviceRoleName, err) + } + return nil + } + return fmt.Errorf("Error reading IAM Role %s: %s", serviceRoleName, err) + } + return nil +} + func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).esconn + // The API doesn't check for duplicate names + // so w/out this check Create would act as upsert + // and might cause duplicate domain to appear in state + resp, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ + DomainName: aws.String(d.Get("domain_name").(string)), + }) + if err == nil { + return fmt.Errorf("ElasticSearch domain %q already exists", *resp.DomainStatus.DomainName) + } + input := elasticsearch.CreateElasticsearchDomainInput{ DomainName: aws.String(d.Get("domain_name").(string)), ElasticsearchVersion: aws.String(d.Get("elasticsearch_version").(string)), @@ -220,20 +293,37 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface } } + if v, ok := d.GetOk("vpc_options"); ok { + err = createAwsElasticsearchIAMServiceRoleIfMissing(meta) + if err != nil { + return err + } + + options := v.([]interface{}) + if options[0] == nil { + return fmt.Errorf("At least one field is expected inside vpc_options") + } + + s := options[0].(map[string]interface{}) + input.VPCOptions = expandESVPCOptions(s) + } + log.Printf("[DEBUG] Creating ElasticSearch domain: %s", input) // IAM Roles can take some time to propagate if set in AccessPolicies and created in the same terraform var out *elasticsearch.CreateElasticsearchDomainOutput - err := resource.Retry(30*time.Second, func() *resource.RetryError { + err = resource.Retry(30*time.Second, func() *resource.RetryError { var err error out, err = conn.CreateElasticsearchDomain(&input) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "InvalidTypeException" && strings.Contains(awsErr.Message(), "Error setting policy") { - log.Printf("[DEBUG] Retrying creation of ElasticSearch domain %s", *input.DomainName) - return resource.RetryableError(err) - } + if isAWSErr(err, "InvalidTypeException", "Error setting policy") { + log.Printf("[DEBUG] Retrying creation of ElasticSearch domain %s", *input.DomainName) + return resource.RetryableError(err) } + if isAWSErr(err, "ValidationException", "enable a service-linked role to give Amazon ES permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) } return nil @@ -259,21 +349,7 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface d.SetPartial("tags") log.Printf("[DEBUG] Waiting for ElasticSearch domain %q to be created", d.Id()) - err = resource.Retry(60*time.Minute, func() *resource.RetryError { - out, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ - DomainName: aws.String(d.Get("domain_name").(string)), - }) - if err != nil { - return resource.NonRetryableError(err) - } - - if !*out.DomainStatus.Processing && out.DomainStatus.Endpoint != nil { - return nil - } - - return resource.RetryableError( - fmt.Errorf("%q: Timeout while waiting for the domain to be created", d.Id())) - }) + err = waitForElasticSearchDomainCreation(conn, d.Get("domain_name").(string), d.Id()) if err != nil { return err } @@ -284,6 +360,24 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface return resourceAwsElasticSearchDomainRead(d, meta) } +func waitForElasticSearchDomainCreation(conn *elasticsearch.ElasticsearchService, domainName, arn string) error { + return resource.Retry(60*time.Minute, func() *resource.RetryError { + out, err := conn.DescribeElasticsearchDomain(&elasticsearch.DescribeElasticsearchDomainInput{ + DomainName: aws.String(domainName), + }) + if err != nil { + return resource.NonRetryableError(err) + } + + if !*out.DomainStatus.Processing && (out.DomainStatus.Endpoint != nil || out.DomainStatus.Endpoints != nil) { + return nil + } + + return resource.RetryableError( + fmt.Errorf("%q: Timeout while waiting for the domain to be created", arn)) + }) +} + func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).esconn @@ -318,9 +412,6 @@ func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{} d.Set("domain_id", ds.DomainId) d.Set("domain_name", ds.DomainName) d.Set("elasticsearch_version", ds.ElasticsearchVersion) - if ds.Endpoint != nil { - d.Set("endpoint", *ds.Endpoint) - } err = d.Set("ebs_options", flattenESEBSOptions(ds.EBSOptions)) if err != nil { @@ -335,6 +426,27 @@ func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{} "automated_snapshot_start_hour": *ds.SnapshotOptions.AutomatedSnapshotStartHour, }) } + if ds.VPCOptions != nil { + err = d.Set("vpc_options", flattenESVPCDerivedInfo(ds.VPCOptions)) + if err != nil { + return err + } + endpoints := pointersMapToStringList(ds.Endpoints) + err = d.Set("endpoint", endpoints["vpc"]) + if err != nil { + return err + } + if ds.Endpoint != nil { + return fmt.Errorf("%q: Elasticsearch domain in VPC expected to have null Endpoint value", d.Id()) + } + } else { + if ds.Endpoint != nil { + d.Set("endpoint", *ds.Endpoint) + } + if ds.Endpoints != nil { + return fmt.Errorf("%q: Elasticsearch domain not in VPC expected to have null Endpoints value", d.Id()) + } + } d.Set("arn", ds.ARN) @@ -417,6 +529,12 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface } } + if d.HasChange("vpc_options") { + options := d.Get("vpc_options").([]interface{}) + s := options[0].(map[string]interface{}) + input.VPCOptions = expandESVPCOptions(s) + } + _, err := conn.UpdateElasticsearchDomainConfig(&input) if err != nil { return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go index dfb22c64d..7918ec584 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go @@ -40,7 +40,7 @@ func resourceAwsElasticSearchDomainPolicyRead(d *schema.ResourceData, meta inter DomainName: aws.String(name), }) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFound" { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { log.Printf("[WARN] ElasticSearch Domain %q not found, removing", name) d.SetId("") return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go index 2822213af..df821cbee 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go @@ -104,7 +104,7 @@ func resourceAwsElb() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 60, - ValidateFunc: validateIntegerInRange(1, 3600), + ValidateFunc: validateIntegerInRange(1, 4000), }, "connection_draining": &schema.Schema{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go index ccabcb1d9..bc8c9108f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go @@ -240,6 +240,11 @@ func resourceAwsEMRCluster() *schema.Resource { Optional: true, Default: true, }, + "ebs_root_volume_size": { + Type: schema.TypeInt, + ForceNew: true, + Optional: true, + }, }, } } @@ -349,6 +354,10 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error params.SecurityConfiguration = aws.String(v.(string)) } + if v, ok := d.GetOk("ebs_root_volume_size"); ok { + params.EbsRootVolumeSize = aws.Int64(int64(v.(int))) + } + if instanceProfile != "" { params.JobFlowRole = aws.String(instanceProfile) } @@ -452,6 +461,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { d.Set("master_public_dns", cluster.MasterPublicDnsName) d.Set("visible_to_all_users", cluster.VisibleToAllUsers) d.Set("tags", tagsToMapEMR(cluster.Tags)) + d.Set("ebs_root_volume_size", cluster.EbsRootVolumeSize) if err := d.Set("applications", flattenApplications(cluster.Applications)); err != nil { log.Printf("[ERR] Error setting EMR Applications for cluster (%s): %s", d.Id(), err) @@ -996,9 +1006,9 @@ func resourceAwsEMRClusterStateRefreshFunc(d *schema.ResourceData, meta interfac } status := emrc.Status - if *status.State == "TERMINATING" { + if *status.State == "TERMINATING" || *status.State == "TERMINATED_WITH_ERRORS" { reason := *status.StateChangeReason - return emrc, *status.State, fmt.Errorf("EMR Cluster is terminating. %s: %s", + return emrc, *status.State, fmt.Errorf("%s: %s", *reason.Code, *reason.Message) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go index c9f0adfb7..dc847ff2f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go @@ -297,10 +297,11 @@ func resourceAwsInstance() *schema.Resource { }, "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: iopsDiffSuppressFunc, }, "snapshot_id": { @@ -387,10 +388,11 @@ func resourceAwsInstance() *schema.Resource { }, "iops": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: iopsDiffSuppressFunc, }, "volume_size": { @@ -413,6 +415,14 @@ func resourceAwsInstance() *schema.Resource { } } +func iopsDiffSuppressFunc(k, old, new string, d *schema.ResourceData) bool { + // Suppress diff if volume_type is not io1 + i := strings.LastIndexByte(k, '.') + vt := k[:i+1] + "volume_type" + v := d.Get(vt).(string) + return strings.ToLower(v) != ec2.VolumeTypeIo1 +} + func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn @@ -1326,7 +1336,7 @@ func readBlockDeviceMappingsFromConfig( if v, ok := bd["volume_type"].(string); ok && v != "" { ebs.VolumeType = aws.String(v) - if "io1" == strings.ToLower(v) { + if ec2.VolumeTypeIo1 == strings.ToLower(v) { // Condition: This parameter is required for requests to create io1 // volumes; it is not used in requests to create gp2, st1, sc1, or // standard volumes. @@ -1466,6 +1476,9 @@ func readSecurityGroups(d *schema.ResourceData, instance *ec2.Instance, conn *ec }) if err != nil { log.Printf("[WARN] Unable to describe VPC %q: %s", *instance.VpcId, err) + } else if len(out.Vpcs) == 0 { + // This may happen in Eucalyptus Cloud + log.Printf("[WARN] Unable to retrieve VPCs") } else { isInDefaultVpc := *out.Vpcs[0].IsDefault useID = !isInDefaultVpc diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go index 10fce25e5..2dcacb71b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -41,6 +41,58 @@ func cloudWatchLoggingOptionsSchema() *schema.Schema { } } +func s3ConfigurationSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket_arn": { + Type: schema.TypeString, + Required: true, + }, + + "buffer_size": { + Type: schema.TypeInt, + Optional: true, + Default: 5, + }, + + "buffer_interval": { + Type: schema.TypeInt, + Optional: true, + Default: 300, + }, + + "compression_format": { + Type: schema.TypeString, + Optional: true, + Default: "UNCOMPRESSED", + }, + + "kms_key_arn": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + }, + + "prefix": { + Type: schema.TypeString, + Optional: true, + }, + + "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), + }, + }, + } +} + func processingConfigurationSchema() *schema.Schema { return &schema.Schema{ Type: schema.TypeList, @@ -133,6 +185,28 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { }, }, + "kinesis_source_configuration": { + Type: schema.TypeList, + ForceNew: true, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "kinesis_stream_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + "destination": { Type: schema.TypeString, Required: true, @@ -151,55 +225,7 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { }, }, - "s3_configuration": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "bucket_arn": { - Type: schema.TypeString, - Required: true, - }, - - "buffer_size": { - Type: schema.TypeInt, - Optional: true, - Default: 5, - }, - - "buffer_interval": { - Type: schema.TypeInt, - Optional: true, - Default: 300, - }, - - "compression_format": { - Type: schema.TypeString, - Optional: true, - Default: "UNCOMPRESSED", - }, - - "kms_key_arn": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateArn, - }, - - "role_arn": { - Type: schema.TypeString, - Required: true, - }, - - "prefix": { - Type: schema.TypeString, - Optional: true, - }, - - "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), - }, - }, - }, + "s3_configuration": s3ConfigurationSchema(), "extended_s3_configuration": { Type: schema.TypeList, @@ -281,6 +307,22 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Required: true, }, + "s3_backup_mode": { + Type: schema.TypeString, + Optional: true, + Default: "Disabled", + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if value != "Disabled" && value != "Enabled" { + errors = append(errors, fmt.Errorf( + "%q must be one of 'Disabled', 'Enabled'", k)) + } + return + }, + }, + + "s3_backup_configuration": s3ConfigurationSchema(), + "retry_duration": { Type: schema.TypeInt, Optional: true, @@ -445,6 +487,16 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { } } +func createSourceConfig(source map[string]interface{}) *firehose.KinesisStreamSourceConfiguration { + + configuration := &firehose.KinesisStreamSourceConfiguration{ + KinesisStreamARN: aws.String(source["kinesis_stream_arn"].(string)), + RoleARN: aws.String(source["role_arn"].(string)), + } + + return configuration +} + func createS3Config(d *schema.ResourceData) *firehose.S3DestinationConfiguration { s3 := d.Get("s3_configuration").([]interface{})[0].(map[string]interface{}) @@ -467,6 +519,33 @@ func createS3Config(d *schema.ResourceData) *firehose.S3DestinationConfiguration return configuration } +func expandS3BackupConfig(d map[string]interface{}) *firehose.S3DestinationConfiguration { + config := d["s3_backup_configuration"].([]interface{}) + if len(config) == 0 { + return nil + } + + s3 := config[0].(map[string]interface{}) + + configuration := &firehose.S3DestinationConfiguration{ + BucketARN: aws.String(s3["bucket_arn"].(string)), + RoleARN: aws.String(s3["role_arn"].(string)), + BufferingHints: &firehose.BufferingHints{ + IntervalInSeconds: aws.Int64(int64(s3["buffer_interval"].(int))), + SizeInMBs: aws.Int64(int64(s3["buffer_size"].(int))), + }, + Prefix: extractPrefixConfiguration(s3), + CompressionFormat: aws.String(s3["compression_format"].(string)), + EncryptionConfiguration: extractEncryptionConfiguration(s3), + } + + if _, ok := s3["cloudwatch_logging_options"]; ok { + configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) + } + + return configuration +} + func createExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3DestinationConfiguration { s3 := d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{}) @@ -480,7 +559,10 @@ func createExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat Prefix: extractPrefixConfiguration(s3), CompressionFormat: aws.String(s3["compression_format"].(string)), EncryptionConfiguration: extractEncryptionConfiguration(s3), - ProcessingConfiguration: extractProcessingConfiguration(s3), + } + + if _, ok := s3["processing_configuration"]; ok { + configuration.ProcessingConfiguration = extractProcessingConfiguration(s3) } if _, ok := s3["cloudwatch_logging_options"]; ok { @@ -513,6 +595,34 @@ func updateS3Config(d *schema.ResourceData) *firehose.S3DestinationUpdate { return configuration } +func updateS3BackupConfig(d map[string]interface{}) *firehose.S3DestinationUpdate { + config := d["s3_backup_configuration"].([]interface{}) + if len(config) == 0 { + return nil + } + + s3 := config[0].(map[string]interface{}) + + configuration := &firehose.S3DestinationUpdate{ + BucketARN: aws.String(s3["bucket_arn"].(string)), + RoleARN: aws.String(s3["role_arn"].(string)), + BufferingHints: &firehose.BufferingHints{ + IntervalInSeconds: aws.Int64((int64)(s3["buffer_interval"].(int))), + SizeInMBs: aws.Int64((int64)(s3["buffer_size"].(int))), + }, + Prefix: extractPrefixConfiguration(s3), + CompressionFormat: aws.String(s3["compression_format"].(string)), + EncryptionConfiguration: extractEncryptionConfiguration(s3), + CloudWatchLoggingOptions: extractCloudWatchLoggingConfiguration(s3), + } + + if _, ok := s3["cloudwatch_logging_options"]; ok { + configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) + } + + return configuration +} + func updateExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3DestinationUpdate { s3 := d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{}) @@ -538,7 +648,12 @@ func updateExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat } func extractProcessingConfiguration(s3 map[string]interface{}) *firehose.ProcessingConfiguration { - processingConfiguration := s3["processing_configuration"].([]interface{})[0].(map[string]interface{}) + config := s3["processing_configuration"].([]interface{}) + if len(config) == 0 { + return nil + } + + processingConfiguration := config[0].(map[string]interface{}) return &firehose.ProcessingConfiguration{ Enabled: aws.Bool(processingConfiguration["enabled"].(bool)), @@ -649,6 +764,10 @@ func createRedshiftConfig(d *schema.ResourceData, s3Config *firehose.S3Destinati if _, ok := redshift["cloudwatch_logging_options"]; ok { configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(redshift) } + if s3BackupMode, ok := redshift["s3_backup_mode"]; ok { + configuration.S3BackupMode = aws.String(s3BackupMode.(string)) + configuration.S3BackupConfiguration = expandS3BackupConfig(d.Get("redshift_configuration").([]interface{})[0].(map[string]interface{})) + } return configuration, nil } @@ -675,6 +794,10 @@ func updateRedshiftConfig(d *schema.ResourceData, s3Update *firehose.S3Destinati if _, ok := redshift["cloudwatch_logging_options"]; ok { configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(redshift) } + if s3BackupMode, ok := redshift["s3_backup_mode"]; ok { + configuration.S3BackupMode = aws.String(s3BackupMode.(string)) + configuration.S3BackupUpdate = updateS3BackupConfig(d.Get("redshift_configuration").([]interface{})[0].(map[string]interface{})) + } return configuration, nil } @@ -804,6 +927,14 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta DeliveryStreamName: aws.String(sn), } + if v, ok := d.GetOk("kinesis_source_configuration"); ok { + sourceConfig := createSourceConfig(v.([]interface{})[0].(map[string]interface{})) + createInput.KinesisStreamSourceConfiguration = sourceConfig + createInput.DeliveryStreamType = aws.String(firehose.DeliveryStreamTypeKinesisStreamAsSource) + } else { + createInput.DeliveryStreamType = aws.String(firehose.DeliveryStreamTypeDirectPut) + } + if d.Get("destination").(string) == "extended_s3" { extendedS3Config := createExtendedS3Config(d) createInput.ExtendedS3DestinationConfiguration = extendedS3Config @@ -850,7 +981,7 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta }) if err != nil { if awsErr, ok := lastError.(awserr.Error); ok { - return fmt.Errorf("[WARN] Error creating Kinesis Firehose Delivery Stream: \"%s\", code: \"%s\"", awsErr.Message(), awsErr.Code()) + return fmt.Errorf("[WARN] Error creating Kinesis Firehose Delivery Stream: %s", awsErr.Error()) } return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go index a1adcd96e..49ffaa4dc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go @@ -5,11 +5,14 @@ import ( "log" "time" + "strings" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/kinesis" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsKinesisStream() *schema.Resource { @@ -61,6 +64,24 @@ func resourceAwsKinesisStream() *schema.Resource { Set: schema.HashString, }, + "encryption_type": { + Type: schema.TypeString, + Optional: true, + Default: "NONE", + ValidateFunc: validation.StringInSlice([]string{"NONE", "KMS"}, true), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if strings.ToLower(old) == strings.ToLower(new) { + return true + } + return false + }, + }, + + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + }, + "arn": { Type: schema.TypeString, Optional: true, @@ -85,14 +106,24 @@ func resourceAwsKinesisStreamCreate(d *schema.ResourceData, meta interface{}) er StreamName: aws.String(sn), } - _, err := conn.CreateStream(createOpts) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("[WARN] Error creating Kinesis Stream: \"%s\", code: \"%s\"", awsErr.Message(), awsErr.Code()) + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.CreateStream(createOpts) + if isAWSErr(err, "LimitExceededException", "simultaneously be in CREATING or DELETING") { + return resource.RetryableError(err) } - return err + // AWS (un)helpfully raises LimitExceededException + // rather than ThrottlingException here + if isAWSErr(err, "LimitExceededException", "Rate exceeded for stream") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + }) + + if err != nil { + return fmt.Errorf("Unable to create stream: %s", err) } + // No error, wait for ACTIVE state stateConf := &resource.StateChangeConf{ Pending: []string{"CREATING"}, Target: []string{"ACTIVE"}, @@ -138,6 +169,10 @@ func resourceAwsKinesisStreamUpdate(d *schema.ResourceData, meta interface{}) er return err } + if err := updateKinesisStreamEncryption(conn, d); err != nil { + return err + } + return resourceAwsKinesisStreamRead(d, meta) } @@ -162,6 +197,9 @@ func resourceAwsKinesisStreamRead(d *schema.ResourceData, meta interface{}) erro d.Set("shard_count", len(state.openShards)) d.Set("retention_period", state.retentionPeriod) + d.Set("encryption_type", state.encryptionType) + d.Set("kms_key_id", state.keyId) + if len(state.shardLevelMetrics) > 0 { d.Set("shard_level_metrics", state.shardLevelMetrics) } @@ -280,6 +318,79 @@ func updateKinesisShardCount(conn *kinesis.Kinesis, d *schema.ResourceData) erro return nil } +func updateKinesisStreamEncryption(conn *kinesis.Kinesis, d *schema.ResourceData) error { + sn := d.Get("name").(string) + + // If this is not a new resource AND there is no change to encryption_type or kms_key_id + // return nil + if !d.IsNewResource() && (!d.HasChange("encryption_type") || !d.HasChange("kms_key_id")) { + return nil + } + + oldType, newType := d.GetChange("encryption_type") + if oldType.(string) != "" && oldType.(string) != "NONE" { + // This means that we have an old encryption type - i.e. Encryption is enabled and we want to change it + // The quirk about this API is that, when we are disabling the StreamEncryption + // We need to pass in that old KMS Key Id that was being used for Encryption and + // We also need to pass in the type of Encryption we were using - i.e. KMS as that + // Is the only supported Encryption method right now + // If we don't get this and pass in the actual EncryptionType we want to move to i.e. NONE + // We get the following error + // + // InvalidArgumentException: Encryption type cannot be NONE. + oldKey, _ := d.GetChange("kms_key_id") + oldType, _ := d.GetChange("encryption_type") + + log.Printf("[INFO] Stopping Stream Encryption for %s", sn) + params := &kinesis.StopStreamEncryptionInput{ + StreamName: aws.String(sn), + EncryptionType: aws.String(oldType.(string)), + KeyId: aws.String(oldKey.(string)), + } + + _, err := conn.StopStreamEncryption(params) + if err != nil { + return err + } + } + + if newType.(string) != "NONE" { + if _, ok := d.GetOk("kms_key_id"); !ok { + return fmt.Errorf("KMS Key Id required when setting encryption_type is not set as NONE") + } + + log.Printf("[INFO] Starting Stream Encryption for %s", sn) + params := &kinesis.StartStreamEncryptionInput{ + StreamName: aws.String(sn), + EncryptionType: aws.String(newType.(string)), + KeyId: aws.String(d.Get("kms_key_id").(string)), + } + + _, err := conn.StartStreamEncryption(params) + if err != nil { + return err + } + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"UPDATING"}, + Target: []string{"ACTIVE"}, + Refresh: streamStateRefreshFunc(conn, sn), + Timeout: 5 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf( + "Error waiting for Stream (%s) to be ACTIVE: %s", + sn, err) + } + + return nil +} + func updateKinesisShardLevelMetrics(conn *kinesis.Kinesis, d *schema.ResourceData) error { sn := d.Get("name").(string) @@ -343,6 +454,8 @@ type kinesisStreamState struct { openShards []string closedShards []string shardLevelMetrics []string + encryptionType string + keyId string } func readKinesisStreamState(conn *kinesis.Kinesis, sn string) (*kinesisStreamState, error) { @@ -359,6 +472,8 @@ func readKinesisStreamState(conn *kinesis.Kinesis, sn string) (*kinesisStreamSta state.openShards = append(state.openShards, flattenShards(openShards(page.StreamDescription.Shards))...) state.closedShards = append(state.closedShards, flattenShards(closedShards(page.StreamDescription.Shards))...) state.shardLevelMetrics = flattenKinesisShardLevelMetrics(page.StreamDescription.EnhancedMonitoring) + state.encryptionType = aws.StringValue(page.StreamDescription.EncryptionType) + state.keyId = aws.StringValue(page.StreamDescription.KeyId) return !last }) return state, err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go index d3f9815c8..2cfe6dd8e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go @@ -77,7 +77,11 @@ func resourceAwsKmsAliasCreate(d *schema.ResourceData, meta interface{}) error { AliasName: aws.String(name), TargetKeyId: aws.String(targetKeyId), } - _, err := conn.CreateAlias(req) + + // KMS is eventually consistent + _, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { + return conn.CreateAlias(req) + }) if err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go index fa98b9e38..506143b6e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go @@ -165,34 +165,43 @@ func resourceAwsKmsKeyRead(d *schema.ResourceData, meta interface{}) error { d.Set("key_usage", metadata.KeyUsage) d.Set("is_enabled", metadata.Enabled) - p, err := conn.GetKeyPolicy(&kms.GetKeyPolicyInput{ - KeyId: metadata.KeyId, - PolicyName: aws.String("default"), + pOut, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { + return conn.GetKeyPolicy(&kms.GetKeyPolicyInput{ + KeyId: metadata.KeyId, + PolicyName: aws.String("default"), + }) }) if err != nil { return err } + p := pOut.(*kms.GetKeyPolicyOutput) policy, err := normalizeJsonString(*p.Policy) if err != nil { return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) } d.Set("policy", policy) - krs, err := conn.GetKeyRotationStatus(&kms.GetKeyRotationStatusInput{ - KeyId: metadata.KeyId, + out, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { + return conn.GetKeyRotationStatus(&kms.GetKeyRotationStatusInput{ + KeyId: metadata.KeyId, + }) }) if err != nil { return err } + krs, _ := out.(*kms.GetKeyRotationStatusOutput) d.Set("enable_key_rotation", krs.KeyRotationEnabled) - tagList, err := conn.ListResourceTags(&kms.ListResourceTagsInput{ - KeyId: metadata.KeyId, + tOut, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { + return conn.ListResourceTags(&kms.ListResourceTagsInput{ + KeyId: metadata.KeyId, + }) }) if err != nil { return fmt.Errorf("Failed to get KMS key tags (key: %s): %s", d.Get("key_id").(string), err) } + tagList := tOut.(*kms.ListResourceTagsOutput) d.Set("tags", tagsToMapKMS(tagList.Tags)) return nil @@ -379,12 +388,17 @@ func updateKmsKeyRotationStatus(conn *kms.KMS, d *schema.ResourceData) error { Refresh: func() (interface{}, string, error) { log.Printf("[DEBUG] Checking if KMS key %s rotation status is %t", d.Id(), shouldEnableRotation) - resp, err := conn.GetKeyRotationStatus(&kms.GetKeyRotationStatusInput{ - KeyId: aws.String(d.Id()), + + out, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { + return conn.GetKeyRotationStatus(&kms.GetKeyRotationStatusInput{ + KeyId: aws.String(d.Id()), + }) }) if err != nil { - return resp, "FAILED", err + return 42, "", err } + resp, _ := out.(*kms.GetKeyRotationStatusOutput) + status := fmt.Sprintf("%t", *resp.KeyRotationEnabled) log.Printf("[DEBUG] KMS key %s rotation status received: %s, retrying", d.Id(), status) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go index 2e4737119..d45bdcf92 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go @@ -508,49 +508,6 @@ func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) e } d.SetPartial("tags") - if d.HasChange("filename") || d.HasChange("source_code_hash") || d.HasChange("s3_bucket") || d.HasChange("s3_key") || d.HasChange("s3_object_version") { - codeReq := &lambda.UpdateFunctionCodeInput{ - FunctionName: aws.String(d.Id()), - Publish: aws.Bool(d.Get("publish").(bool)), - } - - if v, ok := d.GetOk("filename"); ok { - // Grab an exclusive lock so that we're only reading one function into - // memory at a time. - // See https://github.com/hashicorp/terraform/issues/9364 - awsMutexKV.Lock(awsMutexLambdaKey) - defer awsMutexKV.Unlock(awsMutexLambdaKey) - file, err := loadFileContent(v.(string)) - if err != nil { - return fmt.Errorf("Unable to load %q: %s", v.(string), err) - } - codeReq.ZipFile = file - } else { - s3Bucket, _ := d.GetOk("s3_bucket") - s3Key, _ := d.GetOk("s3_key") - s3ObjectVersion, versionOk := d.GetOk("s3_object_version") - - codeReq.S3Bucket = aws.String(s3Bucket.(string)) - codeReq.S3Key = aws.String(s3Key.(string)) - if versionOk { - codeReq.S3ObjectVersion = aws.String(s3ObjectVersion.(string)) - } - } - - log.Printf("[DEBUG] Send Update Lambda Function Code request: %#v", codeReq) - - _, err := conn.UpdateFunctionCode(codeReq) - if err != nil { - return fmt.Errorf("Error modifying Lambda Function Code %s: %s", d.Id(), err) - } - - d.SetPartial("filename") - d.SetPartial("source_code_hash") - d.SetPartial("s3_bucket") - d.SetPartial("s3_key") - d.SetPartial("s3_object_version") - } - configReq := &lambda.UpdateFunctionConfigurationInput{ FunctionName: aws.String(d.Id()), } @@ -666,6 +623,50 @@ func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) e d.SetPartial("role") d.SetPartial("timeout") } + + if d.HasChange("filename") || d.HasChange("source_code_hash") || d.HasChange("s3_bucket") || d.HasChange("s3_key") || d.HasChange("s3_object_version") { + codeReq := &lambda.UpdateFunctionCodeInput{ + FunctionName: aws.String(d.Id()), + Publish: aws.Bool(d.Get("publish").(bool)), + } + + if v, ok := d.GetOk("filename"); ok { + // Grab an exclusive lock so that we're only reading one function into + // memory at a time. + // See https://github.com/hashicorp/terraform/issues/9364 + awsMutexKV.Lock(awsMutexLambdaKey) + defer awsMutexKV.Unlock(awsMutexLambdaKey) + file, err := loadFileContent(v.(string)) + if err != nil { + return fmt.Errorf("Unable to load %q: %s", v.(string), err) + } + codeReq.ZipFile = file + } else { + s3Bucket, _ := d.GetOk("s3_bucket") + s3Key, _ := d.GetOk("s3_key") + s3ObjectVersion, versionOk := d.GetOk("s3_object_version") + + codeReq.S3Bucket = aws.String(s3Bucket.(string)) + codeReq.S3Key = aws.String(s3Key.(string)) + if versionOk { + codeReq.S3ObjectVersion = aws.String(s3ObjectVersion.(string)) + } + } + + log.Printf("[DEBUG] Send Update Lambda Function Code request: %#v", codeReq) + + _, err := conn.UpdateFunctionCode(codeReq) + if err != nil { + return fmt.Errorf("Error modifying Lambda Function Code %s: %s", d.Id(), err) + } + + d.SetPartial("filename") + d.SetPartial("source_code_hash") + d.SetPartial("s3_bucket") + d.SetPartial("s3_key") + d.SetPartial("s3_object_version") + } + d.Partial(false) return resourceAwsLambdaFunctionRead(d, meta) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go similarity index 67% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go index 6d074015c..63084d529 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go @@ -7,20 +7,23 @@ import ( "strconv" "time" + "bytes" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) -func resourceAwsAlb() *schema.Resource { +func resourceAwsLb() *schema.Resource { return &schema.Resource{ - Create: resourceAwsAlbCreate, - Read: resourceAwsAlbRead, - Update: resourceAwsAlbUpdate, - Delete: resourceAwsAlbDelete, + Create: resourceAwsLbCreate, + Read: resoureAwsLbRead, + Update: resourceAwsLbUpdate, + Delete: resourceAwsLbDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, @@ -65,6 +68,13 @@ func resourceAwsAlb() *schema.Resource { Computed: true, }, + "load_balancer_type": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + Default: "application", + }, + "security_groups": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, @@ -76,13 +86,42 @@ func resourceAwsAlb() *schema.Resource { "subnets": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, - Required: true, + Optional: true, + Computed: true, Set: schema.HashString, }, + "subnet_mapping": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "subnet_id": { + Type: schema.TypeString, + Required: true, + }, + "allocation_id": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + Set: func(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%s-", m["subnet_id"].(string))) + if m["allocation_id"] != "" { + buf.WriteString(fmt.Sprintf("%s-", m["allocation_id"].(string))) + } + return hashcode.String(buf.String()) + }, + }, + "access_logs": { Type: schema.TypeList, Optional: true, + Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -93,11 +132,12 @@ func resourceAwsAlb() *schema.Resource { "prefix": { Type: schema.TypeString, Optional: true, + Computed: true, }, "enabled": { Type: schema.TypeBool, Optional: true, - Default: true, + Computed: true, }, }, }, @@ -141,7 +181,7 @@ func resourceAwsAlb() *schema.Resource { } } -func resourceAwsAlbCreate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbCreate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn var name string @@ -156,6 +196,7 @@ func resourceAwsAlbCreate(d *schema.ResourceData, meta interface{}) error { elbOpts := &elbv2.CreateLoadBalancerInput{ Name: aws.String(name), + Type: aws.String(d.Get("load_balancer_type").(string)), Tags: tagsFromMapELBv2(d.Get("tags").(map[string]interface{})), } @@ -171,6 +212,22 @@ func resourceAwsAlbCreate(d *schema.ResourceData, meta interface{}) error { elbOpts.Subnets = expandStringList(v.(*schema.Set).List()) } + if v, ok := d.GetOk("subnet_mapping"); ok { + rawMappings := v.(*schema.Set).List() + elbOpts.SubnetMappings = make([]*elbv2.SubnetMapping, len(rawMappings)) + for i, mapping := range rawMappings { + subnetMap := mapping.(map[string]interface{}) + + elbOpts.SubnetMappings[i] = &elbv2.SubnetMapping{ + SubnetId: aws.String(subnetMap["subnet_id"].(string)), + } + + if subnetMap["allocation_id"].(string) != "" { + elbOpts.SubnetMappings[i].AllocationId = aws.String(subnetMap["allocation_id"].(string)) + } + } + } + if v, ok := d.GetOk("ip_address_type"); ok { elbOpts.IpAddressType = aws.String(v.(string)) } @@ -219,18 +276,18 @@ func resourceAwsAlbCreate(d *schema.ResourceData, meta interface{}) error { return err } - return resourceAwsAlbUpdate(d, meta) + return resourceAwsLbUpdate(d, meta) } -func resourceAwsAlbRead(d *schema.ResourceData, meta interface{}) error { +func resoureAwsLbRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - albArn := d.Id() + lbArn := d.Id() - describeAlbOpts := &elbv2.DescribeLoadBalancersInput{ - LoadBalancerArns: []*string{aws.String(albArn)}, + describeLbOpts := &elbv2.DescribeLoadBalancersInput{ + LoadBalancerArns: []*string{aws.String(lbArn)}, } - describeResp, err := elbconn.DescribeLoadBalancers(describeAlbOpts) + describeResp, err := elbconn.DescribeLoadBalancers(describeLbOpts) if err != nil { if isLoadBalancerNotFound(err) { // The ALB is gone now, so just remove it from the state @@ -245,10 +302,10 @@ func resourceAwsAlbRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Unable to find ALB: %#v", describeResp.LoadBalancers) } - return flattenAwsAlbResource(d, meta, describeResp.LoadBalancers[0]) + return flattenAwsLbResource(d, meta, describeResp.LoadBalancers[0]) } -func resourceAwsAlbUpdate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbUpdate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn if !d.IsNewResource() { @@ -295,7 +352,8 @@ func resourceAwsAlbUpdate(d *schema.ResourceData, meta interface{}) error { }) } - if d.HasChange("idle_timeout") { + // It's important to know that Idle timeout is not supported for Network Loadbalancers + if d.Get("load_balancer_type").(string) != "network" && d.HasChange("idle_timeout") { attributes = append(attributes, &elbv2.LoadBalancerAttribute{ Key: aws.String("idle_timeout.timeout_seconds"), Value: aws.String(fmt.Sprintf("%d", d.Get("idle_timeout").(int))), @@ -386,11 +444,11 @@ func resourceAwsAlbUpdate(d *schema.ResourceData, meta interface{}) error { return err } - return resourceAwsAlbRead(d, meta) + return resoureAwsLbRead(d, meta) } -func resourceAwsAlbDelete(d *schema.ResourceData, meta interface{}) error { - albconn := meta.(*AWSClient).elbv2conn +func resourceAwsLbDelete(d *schema.ResourceData, meta interface{}) error { + lbconn := meta.(*AWSClient).elbv2conn log.Printf("[INFO] Deleting ALB: %s", d.Id()) @@ -398,15 +456,22 @@ func resourceAwsAlbDelete(d *schema.ResourceData, meta interface{}) error { deleteElbOpts := elbv2.DeleteLoadBalancerInput{ LoadBalancerArn: aws.String(d.Id()), } - if _, err := albconn.DeleteLoadBalancer(&deleteElbOpts); err != nil { + if _, err := lbconn.DeleteLoadBalancer(&deleteElbOpts); err != nil { return fmt.Errorf("Error deleting ALB: %s", err) } - err := cleanupALBNetworkInterfaces(meta.(*AWSClient).ec2conn, d.Id()) + conn := meta.(*AWSClient).ec2conn + + err := cleanupLBNetworkInterfaces(conn, d.Id()) if err != nil { log.Printf("[WARN] Failed to cleanup ENIs for ALB %q: %#v", d.Id(), err) } + err = waitForNLBNetworkInterfacesToDetach(conn, d.Id()) + if err != nil { + log.Printf("[WARN] Failed to wait for ENIs to disappear for NLB %q: %#v", d.Id(), err) + } + return nil } @@ -414,16 +479,12 @@ func resourceAwsAlbDelete(d *schema.ResourceData, meta interface{}) error { // but the cleanup is asynchronous and may take time // which then blocks IGW, SG or VPC on deletion // So we make the cleanup "synchronous" here -func cleanupALBNetworkInterfaces(conn *ec2.EC2, albArn string) error { - re := regexp.MustCompile("([^/]+/[^/]+/[^/]+)$") - matches := re.FindStringSubmatch(albArn) - if len(matches) != 2 { - return fmt.Errorf("Unexpected ARN format: %q", albArn) +func cleanupLBNetworkInterfaces(conn *ec2.EC2, lbArn string) error { + name, err := getLbNameFromArn(lbArn) + if err != nil { + return err } - // e.g. app/example-alb/b26e625cdde161e6 - name := matches[1] - out, err := conn.DescribeNetworkInterfaces(&ec2.DescribeNetworkInterfacesInput{ Filters: []*ec2.Filter{ { @@ -440,7 +501,7 @@ func cleanupALBNetworkInterfaces(conn *ec2.EC2, albArn string) error { return err } - log.Printf("[DEBUG] Found %d ENIs to cleanup for ALB %q", + log.Printf("[DEBUG] Found %d ENIs to cleanup for LB %q", len(out.NetworkInterfaces), name) if len(out.NetworkInterfaces) == 0 { @@ -461,6 +522,59 @@ func cleanupALBNetworkInterfaces(conn *ec2.EC2, albArn string) error { return nil } +func waitForNLBNetworkInterfacesToDetach(conn *ec2.EC2, lbArn string) error { + name, err := getLbNameFromArn(lbArn) + if err != nil { + return err + } + + // We cannot cleanup these ENIs ourselves as that would result in + // OperationNotPermitted: You are not allowed to manage 'ela-attach' attachments. + // yet presence of these ENIs may prevent us from deleting EIPs associated w/ the NLB + + return resource.Retry(1*time.Minute, func() *resource.RetryError { + out, err := conn.DescribeNetworkInterfaces(&ec2.DescribeNetworkInterfacesInput{ + Filters: []*ec2.Filter{ + { + Name: aws.String("attachment.instance-owner-id"), + Values: []*string{aws.String("amazon-aws")}, + }, + { + Name: aws.String("attachment.attachment-id"), + Values: []*string{aws.String("ela-attach-*")}, + }, + { + Name: aws.String("description"), + Values: []*string{aws.String("ELB " + name)}, + }, + }, + }) + if err != nil { + return resource.NonRetryableError(err) + } + + niCount := len(out.NetworkInterfaces) + if niCount > 0 { + log.Printf("[DEBUG] Found %d ENIs to cleanup for NLB %q", niCount, lbArn) + return resource.RetryableError(fmt.Errorf("Waiting for %d ENIs of %q to clean up", niCount, lbArn)) + } + log.Printf("[DEBUG] ENIs gone for NLB %q", lbArn) + + return nil + }) +} + +func getLbNameFromArn(arn string) (string, error) { + re := regexp.MustCompile("([^/]+/[^/]+/[^/]+)$") + matches := re.FindStringSubmatch(arn) + if len(matches) != 2 { + return "", fmt.Errorf("Unexpected ARN format: %q", arn) + } + + // e.g. app/example-alb/b26e625cdde161e6 + return matches[1], nil +} + // flattenSubnetsFromAvailabilityZones creates a slice of strings containing the subnet IDs // for the ALB based on the AvailabilityZones structure returned by the API. func flattenSubnetsFromAvailabilityZones(availabilityZones []*elbv2.AvailabilityZone) []string { @@ -471,7 +585,7 @@ func flattenSubnetsFromAvailabilityZones(availabilityZones []*elbv2.Availability return result } -func albSuffixFromARN(arn *string) string { +func lbSuffixFromARN(arn *string) string { if arn == nil { return "" } @@ -485,23 +599,41 @@ func albSuffixFromARN(arn *string) string { return "" } -// flattenAwsAlbResource takes a *elbv2.LoadBalancer and populates all respective resource fields. -func flattenAwsAlbResource(d *schema.ResourceData, meta interface{}, alb *elbv2.LoadBalancer) error { +// flattenAwsLbResource takes a *elbv2.LoadBalancer and populates all respective resource fields. +func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.LoadBalancer) error { elbconn := meta.(*AWSClient).elbv2conn - d.Set("arn", alb.LoadBalancerArn) - d.Set("arn_suffix", albSuffixFromARN(alb.LoadBalancerArn)) - d.Set("name", alb.LoadBalancerName) - d.Set("internal", (alb.Scheme != nil && *alb.Scheme == "internal")) - d.Set("security_groups", flattenStringList(alb.SecurityGroups)) - d.Set("subnets", flattenSubnetsFromAvailabilityZones(alb.AvailabilityZones)) - d.Set("vpc_id", alb.VpcId) - d.Set("zone_id", alb.CanonicalHostedZoneId) - d.Set("dns_name", alb.DNSName) - d.Set("ip_address_type", alb.IpAddressType) + d.Set("arn", lb.LoadBalancerArn) + d.Set("arn_suffix", lbSuffixFromARN(lb.LoadBalancerArn)) + d.Set("name", lb.LoadBalancerName) + d.Set("internal", (lb.Scheme != nil && *lb.Scheme == "internal")) + d.Set("security_groups", flattenStringList(lb.SecurityGroups)) + d.Set("subnets", flattenSubnetsFromAvailabilityZones(lb.AvailabilityZones)) + d.Set("vpc_id", lb.VpcId) + d.Set("zone_id", lb.CanonicalHostedZoneId) + d.Set("dns_name", lb.DNSName) + d.Set("ip_address_type", lb.IpAddressType) + d.Set("load_balancer_type", lb.Type) + + subnetMappings := make([]interface{}, 0) + for _, az := range lb.AvailabilityZones { + subnetMappingRaw := make([]map[string]interface{}, len(az.LoadBalancerAddresses)) + for _, subnet := range az.LoadBalancerAddresses { + subnetMap := make(map[string]interface{}, 0) + subnetMap["subnet_id"] = *az.SubnetId + + if subnet.AllocationId != nil { + subnetMap["allocation_id"] = *subnet.AllocationId + } + + subnetMappingRaw = append(subnetMappingRaw, subnetMap) + } + subnetMappings = append(subnetMappings, subnetMappingRaw) + } + d.Set("subnet_mapping", subnetMappings) respTags, err := elbconn.DescribeTags(&elbv2.DescribeTagsInput{ - ResourceArns: []*string{alb.LoadBalancerArn}, + ResourceArns: []*string{lb.LoadBalancerArn}, }) if err != nil { return errwrap.Wrapf("Error retrieving ALB Tags: {{err}}", err) @@ -511,7 +643,10 @@ func flattenAwsAlbResource(d *schema.ResourceData, meta interface{}, alb *elbv2. if len(respTags.TagDescriptions) > 0 { et = respTags.TagDescriptions[0].Tags } - d.Set("tags", tagsToMapELBv2(et)) + + if err := d.Set("tags", tagsToMapELBv2(et)); err != nil { + log.Printf("[WARN] Error setting tags for AWS LB (%s): %s", d.Id(), err) + } attributesResp, err := elbconn.DescribeLoadBalancerAttributes(&elbv2.DescribeLoadBalancerAttributesInput{ LoadBalancerArn: aws.String(d.Id()), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_listener.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go similarity index 78% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_listener.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go index f94e3b1a1..ec99fa366 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_listener.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go @@ -15,12 +15,12 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func resourceAwsAlbListener() *schema.Resource { +func resourceAwsLbListener() *schema.Resource { return &schema.Resource{ - Create: resourceAwsAlbListenerCreate, - Read: resourceAwsAlbListenerRead, - Update: resourceAwsAlbListenerUpdate, - Delete: resourceAwsAlbListenerDelete, + Create: resourceAwsLbListenerCreate, + Read: resourceAwsLbListenerRead, + Update: resourceAwsLbListenerUpdate, + Delete: resourceAwsLbListenerDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, @@ -40,7 +40,7 @@ func resourceAwsAlbListener() *schema.Resource { "port": { Type: schema.TypeInt, Required: true, - ValidateFunc: validateAwsAlbListenerPort, + ValidateFunc: validateAwsLbListenerPort, }, "protocol": { @@ -50,7 +50,7 @@ func resourceAwsAlbListener() *schema.Resource { StateFunc: func(v interface{}) string { return strings.ToUpper(v.(string)) }, - ValidateFunc: validateAwsAlbListenerProtocol, + ValidateFunc: validateAwsLbListenerProtocol, }, "ssl_policy": { @@ -76,7 +76,7 @@ func resourceAwsAlbListener() *schema.Resource { "type": { Type: schema.TypeString, Required: true, - ValidateFunc: validateAwsAlbListenerActionType, + ValidateFunc: validateAwsLbListenerActionType, }, }, }, @@ -85,13 +85,13 @@ func resourceAwsAlbListener() *schema.Resource { } } -func resourceAwsAlbListenerCreate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - albArn := d.Get("load_balancer_arn").(string) + lbArn := d.Get("load_balancer_arn").(string) params := &elbv2.CreateListenerInput{ - LoadBalancerArn: aws.String(albArn), + LoadBalancerArn: aws.String(lbArn), Port: aws.Int64(int64(d.Get("port").(int))), Protocol: aws.String(d.Get("protocol").(string)), } @@ -124,11 +124,11 @@ func resourceAwsAlbListenerCreate(d *schema.ResourceData, meta interface{}) erro err := resource.Retry(5*time.Minute, func() *resource.RetryError { var err error - log.Printf("[DEBUG] Creating ALB listener for ARN: %s", d.Get("load_balancer_arn").(string)) + log.Printf("[DEBUG] Creating LB listener for ARN: %s", d.Get("load_balancer_arn").(string)) resp, err = elbconn.CreateListener(params) if awsErr, ok := err.(awserr.Error); ok { if awsErr.Code() == "CertificateNotFound" { - log.Printf("[WARN] Got an error while trying to create ALB listener for ARN: %s: %s", albArn, err) + log.Printf("[WARN] Got an error while trying to create LB listener for ARN: %s: %s", lbArn, err) return resource.RetryableError(err) } } @@ -140,19 +140,19 @@ func resourceAwsAlbListenerCreate(d *schema.ResourceData, meta interface{}) erro }) if err != nil { - return errwrap.Wrapf("Error creating ALB Listener: {{err}}", err) + return errwrap.Wrapf("Error creating LB Listener: {{err}}", err) } if len(resp.Listeners) == 0 { - return errors.New("Error creating ALB Listener: no listeners returned in response") + return errors.New("Error creating LB Listener: no listeners returned in response") } d.SetId(*resp.Listeners[0].ListenerArn) - return resourceAwsAlbListenerRead(d, meta) + return resourceAwsLbListenerRead(d, meta) } -func resourceAwsAlbListenerRead(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn resp, err := elbconn.DescribeListeners(&elbv2.DescribeListenersInput{ @@ -198,7 +198,7 @@ func resourceAwsAlbListenerRead(d *schema.ResourceData, meta interface{}) error return nil } -func resourceAwsAlbListenerUpdate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn params := &elbv2.ModifyListenerInput{ @@ -233,13 +233,13 @@ func resourceAwsAlbListenerUpdate(d *schema.ResourceData, meta interface{}) erro _, err := elbconn.ModifyListener(params) if err != nil { - return errwrap.Wrapf("Error modifying ALB Listener: {{err}}", err) + return errwrap.Wrapf("Error modifying LB Listener: {{err}}", err) } - return resourceAwsAlbListenerRead(d, meta) + return resourceAwsLbListenerRead(d, meta) } -func resourceAwsAlbListenerDelete(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbListenerDelete(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn _, err := elbconn.DeleteListener(&elbv2.DeleteListenerInput{ @@ -252,7 +252,7 @@ func resourceAwsAlbListenerDelete(d *schema.ResourceData, meta interface{}) erro return nil } -func validateAwsAlbListenerPort(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbListenerPort(v interface{}, k string) (ws []string, errors []error) { port := v.(int) if port < 1 || port > 65536 { errors = append(errors, fmt.Errorf("%q must be a valid port number (1-65536)", k)) @@ -260,17 +260,17 @@ func validateAwsAlbListenerPort(v interface{}, k string) (ws []string, errors [] return } -func validateAwsAlbListenerProtocol(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbListenerProtocol(v interface{}, k string) (ws []string, errors []error) { value := strings.ToLower(v.(string)) - if value == "http" || value == "https" { + if value == "http" || value == "https" || value == "tcp" { return } - errors = append(errors, fmt.Errorf("%q must be either %q or %q", k, "HTTP", "HTTPS")) + errors = append(errors, fmt.Errorf("%q must be either %q, %q or %q", k, "HTTP", "HTTPS", "TCP")) return } -func validateAwsAlbListenerActionType(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbListenerActionType(v interface{}, k string) (ws []string, errors []error) { value := strings.ToLower(v.(string)) if value != "forward" { errors = append(errors, fmt.Errorf("%q must have the value %q", k, "forward")) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_listener_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go similarity index 82% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_listener_rule.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go index 3e3a880b8..020dc7d84 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_listener_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go @@ -14,12 +14,12 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func resourceAwsAlbListenerRule() *schema.Resource { +func resourceAwsLbbListenerRule() *schema.Resource { return &schema.Resource{ - Create: resourceAwsAlbListenerRuleCreate, - Read: resourceAwsAlbListenerRuleRead, - Update: resourceAwsAlbListenerRuleUpdate, - Delete: resourceAwsAlbListenerRuleDelete, + Create: resourceAwsLbListenerRuleCreate, + Read: resourceAwsLbListenerRuleRead, + Update: resourceAwsLbListenerRuleUpdate, + Delete: resourceAwsLbListenerRuleDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, @@ -38,7 +38,7 @@ func resourceAwsAlbListenerRule() *schema.Resource { Type: schema.TypeInt, Required: true, ForceNew: true, - ValidateFunc: validateAwsAlbListenerRulePriority, + ValidateFunc: validateAwsLbListenerRulePriority, }, "action": { Type: schema.TypeList, @@ -52,7 +52,7 @@ func resourceAwsAlbListenerRule() *schema.Resource { "type": { Type: schema.TypeString, Required: true, - ValidateFunc: validateAwsAlbListenerActionType, + ValidateFunc: validateAwsLbListenerActionType, }, }, }, @@ -80,7 +80,7 @@ func resourceAwsAlbListenerRule() *schema.Resource { } } -func resourceAwsAlbListenerRuleCreate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn params := &elbv2.CreateRuleInput{ @@ -114,19 +114,19 @@ func resourceAwsAlbListenerRuleCreate(d *schema.ResourceData, meta interface{}) resp, err := elbconn.CreateRule(params) if err != nil { - return errwrap.Wrapf("Error creating ALB Listener Rule: {{err}}", err) + return errwrap.Wrapf("Error creating LB Listener Rule: {{err}}", err) } if len(resp.Rules) == 0 { - return errors.New("Error creating ALB Listener Rule: no rules returned in response") + return errors.New("Error creating LB Listener Rule: no rules returned in response") } d.SetId(*resp.Rules[0].RuleArn) - return resourceAwsAlbListenerRuleRead(d, meta) + return resourceAwsLbListenerRuleRead(d, meta) } -func resourceAwsAlbListenerRuleRead(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn resp, err := elbconn.DescribeRules(&elbv2.DescribeRulesInput{ @@ -150,7 +150,7 @@ func resourceAwsAlbListenerRuleRead(d *schema.ResourceData, meta interface{}) er d.Set("arn", rule.RuleArn) // The listener arn isn't in the response but can be derived from the rule arn - d.Set("listener_arn", albListenerARNFromRuleARN(*rule.RuleArn)) + d.Set("listener_arn", lbListenerARNFromRuleARN(*rule.RuleArn)) // Rules are evaluated in priority order, from the lowest value to the highest value. The default rule has the lowest priority. if *rule.Priority == "default" { @@ -188,7 +188,7 @@ func resourceAwsAlbListenerRuleRead(d *schema.ResourceData, meta interface{}) er return nil } -func resourceAwsAlbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn d.Partial(true) @@ -251,32 +251,32 @@ func resourceAwsAlbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) if requestUpdate { resp, err := elbconn.ModifyRule(params) if err != nil { - return errwrap.Wrapf("Error modifying ALB Listener Rule: {{err}}", err) + return errwrap.Wrapf("Error modifying LB Listener Rule: {{err}}", err) } if len(resp.Rules) == 0 { - return errors.New("Error modifying creating ALB Listener Rule: no rules returned in response") + return errors.New("Error modifying creating LB Listener Rule: no rules returned in response") } } d.Partial(false) - return resourceAwsAlbListenerRuleRead(d, meta) + return resourceAwsLbListenerRuleRead(d, meta) } -func resourceAwsAlbListenerRuleDelete(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbListenerRuleDelete(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn _, err := elbconn.DeleteRule(&elbv2.DeleteRuleInput{ RuleArn: aws.String(d.Id()), }) if err != nil && !isRuleNotFound(err) { - return errwrap.Wrapf("Error deleting ALB Listener Rule: {{err}}", err) + return errwrap.Wrapf("Error deleting LB Listener Rule: {{err}}", err) } return nil } -func validateAwsAlbListenerRulePriority(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbListenerRulePriority(v interface{}, k string) (ws []string, errors []error) { value := v.(int) if value < 1 || value > 99999 { errors = append(errors, fmt.Errorf("%q must be in the range 1-99999", k)) @@ -298,10 +298,10 @@ func validateAwsListenerRuleField(v interface{}, k string) (ws []string, errors // (arn:aws:elasticloadbalancing:us-east-1:012345678912:listener)-rule(/app/name/0123456789abcdef/abcdef0123456789)/456789abcedf1234 // concat to become: // arn:aws:elasticloadbalancing:us-east-1:012345678912:listener/app/name/0123456789abcdef/abcdef0123456789 -var albListenerARNFromRuleARNRegexp = regexp.MustCompile(`^(arn:.+:listener)-rule(/.+)/[^/]+$`) +var lbListenerARNFromRuleARNRegexp = regexp.MustCompile(`^(arn:.+:listener)-rule(/.+)/[^/]+$`) -func albListenerARNFromRuleARN(ruleArn string) string { - if arnComponents := albListenerARNFromRuleARNRegexp.FindStringSubmatch(ruleArn); len(arnComponents) > 1 { +func lbListenerARNFromRuleARN(ruleArn string) string { + if arnComponents := lbListenerARNFromRuleARNRegexp.FindStringSubmatch(ruleArn); len(arnComponents) > 1 { return arnComponents[1] + arnComponents[2] } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go similarity index 67% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_target_group.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go index 5dea1b0cc..b5317ad75 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_target_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go @@ -16,12 +16,12 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func resourceAwsAlbTargetGroup() *schema.Resource { +func resourceAwsLbTargetGroup() *schema.Resource { return &schema.Resource{ - Create: resourceAwsAlbTargetGroupCreate, - Read: resourceAwsAlbTargetGroupRead, - Update: resourceAwsAlbTargetGroupUpdate, - Delete: resourceAwsAlbTargetGroupDelete, + Create: resourceAwsLbTargetGroupCreate, + Read: resourceAwsLbTargetGroupRead, + Update: resourceAwsLbTargetGroupUpdate, + Delete: resourceAwsLbTargetGroupDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, @@ -43,27 +43,27 @@ func resourceAwsAlbTargetGroup() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateAwsAlbTargetGroupName, + ValidateFunc: validateAwsLbTargetGroupName, }, "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateAwsAlbTargetGroupNamePrefix, + ValidateFunc: validateAwsLbTargetGroupNamePrefix, }, "port": { Type: schema.TypeInt, Required: true, ForceNew: true, - ValidateFunc: validateAwsAlbTargetGroupPort, + ValidateFunc: validateAwsLbTargetGroupPort, }, "protocol": { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateAwsAlbTargetGroupProtocol, + ValidateFunc: validateAwsLbTargetGroupProtocol, }, "vpc_id": { @@ -76,7 +76,14 @@ func resourceAwsAlbTargetGroup() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 300, - ValidateFunc: validateAwsAlbTargetGroupDeregistrationDelay, + ValidateFunc: validateAwsLbTargetGroupDeregistrationDelay, + }, + + "target_type": { + Type: schema.TypeString, + Optional: true, + Default: "instance", + ForceNew: true, }, "stickiness": { @@ -94,13 +101,13 @@ func resourceAwsAlbTargetGroup() *schema.Resource { "type": { Type: schema.TypeString, Required: true, - ValidateFunc: validateAwsAlbTargetGroupStickinessType, + ValidateFunc: validateAwsLbTargetGroupStickinessType, }, "cookie_duration": { Type: schema.TypeInt, Optional: true, Default: 86400, - ValidateFunc: validateAwsAlbTargetGroupStickinessCookieDuration, + ValidateFunc: validateAwsLbTargetGroupStickinessCookieDuration, }, }, }, @@ -122,15 +129,14 @@ func resourceAwsAlbTargetGroup() *schema.Resource { "path": { Type: schema.TypeString, Optional: true, - Default: "/", - ValidateFunc: validateAwsAlbTargetGroupHealthCheckPath, + ValidateFunc: validateAwsLbTargetGroupHealthCheckPath, }, "port": { Type: schema.TypeString, Optional: true, Default: "traffic-port", - ValidateFunc: validateAwsAlbTargetGroupHealthCheckPort, + ValidateFunc: validateAwsLbTargetGroupHealthCheckPort, }, "protocol": { @@ -140,34 +146,33 @@ func resourceAwsAlbTargetGroup() *schema.Resource { StateFunc: func(v interface{}) string { return strings.ToUpper(v.(string)) }, - ValidateFunc: validateAwsAlbTargetGroupHealthCheckProtocol, + ValidateFunc: validateAwsLbTargetGroupHealthCheckProtocol, }, "timeout": { Type: schema.TypeInt, Optional: true, - Default: 5, - ValidateFunc: validateAwsAlbTargetGroupHealthCheckTimeout, + Default: 10, + ValidateFunc: validateAwsLbTargetGroupHealthCheckTimeout, }, "healthy_threshold": { Type: schema.TypeInt, Optional: true, - Default: 5, - ValidateFunc: validateAwsAlbTargetGroupHealthCheckHealthyThreshold, + Default: 3, + ValidateFunc: validateAwsLbTargetGroupHealthCheckHealthyThreshold, }, "matcher": { Type: schema.TypeString, Optional: true, - Default: "200", }, "unhealthy_threshold": { Type: schema.TypeInt, Optional: true, - Default: 2, - ValidateFunc: validateAwsAlbTargetGroupHealthCheckHealthyThreshold, + Default: 3, + ValidateFunc: validateAwsLbTargetGroupHealthCheckHealthyThreshold, }, }, }, @@ -178,7 +183,7 @@ func resourceAwsAlbTargetGroup() *schema.Resource { } } -func resourceAwsAlbTargetGroupCreate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbTargetGroupCreate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn var groupName string @@ -191,43 +196,47 @@ func resourceAwsAlbTargetGroupCreate(d *schema.ResourceData, meta interface{}) e } params := &elbv2.CreateTargetGroupInput{ - Name: aws.String(groupName), - Port: aws.Int64(int64(d.Get("port").(int))), - Protocol: aws.String(d.Get("protocol").(string)), - VpcId: aws.String(d.Get("vpc_id").(string)), + Name: aws.String(groupName), + Port: aws.Int64(int64(d.Get("port").(int))), + Protocol: aws.String(d.Get("protocol").(string)), + VpcId: aws.String(d.Get("vpc_id").(string)), + TargetType: aws.String(d.Get("target_type").(string)), } if healthChecks := d.Get("health_check").([]interface{}); len(healthChecks) == 1 { healthCheck := healthChecks[0].(map[string]interface{}) params.HealthCheckIntervalSeconds = aws.Int64(int64(healthCheck["interval"].(int))) - params.HealthCheckPath = aws.String(healthCheck["path"].(string)) params.HealthCheckPort = aws.String(healthCheck["port"].(string)) params.HealthCheckProtocol = aws.String(healthCheck["protocol"].(string)) - params.HealthCheckTimeoutSeconds = aws.Int64(int64(healthCheck["timeout"].(int))) params.HealthyThresholdCount = aws.Int64(int64(healthCheck["healthy_threshold"].(int))) - params.UnhealthyThresholdCount = aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))) - params.Matcher = &elbv2.Matcher{ - HttpCode: aws.String(healthCheck["matcher"].(string)), + + if *params.Protocol != "TCP" { + params.HealthCheckTimeoutSeconds = aws.Int64(int64(healthCheck["timeout"].(int))) + params.HealthCheckPath = aws.String(healthCheck["path"].(string)) + params.Matcher = &elbv2.Matcher{ + HttpCode: aws.String(healthCheck["matcher"].(string)), + } + params.UnhealthyThresholdCount = aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))) } } resp, err := elbconn.CreateTargetGroup(params) if err != nil { - return errwrap.Wrapf("Error creating ALB Target Group: {{err}}", err) + return errwrap.Wrapf("Error creating LB Target Group: {{err}}", err) } if len(resp.TargetGroups) == 0 { - return errors.New("Error creating ALB Target Group: no groups returned in response") + return errors.New("Error creating LB Target Group: no groups returned in response") } targetGroupArn := resp.TargetGroups[0].TargetGroupArn d.SetId(*targetGroupArn) - return resourceAwsAlbTargetGroupUpdate(d, meta) + return resourceAwsLbTargetGroupUpdate(d, meta) } -func resourceAwsAlbTargetGroupRead(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbTargetGroupRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn resp, err := elbconn.DescribeTargetGroups(&elbv2.DescribeTargetGroupsInput{ @@ -246,14 +255,14 @@ func resourceAwsAlbTargetGroupRead(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("Error retrieving Target Group %q", d.Id()) } - return flattenAwsAlbTargetGroupResource(d, meta, resp.TargetGroups[0]) + return flattenAwsLbTargetGroupResource(d, meta, resp.TargetGroups[0]) } -func resourceAwsAlbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn if err := setElbV2Tags(elbconn, d); err != nil { - return errwrap.Wrapf("Error Modifying Tags on ALB Target Group: {{err}}", err) + return errwrap.Wrapf("Error Modifying Tags on LB Target Group: {{err}}", err) } if d.HasChange("health_check") { @@ -264,17 +273,22 @@ func resourceAwsAlbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) e healthCheck := healthChecks[0].(map[string]interface{}) params = &elbv2.ModifyTargetGroupInput{ - TargetGroupArn: aws.String(d.Id()), - HealthCheckIntervalSeconds: aws.Int64(int64(healthCheck["interval"].(int))), - HealthCheckPath: aws.String(healthCheck["path"].(string)), - HealthCheckPort: aws.String(healthCheck["port"].(string)), - HealthCheckProtocol: aws.String(healthCheck["protocol"].(string)), - HealthCheckTimeoutSeconds: aws.Int64(int64(healthCheck["timeout"].(int))), - HealthyThresholdCount: aws.Int64(int64(healthCheck["healthy_threshold"].(int))), - UnhealthyThresholdCount: aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))), - Matcher: &elbv2.Matcher{ + TargetGroupArn: aws.String(d.Id()), + HealthCheckPort: aws.String(healthCheck["port"].(string)), + HealthCheckProtocol: aws.String(healthCheck["protocol"].(string)), + HealthyThresholdCount: aws.Int64(int64(healthCheck["healthy_threshold"].(int))), + } + + healthCheckProtocol := strings.ToLower(healthCheck["protocol"].(string)) + + if healthCheckProtocol != "tcp" { + params.Matcher = &elbv2.Matcher{ HttpCode: aws.String(healthCheck["matcher"].(string)), - }, + } + params.HealthCheckPath = aws.String(healthCheck["path"].(string)) + params.HealthCheckIntervalSeconds = aws.Int64(int64(healthCheck["interval"].(int))) + params.UnhealthyThresholdCount = aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))) + params.HealthCheckTimeoutSeconds = aws.Int64(int64(healthCheck["timeout"].(int))) } } else { params = &elbv2.ModifyTargetGroupInput{ @@ -335,10 +349,10 @@ func resourceAwsAlbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) e } } - return resourceAwsAlbTargetGroupRead(d, meta) + return resourceAwsLbTargetGroupRead(d, meta) } -func resourceAwsAlbTargetGroupDelete(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbTargetGroupDelete(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn _, err := elbconn.DeleteTargetGroup(&elbv2.DeleteTargetGroupInput{ @@ -356,7 +370,7 @@ func isTargetGroupNotFound(err error) bool { return ok && elberr.Code() == "TargetGroupNotFound" } -func validateAwsAlbTargetGroupHealthCheckPath(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupHealthCheckPath(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 1024 { errors = append(errors, fmt.Errorf( @@ -365,7 +379,7 @@ func validateAwsAlbTargetGroupHealthCheckPath(v interface{}, k string) (ws []str return } -func validateAwsAlbTargetGroupHealthCheckPort(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupHealthCheckPort(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if value == "traffic-port" { @@ -384,7 +398,7 @@ func validateAwsAlbTargetGroupHealthCheckPort(v interface{}, k string) (ws []str return } -func validateAwsAlbTargetGroupHealthCheckHealthyThreshold(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupHealthCheckHealthyThreshold(v interface{}, k string) (ws []string, errors []error) { value := v.(int) if value < 2 || value > 10 { errors = append(errors, fmt.Errorf("%q must be an integer between 2 and 10", k)) @@ -392,7 +406,7 @@ func validateAwsAlbTargetGroupHealthCheckHealthyThreshold(v interface{}, k strin return } -func validateAwsAlbTargetGroupHealthCheckTimeout(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupHealthCheckTimeout(v interface{}, k string) (ws []string, errors []error) { value := v.(int) if value < 2 || value > 60 { errors = append(errors, fmt.Errorf("%q must be an integer between 2 and 60", k)) @@ -400,17 +414,17 @@ func validateAwsAlbTargetGroupHealthCheckTimeout(v interface{}, k string) (ws [] return } -func validateAwsAlbTargetGroupHealthCheckProtocol(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupHealthCheckProtocol(v interface{}, k string) (ws []string, errors []error) { value := strings.ToLower(v.(string)) - if value == "http" || value == "https" { + if value == "http" || value == "https" || value == "tcp" { return } - errors = append(errors, fmt.Errorf("%q must be either %q or %q", k, "HTTP", "HTTPS")) + errors = append(errors, fmt.Errorf("%q must be either %q, %q or %q", k, "HTTP", "HTTPS", "TCP")) return } -func validateAwsAlbTargetGroupPort(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupPort(v interface{}, k string) (ws []string, errors []error) { port := v.(int) if port < 1 || port > 65536 { errors = append(errors, fmt.Errorf("%q must be a valid port number (1-65536)", k)) @@ -418,17 +432,17 @@ func validateAwsAlbTargetGroupPort(v interface{}, k string) (ws []string, errors return } -func validateAwsAlbTargetGroupProtocol(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupProtocol(v interface{}, k string) (ws []string, errors []error) { protocol := strings.ToLower(v.(string)) - if protocol == "http" || protocol == "https" { + if protocol == "http" || protocol == "https" || protocol == "tcp" { return } - errors = append(errors, fmt.Errorf("%q must be either %q or %q", k, "HTTP", "HTTPS")) + errors = append(errors, fmt.Errorf("%q must be either %q, %q or %q", k, "HTTP", "HTTPS", "TCP")) return } -func validateAwsAlbTargetGroupDeregistrationDelay(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupDeregistrationDelay(v interface{}, k string) (ws []string, errors []error) { delay := v.(int) if delay < 0 || delay > 3600 { errors = append(errors, fmt.Errorf("%q must be in the range 0-3600 seconds", k)) @@ -436,7 +450,7 @@ func validateAwsAlbTargetGroupDeregistrationDelay(v interface{}, k string) (ws [ return } -func validateAwsAlbTargetGroupStickinessType(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupStickinessType(v interface{}, k string) (ws []string, errors []error) { stickinessType := v.(string) if stickinessType != "lb_cookie" { errors = append(errors, fmt.Errorf("%q must have the value %q", k, "lb_cookie")) @@ -444,7 +458,7 @@ func validateAwsAlbTargetGroupStickinessType(v interface{}, k string) (ws []stri return } -func validateAwsAlbTargetGroupStickinessCookieDuration(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupStickinessCookieDuration(v interface{}, k string) (ws []string, errors []error) { duration := v.(int) if duration < 1 || duration > 604800 { errors = append(errors, fmt.Errorf("%q must be a between 1 second and 1 week (1-604800 seconds))", k)) @@ -452,7 +466,7 @@ func validateAwsAlbTargetGroupStickinessCookieDuration(v interface{}, k string) return } -func albTargetGroupSuffixFromARN(arn *string) string { +func lbTargetGroupSuffixFromARN(arn *string) string { if arn == nil { return "" } @@ -466,27 +480,36 @@ func albTargetGroupSuffixFromARN(arn *string) string { return "" } -// flattenAwsAlbTargetGroupResource takes a *elbv2.TargetGroup and populates all respective resource fields. -func flattenAwsAlbTargetGroupResource(d *schema.ResourceData, meta interface{}, targetGroup *elbv2.TargetGroup) error { +// flattenAwsLbTargetGroupResource takes a *elbv2.TargetGroup and populates all respective resource fields. +func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, targetGroup *elbv2.TargetGroup) error { elbconn := meta.(*AWSClient).elbv2conn d.Set("arn", targetGroup.TargetGroupArn) - d.Set("arn_suffix", albTargetGroupSuffixFromARN(targetGroup.TargetGroupArn)) + d.Set("arn_suffix", lbTargetGroupSuffixFromARN(targetGroup.TargetGroupArn)) d.Set("name", targetGroup.TargetGroupName) d.Set("port", targetGroup.Port) d.Set("protocol", targetGroup.Protocol) d.Set("vpc_id", targetGroup.VpcId) + d.Set("target_type", targetGroup.TargetType) healthCheck := make(map[string]interface{}) healthCheck["interval"] = *targetGroup.HealthCheckIntervalSeconds - healthCheck["path"] = *targetGroup.HealthCheckPath healthCheck["port"] = *targetGroup.HealthCheckPort healthCheck["protocol"] = *targetGroup.HealthCheckProtocol healthCheck["timeout"] = *targetGroup.HealthCheckTimeoutSeconds healthCheck["healthy_threshold"] = *targetGroup.HealthyThresholdCount healthCheck["unhealthy_threshold"] = *targetGroup.UnhealthyThresholdCount - healthCheck["matcher"] = *targetGroup.Matcher.HttpCode - d.Set("health_check", []interface{}{healthCheck}) + + if targetGroup.HealthCheckPath != nil { + healthCheck["path"] = *targetGroup.HealthCheckPath + } + if targetGroup.Matcher.HttpCode != nil { + healthCheck["matcher"] = *targetGroup.Matcher.HttpCode + } + + if err := d.Set("health_check", []interface{}{healthCheck}); err != nil { + log.Printf("[WARN] Error setting health check: %s", err) + } attrResp, err := elbconn.DescribeTargetGroupAttributes(&elbv2.DescribeTargetGroupAttributesInput{ TargetGroupArn: aws.String(d.Id()), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_target_group_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go similarity index 77% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_target_group_attachment.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go index 55a3b7392..74eeaa850 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_alb_target_group_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go @@ -12,11 +12,11 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func resourceAwsAlbTargetGroupAttachment() *schema.Resource { +func resourceAwsLbTargetGroupAttachment() *schema.Resource { return &schema.Resource{ - Create: resourceAwsAlbAttachmentCreate, - Read: resourceAwsAlbAttachmentRead, - Delete: resourceAwsAlbAttachmentDelete, + Create: resourceAwsLbAttachmentCreate, + Read: resourceAwsLbAttachmentRead, + Delete: resourceAwsLbAttachmentDelete, Schema: map[string]*schema.Schema{ "target_group_arn": { @@ -36,11 +36,17 @@ func resourceAwsAlbTargetGroupAttachment() *schema.Resource { ForceNew: true, Optional: true, }, + + "availability_zone": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + }, }, } } -func resourceAwsAlbAttachmentCreate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbAttachmentCreate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn target := &elbv2.TargetDescription{ @@ -51,6 +57,10 @@ func resourceAwsAlbAttachmentCreate(d *schema.ResourceData, meta interface{}) er target.Port = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("availability_zone"); ok { + target.AvailabilityZone = aws.String(v.(string)) + } + params := &elbv2.RegisterTargetsInput{ TargetGroupArn: aws.String(d.Get("target_group_arn").(string)), Targets: []*elbv2.TargetDescription{target}, @@ -69,7 +79,7 @@ func resourceAwsAlbAttachmentCreate(d *schema.ResourceData, meta interface{}) er return nil } -func resourceAwsAlbAttachmentDelete(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbAttachmentDelete(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn target := &elbv2.TargetDescription{ @@ -80,6 +90,10 @@ func resourceAwsAlbAttachmentDelete(d *schema.ResourceData, meta interface{}) er target.Port = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("availability_zone"); ok { + target.AvailabilityZone = aws.String(v.(string)) + } + params := &elbv2.DeregisterTargetsInput{ TargetGroupArn: aws.String(d.Get("target_group_arn").(string)), Targets: []*elbv2.TargetDescription{target}, @@ -95,9 +109,9 @@ func resourceAwsAlbAttachmentDelete(d *schema.ResourceData, meta interface{}) er return nil } -// resourceAwsAlbAttachmentRead requires all of the fields in order to describe the correct +// resourceAwsLbAttachmentRead requires all of the fields in order to describe the correct // target, so there is no work to do beyond ensuring that the target and group still exist. -func resourceAwsAlbAttachmentRead(d *schema.ResourceData, meta interface{}) error { +func resourceAwsLbAttachmentRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn target := &elbv2.TargetDescription{ @@ -108,6 +122,10 @@ func resourceAwsAlbAttachmentRead(d *schema.ResourceData, meta interface{}) erro target.Port = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("availability_zone"); ok { + target.AvailabilityZone = aws.String(v.(string)) + } + resp, err := elbconn.DescribeTargetHealth(&elbv2.DescribeTargetHealthInput{ TargetGroupArn: aws.String(d.Get("target_group_arn").(string)), Targets: []*elbv2.TargetDescription{target}, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go index 1ec5e986e..76045c992 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go @@ -17,6 +17,7 @@ func resourceAwsNatGateway() *schema.Resource { return &schema.Resource{ Create: resourceAwsNatGatewayCreate, Read: resourceAwsNatGatewayRead, + Update: resourceAwsNatGatewayUpdate, Delete: resourceAwsNatGatewayDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, @@ -52,6 +53,8 @@ func resourceAwsNatGateway() *schema.Resource { Optional: true, Computed: true, }, + + "tags": tagsSchema(), }, } } @@ -90,7 +93,7 @@ func resourceAwsNatGatewayCreate(d *schema.ResourceData, meta interface{}) error } // Update our attributes and return - return resourceAwsNatGatewayRead(d, meta) + return resourceAwsNatGatewayUpdate(d, meta) } func resourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { @@ -125,9 +128,27 @@ func resourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { d.Set("private_ip", address.PrivateIp) d.Set("public_ip", address.PublicIp) + // Tags + d.Set("tags", tagsToMap(ng.Tags)) + return nil } +func resourceAwsNatGatewayUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + // Turn on partial mode + d.Partial(true) + + if err := setTags(conn, d); err != nil { + return err + } + d.SetPartial("tags") + + d.Partial(false) + return resourceAwsNatGatewayRead(d, meta) +} + func resourceAwsNatGatewayDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn deleteOpts := &ec2.DeleteNatGatewayInput{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface.go index 857237141..5825e0d87 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface.go @@ -40,6 +40,11 @@ func resourceAwsNetworkInterface() *schema.Resource { Computed: true, }, + "private_dns_name": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "private_ips": &schema.Schema{ Type: schema.TypeSet, Optional: true, @@ -162,6 +167,7 @@ func resourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) e eni := describeResp.NetworkInterfaces[0] d.Set("subnet_id", eni.SubnetId) d.Set("private_ip", eni.PrivateIpAddress) + d.Set("private_dns_name", eni.PrivateDnsName) d.Set("private_ips", flattenNetworkInterfacesPrivateIPAddresses(eni.PrivateIpAddresses)) d.Set("security_groups", flattenGroupIdentifiers(eni.Groups)) d.Set("source_dest_check", eni.SourceDestCheck) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go index 7333018e5..9d3df69cd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go @@ -21,10 +21,6 @@ func resourceAwsOpsworksApplication() *schema.Resource { Update: resourceAwsOpsworksApplicationUpdate, Delete: resourceAwsOpsworksApplicationDelete, Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, "name": { Type: schema.TypeString, Required: true, @@ -345,7 +341,6 @@ func resourceAwsOpsworksApplicationCreate(d *schema.ResourceData, meta interface appID := *resp.AppId d.SetId(appID) - d.Set("id", appID) return resourceAwsOpsworksApplicationRead(d, meta) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go index 255487727..08770b359 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go @@ -32,11 +32,6 @@ func resourceAwsOpsworksInstance() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - "agent_version": { Type: schema.TypeString, Optional: true, @@ -564,7 +559,6 @@ func resourceAwsOpsworksInstanceRead(d *schema.ResourceData, meta interface{}) e d.Set("hostname", instance.Hostname) d.Set("infrastructure_class", instance.InfrastructureClass) d.Set("install_updates_on_boot", instance.InstallUpdatesOnBoot) - d.Set("id", instanceId) d.Set("instance_profile_arn", instance.InstanceProfileArn) d.Set("instance_type", instance.InstanceType) d.Set("last_service_error_id", instance.LastServiceErrorId) @@ -785,7 +779,6 @@ func resourceAwsOpsworksInstanceCreate(d *schema.ResourceData, meta interface{}) instanceId := *resp.InstanceId d.SetId(instanceId) - d.Set("id", instanceId) if v, ok := d.GetOk("state"); ok && v.(string) == "running" { err := startOpsworksInstance(d, meta, true, d.Timeout(schema.TimeoutCreate)) @@ -806,9 +799,9 @@ func resourceAwsOpsworksInstanceUpdate(d *schema.ResourceData, meta interface{}) } req := &opsworks.UpdateInstanceInput{ + InstanceId: aws.String(d.Id()), AgentVersion: aws.String(d.Get("agent_version").(string)), Architecture: aws.String(d.Get("architecture").(string)), - InstanceId: aws.String(d.Get("id").(string)), InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), } @@ -918,7 +911,7 @@ func resourceAwsOpsworksInstanceImport( func startOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, timeout time.Duration) error { client := meta.(*AWSClient).opsworksconn - instanceId := d.Get("id").(string) + instanceId := d.Id() req := &opsworks.StartInstanceInput{ InstanceId: aws.String(instanceId), @@ -956,7 +949,7 @@ func startOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, func stopOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, timeout time.Duration) error { client := meta.(*AWSClient).opsworksconn - instanceId := d.Get("id").(string) + instanceId := d.Id() req := &opsworks.StopInstanceInput{ InstanceId: aws.String(instanceId), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go index f1292a2fe..13757228d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go @@ -20,10 +20,6 @@ func resourceAwsOpsworksPermission() *schema.Resource { Read: resourceAwsOpsworksPermissionRead, Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, "allow_ssh": { Type: schema.TypeBool, Computed: true, @@ -104,7 +100,6 @@ func resourceAwsOpsworksPermissionRead(d *schema.ResourceData, meta interface{}) if d.Get("user_arn").(string)+d.Get("stack_id").(string) == id { found = true d.SetId(id) - d.Set("id", id) d.Set("allow_ssh", permission.AllowSsh) d.Set("allow_sudo", permission.AllowSudo) d.Set("user_arn", permission.IamUserArn) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go index d1aee9030..ef0d61f70 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go @@ -20,10 +20,6 @@ func resourceAwsOpsworksRdsDbInstance() *schema.Resource { Read: resourceAwsOpsworksRdsDbInstanceRead, Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, "stack_id": { Type: schema.TypeString, Required: true, @@ -154,7 +150,6 @@ func resourceAwsOpsworksRdsDbInstanceRead(d *schema.ResourceData, meta interface if fmt.Sprintf("%s%s", d.Get("rds_db_instance_arn").(string), d.Get("stack_id").(string)) == id { found = true d.SetId(id) - d.Set("id", id) d.Set("stack_id", instance.StackId) d.Set("rds_db_instance_arn", instance.RdsDbInstanceArn) d.Set("db_user", instance.DbUser) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go index f7f2283f1..a173da10a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go @@ -40,11 +40,6 @@ func resourceAwsOpsworksStack() *schema.Resource { Computed: true, }, - "id": { - Type: schema.TypeString, - Computed: true, - }, - "name": { Type: schema.TypeString, Required: true, @@ -476,7 +471,6 @@ func resourceAwsOpsworksStackCreate(d *schema.ResourceData, meta interface{}) er stackId := *resp.StackId d.SetId(stackId) - d.Set("id", stackId) if inVpc && *req.UseOpsworksSecurityGroups { // For VPC-based stacks, OpsWorks asynchronously creates some default diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go index 39670b295..ce24f5b2f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_user_profile.go @@ -18,11 +18,6 @@ func resourceAwsOpsworksUserProfile() *schema.Resource { Delete: resourceAwsOpsworksUserProfileDelete, Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - "user_arn": { Type: schema.TypeString, Required: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go index fe22f0959..80cd7abab 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go @@ -96,9 +96,18 @@ func resourceAwsRDSCluster() *schema.Resource { }, "engine": { + Type: schema.TypeString, + Optional: true, + Default: "aurora", + ForceNew: true, + ValidateFunc: validateRdsEngine, + }, + + "engine_version": { Type: schema.TypeString, Optional: true, - Default: "aurora", + ForceNew: true, + Computed: true, }, "storage_encrypted": { @@ -371,6 +380,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) } @@ -542,6 +555,12 @@ func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error { return nil } + return flattenAwsRdsClusterResource(d, meta, dbc) +} + +func flattenAwsRdsClusterResource(d *schema.ResourceData, meta interface{}, dbc *rds.DBCluster) error { + conn := meta.(*AWSClient).rdsconn + if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { return fmt.Errorf("[DEBUG] Error saving AvailabilityZones to state for RDS Cluster (%s): %s", d.Id(), err) } @@ -560,6 +579,7 @@ func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error { d.Set("db_cluster_parameter_group_name", dbc.DBClusterParameterGroup) d.Set("endpoint", dbc.Endpoint) d.Set("engine", dbc.Engine) + d.Set("engine_version", dbc.EngineVersion) d.Set("master_username", dbc.MasterUsername) d.Set("port", dbc.Port) d.Set("storage_encrypted", dbc.StorageEncrypted) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go index ef66b10de..269d28458 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go @@ -84,6 +84,21 @@ func resourceAwsRDSClusterInstance() *schema.Resource { Required: true, }, + "engine": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "aurora", + ValidateFunc: validateRdsEngine, + }, + + "engine_version": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + "db_parameter_group_name": { Type: schema.TypeString, Optional: true, @@ -176,7 +191,7 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ createOpts := &rds.CreateDBInstanceInput{ DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - Engine: aws.String("aurora"), + Engine: aws.String(d.Get("engine").(string)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), PromotionTier: aws.Int64(int64(d.Get("promotion_tier").(int))), AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), @@ -201,6 +216,10 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ createOpts.DBSubnetGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + if attr, ok := d.GetOk("monitoring_role_arn"); ok { createOpts.MonitoringRoleArn = aws.String(attr.(string)) } @@ -227,7 +246,10 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ // reuse db_instance refresh func stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying"}, + Pending: []string{"creating", "backing-up", "modifying", + "configuring-enhanced-monitoring", "maintenance", + "rebooting", "renaming", "resetting-master-credentials", + "starting", "upgrading"}, Target: []string{"available"}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d, meta), Timeout: d.Timeout(schema.TimeoutCreate), @@ -292,6 +314,8 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) d.Set("publicly_accessible", db.PubliclyAccessible) d.Set("cluster_identifier", db.DBClusterIdentifier) + d.Set("engine", db.Engine) + d.Set("engine_version", db.EngineVersion) d.Set("instance_class", db.DBInstanceClass) d.Set("identifier", db.DBInstanceIdentifier) d.Set("dbi_resource_id", db.DbiResourceId) @@ -393,7 +417,10 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ // reuse db_instance refresh func stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying"}, + Pending: []string{"creating", "backing-up", "modifying", + "configuring-enhanced-monitoring", "maintenance", + "rebooting", "renaming", "resetting-master-credentials", + "starting", "upgrading"}, Target: []string{"available"}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d, meta), Timeout: d.Timeout(schema.TimeoutUpdate), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go index e80ac0a3e..c652b25ae 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go @@ -52,6 +52,7 @@ func resourceAwsRedshiftCluster() *schema.Resource { "master_username": { Type: schema.TypeString, Optional: true, + ForceNew: true, ValidateFunc: validateRedshiftClusterMasterUsername, }, @@ -218,32 +219,89 @@ func resourceAwsRedshiftCluster() *schema.Resource { Set: schema.HashString, }, - "enable_logging": { - Type: schema.TypeBool, + "snapshot_copy": { + Type: schema.TypeList, + MaxItems: 1, Optional: true, - Default: false, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "destination_region": { + Type: schema.TypeString, + Required: true, + }, + "retention_period": { + Type: schema.TypeInt, + Optional: true, + Default: 7, + }, + "grant_name": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "logging": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enable": { + Type: schema.TypeBool, + Required: true, + }, + + "bucket_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "s3_key_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + }, + }, + + "enable_logging": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + Deprecated: "Use enable in the 'logging' block instead", + ConflictsWith: []string{"logging"}, }, "bucket_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + Deprecated: "Use bucket_name in the 'logging' block instead", + ConflictsWith: []string{"logging"}, }, "s3_key_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + Deprecated: "Use s3_key_prefix in the 'logging' block instead", + ConflictsWith: []string{"logging"}, }, "snapshot_identifier": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "snapshot_cluster_identifier": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "owner_account": { @@ -436,14 +494,21 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("[WARN] Error waiting for Redshift Cluster state to be \"available\": %s", err) } - if _, ok := d.GetOk("enable_logging"); ok { + if v, ok := d.GetOk("snapshot_copy"); ok { + err := enableRedshiftSnapshotCopy(d.Id(), v.([]interface{}), conn) + if err != nil { + return err + } + } + logging, ok := d.GetOk("logging.0.enable") + _, deprecatedOk := d.GetOk("enable_logging") + if (ok && logging.(bool)) || deprecatedOk { loggingErr := enableRedshiftClusterLogging(d, conn) if loggingErr != nil { log.Printf("[ERROR] Error Enabling Logging on Redshift Cluster: %s", err) return loggingErr } - } return resourceAwsRedshiftClusterRead(d, meta) @@ -550,10 +615,15 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er d.Set("cluster_revision_number", rsc.ClusterRevisionNumber) d.Set("tags", tagsToMapRedshift(rsc.Tags)) + d.Set("snapshot_copy", flattenRedshiftSnapshotCopy(rsc.ClusterSnapshotCopyStatus)) + + // TODO: Deprecated fields - remove in next major version d.Set("bucket_name", loggingStatus.BucketName) d.Set("enable_logging", loggingStatus.LoggingEnabled) d.Set("s3_key_prefix", loggingStatus.S3KeyPrefix) + d.Set("logging", flattenRedshiftLogging(loggingStatus)) + return nil } @@ -708,17 +778,36 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) } } - if d.HasChange("enable_logging") || d.HasChange("bucket_name") || d.HasChange("s3_key_prefix") { - var loggingErr error - if _, ok := d.GetOk("enable_logging"); ok { + if d.HasChange("snapshot_copy") { + if v, ok := d.GetOk("snapshot_copy"); ok { + err := enableRedshiftSnapshotCopy(d.Id(), v.([]interface{}), conn) + if err != nil { + return err + } + } else { + _, err := conn.DisableSnapshotCopy(&redshift.DisableSnapshotCopyInput{ + ClusterIdentifier: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("Failed to disable snapshot copy: %s", err) + } + } + } + deprecatedHasChange := (d.HasChange("enable_logging") || d.HasChange("bucket_name") || d.HasChange("s3_key_prefix")) + if d.HasChange("logging") || deprecatedHasChange { + var loggingErr error + + logging, ok := d.GetOk("logging.0.enable") + _, deprecatedOk := d.GetOk("enable_logging") + + if (ok && logging.(bool)) || deprecatedOk { log.Printf("[INFO] Enabling Logging for Redshift Cluster %q", d.Id()) loggingErr = enableRedshiftClusterLogging(d, conn) if loggingErr != nil { return loggingErr } } else { - log.Printf("[INFO] Disabling Logging for Redshift Cluster %q", d.Id()) _, loggingErr = conn.DisableLogging(&redshift.DisableLoggingInput{ ClusterIdentifier: aws.String(d.Id()), @@ -729,6 +818,7 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) } d.SetPartial("enable_logging") + d.SetPartial("logging") } d.Partial(false) @@ -737,17 +827,30 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) } func enableRedshiftClusterLogging(d *schema.ResourceData, conn *redshift.Redshift) error { - if _, ok := d.GetOk("bucket_name"); !ok { + var bucketName, v interface{} + var deprecatedOk, ok bool + bucketName, deprecatedOk = d.GetOk("bucket_name") + v, ok = d.GetOk("logging.0.bucket_name") + if ok { + bucketName = v + } + if !ok && !deprecatedOk { return fmt.Errorf("bucket_name must be set when enabling logging for Redshift Clusters") } params := &redshift.EnableLoggingInput{ ClusterIdentifier: aws.String(d.Id()), - BucketName: aws.String(d.Get("bucket_name").(string)), + BucketName: aws.String(bucketName.(string)), } - if v, ok := d.GetOk("s3_key_prefix"); ok { - params.S3KeyPrefix = aws.String(v.(string)) + var s3KeyPrefix interface{} + s3KeyPrefix, deprecatedOk = d.GetOk("s3_key_prefix") + v, ok = d.GetOk("logging.0.s3_key_prefix") + if ok { + s3KeyPrefix = v + } + if ok || deprecatedOk { + params.S3KeyPrefix = aws.String(s3KeyPrefix.(string)) } _, loggingErr := conn.EnableLogging(params) @@ -758,6 +861,27 @@ func enableRedshiftClusterLogging(d *schema.ResourceData, conn *redshift.Redshif return nil } +func enableRedshiftSnapshotCopy(id string, scList []interface{}, conn *redshift.Redshift) error { + sc := scList[0].(map[string]interface{}) + + input := redshift.EnableSnapshotCopyInput{ + ClusterIdentifier: aws.String(id), + DestinationRegion: aws.String(sc["destination_region"].(string)), + } + if rp, ok := sc["retention_period"]; ok { + input.RetentionPeriod = aws.Int64(int64(rp.(int))) + } + if gn, ok := sc["grant_name"]; ok { + input.SnapshotCopyGrantName = aws.String(gn.(string)) + } + + _, err := conn.EnableSnapshotCopy(&input) + if err != nil { + return fmt.Errorf("Failed to enable snapshot copy: %s", err) + } + return nil +} + func resourceAwsRedshiftClusterDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn log.Printf("[DEBUG] Destroying Redshift Cluster (%s)", d.Id()) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go index e94ab8d78..808a1886e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_parameter_group.go @@ -6,13 +6,10 @@ import ( "log" "regexp" "strings" - "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/redshift" "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -169,41 +166,15 @@ func resourceAwsRedshiftParameterGroupUpdate(d *schema.ResourceData, meta interf } func resourceAwsRedshiftParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"destroyed"}, - Refresh: resourceAwsRedshiftParameterGroupDeleteRefreshFunc(d, meta), - Timeout: 3 * time.Minute, - MinTimeout: 1 * time.Second, - } - _, err := stateConf.WaitForState() - return err -} - -func resourceAwsRedshiftParameterGroupDeleteRefreshFunc( - d *schema.ResourceData, - meta interface{}) resource.StateRefreshFunc { conn := meta.(*AWSClient).redshiftconn - return func() (interface{}, string, error) { - - deleteOpts := redshift.DeleteClusterParameterGroupInput{ - ParameterGroupName: aws.String(d.Id()), - } - - if _, err := conn.DeleteClusterParameterGroup(&deleteOpts); err != nil { - redshiftErr, ok := err.(awserr.Error) - if !ok { - return d, "error", err - } - - if redshiftErr.Code() != "RedshiftParameterGroupNotFoundFault" { - return d, "error", err - } - } - - return d, "destroyed", nil + _, err := conn.DeleteClusterParameterGroup(&redshift.DeleteClusterParameterGroupInput{ + ParameterGroupName: aws.String(d.Id()), + }) + if err != nil && isAWSErr(err, "RedshiftParameterGroupNotFoundFault", "") { + return nil } + return err } func resourceAwsRedshiftParameterHash(v interface{}) int { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go index 118abffe4..3fe956394 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go @@ -4,12 +4,9 @@ import ( "fmt" "log" "regexp" - "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -86,7 +83,7 @@ func resourceAwsRedshiftSubnetGroupRead(d *schema.ResourceData, meta interface{} describeResp, err := conn.DescribeClusterSubnetGroups(&describeOpts) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "ClusterSubnetGroupNotFoundFault" { + if isAWSErr(err, "ClusterSubnetGroupNotFoundFault", "") { log.Printf("[INFO] Redshift Subnet Group: %s was not found", d.Id()) d.SetId("") return nil @@ -147,39 +144,16 @@ func resourceAwsRedshiftSubnetGroupUpdate(d *schema.ResourceData, meta interface } func resourceAwsRedshiftSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { - stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"destroyed"}, - Refresh: resourceAwsRedshiftSubnetGroupDeleteRefreshFunc(d, meta), - Timeout: 3 * time.Minute, - MinTimeout: 1 * time.Second, - } - _, err := stateConf.WaitForState() - return err -} - -func resourceAwsRedshiftSubnetGroupDeleteRefreshFunc(d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { conn := meta.(*AWSClient).redshiftconn - return func() (interface{}, string, error) { - - deleteOpts := redshift.DeleteClusterSubnetGroupInput{ - ClusterSubnetGroupName: aws.String(d.Id()), - } - - if _, err := conn.DeleteClusterSubnetGroup(&deleteOpts); err != nil { - redshiftErr, ok := err.(awserr.Error) - if !ok { - return d, "error", err - } - - if redshiftErr.Code() != "ClusterSubnetGroupNotFoundFault" { - return d, "error", err - } - } - - return d, "destroyed", nil + _, err := conn.DeleteClusterSubnetGroup(&redshift.DeleteClusterSubnetGroupInput{ + ClusterSubnetGroupName: aws.String(d.Id()), + }) + if err != nil && isAWSErr(err, "ClusterSubnetGroupNotFoundFault", "") { + return nil } + + return err } func subnetIdsToSlice(subnetIds []*redshift.Subnet) []string { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go index 150ad5fbf..719825ffe 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go @@ -125,6 +125,7 @@ func resourceAwsRoute53Record() *schema.Resource { "geolocation_routing_policy", "latency_routing_policy", "weighted_routing_policy", + "multivalue_answer_routing_policy", }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -150,6 +151,7 @@ func resourceAwsRoute53Record() *schema.Resource { "failover_routing_policy", "geolocation_routing_policy", "weighted_routing_policy", + "multivalue_answer_routing_policy", }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -168,6 +170,7 @@ func resourceAwsRoute53Record() *schema.Resource { "failover_routing_policy", "latency_routing_policy", "weighted_routing_policy", + "multivalue_answer_routing_policy", }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -194,6 +197,7 @@ func resourceAwsRoute53Record() *schema.Resource { "failover_routing_policy", "geolocation_routing_policy", "latency_routing_policy", + "multivalue_answer_routing_policy", }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -205,6 +209,17 @@ func resourceAwsRoute53Record() *schema.Resource { }, }, + "multivalue_answer_routing_policy": { + Type: schema.TypeBool, + Optional: true, + ConflictsWith: []string{ + "failover_routing_policy", + "geolocation_routing_policy", + "latency_routing_policy", + "weighted_routing_policy", + }, + }, + "health_check_id": { // ID of health check Type: schema.TypeString, Optional: true, @@ -543,6 +558,12 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro } } + if record.MultiValueAnswer != nil { + if err := d.Set("multivalue_answer_routing_policy", *record.MultiValueAnswer); err != nil { + return fmt.Errorf("[DEBUG] Error setting multivalue answer records for: %s, error: %#v", d.Id(), err) + } + } + d.Set("set_identifier", record.SetIdentifier) d.Set("health_check_id", record.HealthCheckId) @@ -762,11 +783,11 @@ func resourceAwsRoute53RecordBuildSet(d *schema.ResourceData, zoneName string) ( if v, ok := d.GetOk("weighted_routing_policy"); ok { if _, ok := d.GetOk("set_identifier"); !ok { - return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "weight_routing_policy" is set`, d.Get("name").(string)) + return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "weighted_routing_policy" is set`, d.Get("name").(string)) } records := v.([]interface{}) if len(records) > 1 { - return nil, fmt.Errorf("You can only define a single weighed_routing_policy per record") + return nil, fmt.Errorf("You can only define a single weighted_routing_policy per record") } weight := records[0].(map[string]interface{}) @@ -808,6 +829,13 @@ func resourceAwsRoute53RecordBuildSet(d *schema.ResourceData, zoneName string) ( log.Printf("[DEBUG] Creating geolocation: %#v", geolocation) } + if v, ok := d.GetOk("multivalue_answer_routing_policy"); ok { + if _, ok := d.GetOk("set_identifier"); !ok { + return nil, fmt.Errorf(`provider.aws: aws_route53_record: %s: "set_identifier": required field is not set when "multivalue_answer_routing_policy" is set`, d.Get("name").(string)) + } + rec.MultiValueAnswer = aws.Bool(v.(bool)) + } + return rec, nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go index b30d38829..0373db672 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go @@ -122,7 +122,7 @@ func resourceAwsRoute53ZoneCreate(d *schema.ResourceData, meta interface{}) erro Delay: 30 * time.Second, Pending: []string{"PENDING"}, Target: []string{"INSYNC"}, - Timeout: 10 * time.Minute, + Timeout: 15 * time.Minute, MinTimeout: 2 * time.Second, Refresh: func() (result interface{}, state string, err error) { changeRequest := &route53.GetChangeInput{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go index f5c72e2d5..829898b34 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route_table.go @@ -118,10 +118,11 @@ func resourceAwsRouteTableCreate(d *schema.ResourceData, meta interface{}) error "[DEBUG] Waiting for route table (%s) to become available", d.Id()) stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"ready"}, - Refresh: resourceAwsRouteTableStateRefreshFunc(conn, d.Id()), - Timeout: 10 * time.Minute, + Pending: []string{"pending"}, + Target: []string{"ready"}, + Refresh: resourceAwsRouteTableStateRefreshFunc(conn, d.Id()), + Timeout: 10 * time.Minute, + NotFoundChecks: 40, } if _, err := stateConf.WaitForState(); err != nil { return fmt.Errorf( diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go index e5d88c3ea..d42025edd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go @@ -652,19 +652,22 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { } else { var host string var path string + var query string parsedHostName, err := url.Parse(*v.HostName) if err == nil { host = parsedHostName.Host path = parsedHostName.Path + query = parsedHostName.RawQuery } else { host = *v.HostName path = "" } w["redirect_all_requests_to"] = (&url.URL{ - Host: host, - Path: path, - Scheme: *v.Protocol, + Host: host, + Path: path, + Scheme: *v.Protocol, + RawQuery: query, }).String() } } @@ -1227,6 +1230,10 @@ func resourceAwsS3BucketWebsitePut(s3conn *s3.S3, d *schema.ResourceData, websit if redirect.Path != "" { redirectHostBuf.WriteString(redirect.Path) } + if redirect.RawQuery != "" { + redirectHostBuf.WriteString("?") + redirectHostBuf.WriteString(redirect.RawQuery) + } websiteConfiguration.RedirectAllRequestsTo = &s3.RedirectAllRequestsTo{HostName: aws.String(redirectHostBuf.String()), Protocol: aws.String(redirect.Scheme)} } else { websiteConfiguration.RedirectAllRequestsTo = &s3.RedirectAllRequestsTo{HostName: aws.String(redirectAllRequestsTo)} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go index 0148a0ff8..9c8426e39 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go @@ -27,6 +27,9 @@ func resourceAwsSecurityGroup() *schema.Resource { State: resourceAwsSecurityGroupImportState, }, + SchemaVersion: 1, + MigrateState: resourceAwsSecurityGroupMigrateState, + Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, @@ -132,6 +135,12 @@ func resourceAwsSecurityGroup() *schema.Resource { Optional: true, Default: false, }, + + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateSecurityGroupRuleDescription, + }, }, }, Set: resourceAwsSecurityGroupRuleHash, @@ -195,6 +204,12 @@ func resourceAwsSecurityGroup() *schema.Resource { Optional: true, Default: false, }, + + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateSecurityGroupRuleDescription, + }, }, }, Set: resourceAwsSecurityGroupRuleHash, @@ -206,6 +221,12 @@ func resourceAwsSecurityGroup() *schema.Resource { }, "tags": tagsSchema(), + + "revoke_rules_on_delete": { + Type: schema.TypeBool, + Default: false, + Optional: true, + }, }, } } @@ -314,9 +335,9 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er _, err = conn.RevokeSecurityGroupEgress(req) if err != nil { - //If we have a NotFound, then we are trying to remove the default IPv6 egress of a non-IPv6 + //If we have a NotFound or InvalidParameterValue, then we are trying to remove the default IPv6 egress of a non-IPv6 //enabled SG - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() != "InvalidPermission.NotFound" { + if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() != "InvalidPermission.NotFound" && !isAWSErr(err, "InvalidParameterValue", "remote-ipv6-range") { return fmt.Errorf( "Error revoking default IPv6 egress rule for Security Group (%s): %s", d.Id(), err) @@ -415,6 +436,13 @@ func resourceAwsSecurityGroupDelete(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("Failed to delete Lambda ENIs: %s", err) } + // conditionally revoke rules first before attempting to delete the group + if v := d.Get("revoke_rules_on_delete").(bool); v { + if err := forceRevokeSecurityGroupRules(conn, d); err != nil { + return err + } + } + return resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.DeleteSecurityGroup(&ec2.DeleteSecurityGroupInput{ GroupId: aws.String(d.Id()), @@ -441,6 +469,52 @@ func resourceAwsSecurityGroupDelete(d *schema.ResourceData, meta interface{}) er }) } +// Revoke all ingress/egress rules that a Security Group has +func forceRevokeSecurityGroupRules(conn *ec2.EC2, d *schema.ResourceData) error { + sgRaw, _, err := SGStateRefreshFunc(conn, d.Id())() + if err != nil { + return err + } + if sgRaw == nil { + return nil + } + + group := sgRaw.(*ec2.SecurityGroup) + if len(group.IpPermissions) > 0 { + req := &ec2.RevokeSecurityGroupIngressInput{ + GroupId: group.GroupId, + IpPermissions: group.IpPermissions, + } + if group.VpcId == nil || *group.VpcId == "" { + req.GroupId = nil + req.GroupName = group.GroupName + } + _, err = conn.RevokeSecurityGroupIngress(req) + + if err != nil { + return fmt.Errorf( + "Error revoking security group %s rules: %s", + *group.GroupId, err) + } + } + + if len(group.IpPermissionsEgress) > 0 { + req := &ec2.RevokeSecurityGroupEgressInput{ + GroupId: group.GroupId, + IpPermissions: group.IpPermissionsEgress, + } + _, err = conn.RevokeSecurityGroupEgress(req) + + if err != nil { + return fmt.Errorf( + "Error revoking security group %s rules: %s", + *group.GroupId, err) + } + } + + return nil +} + func resourceAwsSecurityGroupRuleHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) @@ -500,6 +574,9 @@ func resourceAwsSecurityGroupRuleHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", v)) } } + if m["description"].(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", m["description"].(string))) + } return hashcode.String(buf.String()) } @@ -526,6 +603,8 @@ func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpP m["to_port"] = toPort m["protocol"] = *perm.IpProtocol + var description string + if len(perm.IpRanges) > 0 { raw, ok := m["cidr_blocks"] if !ok { @@ -535,6 +614,11 @@ func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpP for _, ip := range perm.IpRanges { list = append(list, *ip.CidrIp) + + desc := aws.StringValue(ip.Description) + if desc != "" { + description = desc + } } m["cidr_blocks"] = list @@ -549,6 +633,11 @@ func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpP for _, ip := range perm.Ipv6Ranges { list = append(list, *ip.CidrIpv6) + + desc := aws.StringValue(ip.Description) + if desc != "" { + description = desc + } } m["ipv6_cidr_blocks"] = list @@ -563,6 +652,11 @@ func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpP for _, pl := range perm.PrefixListIds { list = append(list, *pl.PrefixListId) + + desc := aws.StringValue(pl.Description) + if desc != "" { + description = desc + } } m["prefix_list_ids"] = list @@ -573,6 +667,11 @@ func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpP if *g.GroupId == groupId { groups[i], groups = groups[len(groups)-1], groups[:len(groups)-1] m["self"] = true + + desc := aws.StringValue(g.Description) + if desc != "" { + description = desc + } } } @@ -589,10 +688,17 @@ func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpP } else { list.Add(*g.GroupId) } + + desc := aws.StringValue(g.Description) + if desc != "" { + description = desc + } } m["security_groups"] = list } + + m["description"] = description } rules := make([]map[string]interface{}, 0, len(ruleMap)) for _, m := range ruleMap { @@ -1009,6 +1115,11 @@ func matchRules(rType string, local []interface{}, remote []map[string]interface delete(r, "security_groups") } + // copy over any remote rule description + if _, ok := r["description"]; ok { + l["description"] = r["description"] + } + saves = append(saves, l) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_migrate.go new file mode 100644 index 000000000..88357447f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_migrate.go @@ -0,0 +1,34 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/hashicorp/terraform/terraform" +) + +func resourceAwsSecurityGroupMigrateState( + v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { + switch v { + case 0: + log.Println("[INFO] Found AWS SecurityGroup State v0; migrating to v1") + return migrateAwsSecurityGroupStateV0toV1(is) + default: + return is, fmt.Errorf("Unexpected schema version: %d", v) + } +} + +func migrateAwsSecurityGroupStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { + if is.Empty() || is.Attributes == nil { + log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") + return is, nil + } + + log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) + + // set default for revoke_rules_on_delete + is.Attributes["revoke_rules_on_delete"] = "false" + + log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) + return is, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go index 1372bc83d..d3ec4bc86 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go @@ -21,6 +21,7 @@ func resourceAwsSecurityGroupRule() *schema.Resource { return &schema.Resource{ Create: resourceAwsSecurityGroupRuleCreate, Read: resourceAwsSecurityGroupRuleRead, + Update: resourceAwsSecurityGroupRuleUpdate, Delete: resourceAwsSecurityGroupRuleDelete, SchemaVersion: 2, @@ -96,11 +97,16 @@ func resourceAwsSecurityGroupRule() *schema.Resource { }, "self": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - ConflictsWith: []string{"cidr_blocks"}, + Type: schema.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateSecurityGroupRuleDescription, }, }, } @@ -275,9 +281,22 @@ func resourceAwsSecurityGroupRuleRead(d *schema.ResourceData, meta interface{}) if err := setFromIPPerm(d, sg, p); err != nil { return errwrap.Wrapf("Error setting IP Permission for Security Group Rule: {{err}}", err) } + setDescriptionFromIPPerm(d, rule) return nil } +func resourceAwsSecurityGroupRuleUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if d.HasChange("description") { + if err := resourceSecurityGroupRuleDescriptionUpdate(conn, d); err != nil { + return err + } + } + + return resourceAwsSecurityGroupRuleRead(d, meta) +} + func resourceAwsSecurityGroupRuleDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn sg_id := d.Get("security_group_id").(string) @@ -554,6 +573,8 @@ func expandIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup) (*ec2.IpPermiss } } + description := d.Get("description").(string) + if len(groups) > 0 { perm.UserIdGroupPairs = make([]*ec2.UserIdGroupPair, len(groups)) // build string list of group name/ids @@ -578,6 +599,10 @@ func expandIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup) (*ec2.IpPermiss perm.UserIdGroupPairs[i].GroupName = aws.String(id) perm.UserIdGroupPairs[i].UserId = nil } + + if description != "" { + perm.UserIdGroupPairs[i].Description = aws.String(description) + } } } @@ -590,6 +615,10 @@ func expandIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup) (*ec2.IpPermiss return nil, fmt.Errorf("empty element found in cidr_blocks - consider using the compact function") } perm.IpRanges[i] = &ec2.IpRange{CidrIp: aws.String(cidrIP)} + + if description != "" { + perm.IpRanges[i].Description = aws.String(description) + } } } @@ -602,6 +631,10 @@ func expandIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup) (*ec2.IpPermiss return nil, fmt.Errorf("empty element found in ipv6_cidr_blocks - consider using the compact function") } perm.Ipv6Ranges[i] = &ec2.Ipv6Range{CidrIpv6: aws.String(cidrIP)} + + if description != "" { + perm.Ipv6Ranges[i].Description = aws.String(description) + } } } @@ -614,6 +647,10 @@ func expandIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup) (*ec2.IpPermiss return nil, fmt.Errorf("empty element found in prefix_list_ids - consider using the compact function") } perm.PrefixListIds[i] = &ec2.PrefixListId{PrefixListId: aws.String(prefixListID)} + + if description != "" { + perm.PrefixListIds[i].Description = aws.String(description) + } } } @@ -631,7 +668,6 @@ func setFromIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup, rule *ec2.IpPe for _, c := range rule.IpRanges { cb = append(cb, *c.CidrIp) } - d.Set("cidr_blocks", cb) var ipv6 []string @@ -659,12 +695,50 @@ func setFromIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup, rule *ec2.IpPe return nil } +func setDescriptionFromIPPerm(d *schema.ResourceData, rule *ec2.IpPermission) { + var description string + + for _, c := range rule.IpRanges { + desc := aws.StringValue(c.Description) + if desc != "" { + description = desc + } + } + + for _, ip := range rule.Ipv6Ranges { + desc := aws.StringValue(ip.Description) + if desc != "" { + description = desc + } + } + + for _, p := range rule.PrefixListIds { + desc := aws.StringValue(p.Description) + if desc != "" { + description = desc + } + } + + if len(rule.UserIdGroupPairs) > 0 { + desc := aws.StringValue(rule.UserIdGroupPairs[0].Description) + if desc != "" { + description = desc + } + } + + d.Set("description", description) +} + // Validates that either 'cidr_blocks', 'ipv6_cidr_blocks', 'self', or 'source_security_group_id' is set func validateAwsSecurityGroupRule(d *schema.ResourceData) error { - _, blocksOk := d.GetOk("cidr_blocks") + blocks, blocksOk := d.GetOk("cidr_blocks") + self, selfOk := d.GetOk("self") + if blocksOk && self.(bool) { + return fmt.Errorf("'self': conflicts with 'cidr_blocks' (%#v)", blocks) + } + _, ipv6Ok := d.GetOk("ipv6_cidr_blocks") _, sourceOk := d.GetOk("source_security_group_id") - _, selfOk := d.GetOk("self") _, prefixOk := d.GetOk("prefix_list_ids") if !blocksOk && !sourceOk && !selfOk && !prefixOk && !ipv6Ok { return fmt.Errorf( @@ -672,3 +746,51 @@ func validateAwsSecurityGroupRule(d *schema.ResourceData) error { } return nil } + +func resourceSecurityGroupRuleDescriptionUpdate(conn *ec2.EC2, d *schema.ResourceData) error { + sg_id := d.Get("security_group_id").(string) + + awsMutexKV.Lock(sg_id) + defer awsMutexKV.Unlock(sg_id) + + sg, err := findResourceSecurityGroup(conn, sg_id) + if err != nil { + return err + } + + perm, err := expandIPPerm(d, sg) + if err != nil { + return err + } + ruleType := d.Get("type").(string) + switch ruleType { + case "ingress": + req := &ec2.UpdateSecurityGroupRuleDescriptionsIngressInput{ + GroupId: sg.GroupId, + IpPermissions: []*ec2.IpPermission{perm}, + } + + _, err = conn.UpdateSecurityGroupRuleDescriptionsIngress(req) + + if err != nil { + return fmt.Errorf( + "Error updating security group %s rule description: %s", + sg_id, err) + } + case "egress": + req := &ec2.UpdateSecurityGroupRuleDescriptionsEgressInput{ + GroupId: sg.GroupId, + IpPermissions: []*ec2.IpPermission{perm}, + } + + _, err = conn.UpdateSecurityGroupRuleDescriptionsEgress(req) + + if err != nil { + return fmt.Errorf( + "Error updating security group %s rule description: %s", + sg_id, err) + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go new file mode 100644 index 000000000..6d87d4a42 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go @@ -0,0 +1,224 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsServiceCatalogPortfolio() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsServiceCatalogPortfolioCreate, + Read: resourceAwsServiceCatalogPortfolioRead, + Update: resourceAwsServiceCatalogPortfolioUpdate, + Delete: resourceAwsServiceCatalogPortfolioDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(30 * time.Minute), + Update: schema.DefaultTimeout(30 * time.Minute), + Delete: schema.DefaultTimeout(30 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "created_time": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateServiceCatalogPortfolioName, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateServiceCatalogPortfolioDescription, + }, + "provider_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateServiceCatalogPortfolioProviderName, + }, + "tags": tagsSchema(), + }, + } +} +func resourceAwsServiceCatalogPortfolioCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).scconn + input := servicecatalog.CreatePortfolioInput{ + AcceptLanguage: aws.String("en"), + } + name := d.Get("name").(string) + input.DisplayName = &name + now := time.Now() + input.IdempotencyToken = aws.String(fmt.Sprintf("%d", now.UnixNano())) + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("provider_name"); ok { + input.ProviderName = aws.String(v.(string)) + } + + if v, ok := d.GetOk("tags"); ok { + tags := []*servicecatalog.Tag{} + t := v.(map[string]interface{}) + for k, v := range t { + tag := servicecatalog.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + tags = append(tags, &tag) + } + input.Tags = tags + } + + log.Printf("[DEBUG] Creating Service Catalog Portfolio: %#v", input) + resp, err := conn.CreatePortfolio(&input) + if err != nil { + return fmt.Errorf("Creating Service Catalog Portfolio failed: %s", err.Error()) + } + d.SetId(*resp.PortfolioDetail.Id) + + return resourceAwsServiceCatalogPortfolioRead(d, meta) +} + +func resourceAwsServiceCatalogPortfolioRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).scconn + input := servicecatalog.DescribePortfolioInput{ + AcceptLanguage: aws.String("en"), + } + input.Id = aws.String(d.Id()) + + log.Printf("[DEBUG] Reading Service Catalog Portfolio: %#v", input) + resp, err := conn.DescribePortfolio(&input) + if err != nil { + if scErr, ok := err.(awserr.Error); ok && scErr.Code() == "ResourceNotFoundException" { + log.Printf("[WARN] Service Catalog Portfolio %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Reading ServiceCatalog Portfolio '%s' failed: %s", *input.Id, err.Error()) + } + portfolioDetail := resp.PortfolioDetail + if err := d.Set("created_time", portfolioDetail.CreatedTime.Format(time.RFC3339)); err != nil { + log.Printf("[DEBUG] Error setting created_time: %s", err) + } + d.Set("arn", portfolioDetail.ARN) + d.Set("description", portfolioDetail.Description) + d.Set("name", portfolioDetail.DisplayName) + d.Set("provider_name", portfolioDetail.ProviderName) + tags := map[string]string{} + for _, tag := range resp.Tags { + tags[*tag.Key] = *tag.Value + } + d.Set("tags", tags) + return nil +} + +func resourceAwsServiceCatalogPortfolioUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).scconn + input := servicecatalog.UpdatePortfolioInput{ + AcceptLanguage: aws.String("en"), + Id: aws.String(d.Id()), + } + + if d.HasChange("name") { + v, _ := d.GetOk("name") + input.DisplayName = aws.String(v.(string)) + } + + if d.HasChange("accept_language") { + v, _ := d.GetOk("accept_language") + input.AcceptLanguage = aws.String(v.(string)) + } + + if d.HasChange("description") { + v, _ := d.GetOk("description") + input.Description = aws.String(v.(string)) + } + + if d.HasChange("provider_name") { + v, _ := d.GetOk("provider_name") + input.ProviderName = aws.String(v.(string)) + } + + if d.HasChange("tags") { + currentTags, requiredTags := d.GetChange("tags") + log.Printf("[DEBUG] Current Tags: %#v", currentTags) + log.Printf("[DEBUG] Required Tags: %#v", requiredTags) + + tagsToAdd, tagsToRemove := tagUpdates(requiredTags.(map[string]interface{}), currentTags.(map[string]interface{})) + log.Printf("[DEBUG] Tags To Add: %#v", tagsToAdd) + log.Printf("[DEBUG] Tags To Remove: %#v", tagsToRemove) + input.AddTags = tagsToAdd + input.RemoveTags = tagsToRemove + } + + log.Printf("[DEBUG] Update Service Catalog Portfolio: %#v", input) + _, err := conn.UpdatePortfolio(&input) + if err != nil { + return fmt.Errorf("Updating Service Catalog Portfolio '%s' failed: %s", *input.Id, err.Error()) + } + return resourceAwsServiceCatalogPortfolioRead(d, meta) +} + +func tagUpdates(requriedTags, currentTags map[string]interface{}) ([]*servicecatalog.Tag, []*string) { + var tagsToAdd []*servicecatalog.Tag + var tagsToRemove []*string + + for rk, rv := range requriedTags { + addTag := true + for ck, cv := range currentTags { + if (rk == ck) && (rv.(string) == cv.(string)) { + addTag = false + } + } + if addTag { + tag := &servicecatalog.Tag{Key: aws.String(rk), Value: aws.String(rv.(string))} + tagsToAdd = append(tagsToAdd, tag) + } + } + + for ck, cv := range currentTags { + removeTag := true + for rk, rv := range requriedTags { + if (rk == ck) && (rv.(string) == cv.(string)) { + removeTag = false + } + } + if removeTag { + tagsToRemove = append(tagsToRemove, aws.String(ck)) + } + } + + return tagsToAdd, tagsToRemove +} + +func resourceAwsServiceCatalogPortfolioDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).scconn + input := servicecatalog.DeletePortfolioInput{} + input.Id = aws.String(d.Id()) + + log.Printf("[DEBUG] Delete Service Catalog Portfolio: %#v", input) + _, err := conn.DeletePortfolio(&input) + if err != nil { + return fmt.Errorf("Deleting Service Catalog Portfolio '%s' failed: %s", *input.Id, err.Error()) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_dkim.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_dkim.go new file mode 100644 index 000000000..abde46bf9 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_dkim.go @@ -0,0 +1,87 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ses" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSesDomainDkim() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSesDomainDkimCreate, + Read: resourceAwsSesDomainDkimRead, + Delete: resourceAwsSesDomainDkimDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "dkim_tokens": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsSesDomainDkimCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + domainName := d.Get("domain").(string) + + createOpts := &ses.VerifyDomainDkimInput{ + Domain: aws.String(domainName), + } + + _, err := conn.VerifyDomainDkim(createOpts) + if err != nil { + return fmt.Errorf("Error requesting SES domain identity verification: %s", err) + } + + d.SetId(domainName) + + return resourceAwsSesDomainDkimRead(d, meta) +} + +func resourceAwsSesDomainDkimRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + domainName := d.Id() + d.Set("domain", domainName) + + readOpts := &ses.GetIdentityDkimAttributesInput{ + Identities: []*string{ + aws.String(domainName), + }, + } + + response, err := conn.GetIdentityDkimAttributes(readOpts) + if err != nil { + log.Printf("[WARN] Error fetching identity verification attributes for %s: %s", d.Id(), err) + return err + } + + verificationAttrs, ok := response.DkimAttributes[domainName] + if !ok { + log.Printf("[WARN] Domain not listed in response when fetching verification attributes for %s", d.Id()) + d.SetId("") + return nil + } + + d.Set("dkim_tokens", aws.StringValueSlice(verificationAttrs.DkimTokens)) + return nil +} + +func resourceAwsSesDomainDkimDelete(d *schema.ResourceData, meta interface{}) error { + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go index 2dde76e5a..92c16a87f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go @@ -176,6 +176,8 @@ func validateMatchingTypes(v interface{}, k string) (ws []string, errors []error "bounce": true, "complaint": true, "delivery": true, + "open": true, + "click": true, } if !matchingTypes[value] { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go new file mode 100644 index 000000000..e8b2ffd52 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go @@ -0,0 +1,144 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ses" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSesTemplate() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSesTemplateCreate, + Read: resourceAwsSesTemplateRead, + Update: resourceAwsSesTemplateUpdate, + Delete: resourceAwsSesTemplateDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateSesTemplateName, + }, + "html": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateSesTemplateHtml, + }, + "subject": { + Type: schema.TypeString, + Optional: true, + }, + "text": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateSesTemplateText, + }, + }, + } +} +func resourceAwsSesTemplateCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + templateName := d.Get("name").(string) + + template := ses.Template{ + TemplateName: aws.String(templateName), + } + + if v, ok := d.GetOk("html"); ok { + template.HtmlPart = aws.String(v.(string)) + } + + if v, ok := d.GetOk("subject"); ok { + template.SubjectPart = aws.String(v.(string)) + } + + if v, ok := d.GetOk("text"); ok { + template.TextPart = aws.String(v.(string)) + } + + input := ses.CreateTemplateInput{ + Template: &template, + } + + log.Printf("[DEBUG] Creating SES template: %#v", input) + _, err := conn.CreateTemplate(&input) + if err != nil { + return fmt.Errorf("Creating SES template failed: %s", err.Error()) + } + d.SetId(templateName) + + return resourceAwsSesTemplateRead(d, meta) +} + +func resourceAwsSesTemplateRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + input := ses.GetTemplateInput{ + TemplateName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading SES template: %#v", input) + gto, err := conn.GetTemplate(&input) + if err != nil { + if isAWSErr(err, "TemplateDoesNotExist", "") { + log.Printf("[WARN] SES template %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Reading SES template '%s' failed: %s", *input.TemplateName, err.Error()) + } + + d.Set("html", gto.Template.HtmlPart) + d.Set("name", gto.Template.TemplateName) + d.Set("subject", gto.Template.SubjectPart) + d.Set("text", gto.Template.TextPart) + + return nil +} + +func resourceAwsSesTemplateUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + templateName := d.Id() + + template := ses.Template{ + HtmlPart: aws.String(d.Get("html").(string)), + TemplateName: aws.String(templateName), + SubjectPart: aws.String(d.Get("subject").(string)), + TextPart: aws.String(d.Get("text").(string)), + } + + input := ses.UpdateTemplateInput{ + Template: &template, + } + + log.Printf("[DEBUG] Update SES template: %#v", input) + _, err := conn.UpdateTemplate(&input) + if err != nil { + return fmt.Errorf("Updating SES template '%s' failed: %s", templateName, err.Error()) + } + + return resourceAwsSesTemplateRead(d, meta) +} + +func resourceAwsSesTemplateDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + input := ses.DeleteTemplateInput{ + TemplateName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Delete SES template: %#v", input) + _, err := conn.DeleteTemplate(&input) + if err != nil { + return fmt.Errorf("Deleting SES template '%s' failed: %s", *input.TemplateName, err.Error()) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go index 6a7fd40a1..58b7090cb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_snapshot_create_volume_permission.go @@ -66,7 +66,7 @@ func resourceAwsSnapshotCreateVolumePermissionCreate(d *schema.ResourceData, met Pending: []string{"denied"}, Target: []string{"granted"}, Refresh: resourceAwsSnapshotCreateVolumePermissionStateRefreshFunc(conn, snapshot_id, account_id), - Timeout: 5 * time.Minute, + Timeout: 20 * time.Minute, Delay: 10 * time.Second, MinTimeout: 10 * time.Second, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go index 63d308518..43e8faffa 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go @@ -4,13 +4,11 @@ import ( "fmt" "log" "strings" - "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/sns" "github.com/hashicorp/errwrap" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -113,22 +111,14 @@ func resourceAwsSnsTopicUpdate(d *schema.ResourceData, meta interface{}) error { AttributeName: aws.String(attrKey), AttributeValue: aws.String(n.(string)), } - + conn := meta.(*AWSClient).snsconn // Retry the update in the event of an eventually consistent style of // error, where say an IAM resource is successfully created but not // actually available. See https://github.com/hashicorp/terraform/issues/3660 - log.Printf("[DEBUG] Updating SNS Topic (%s) attributes request: %s", d.Id(), req) - stateConf := &resource.StateChangeConf{ - Pending: []string{"retrying"}, - Target: []string{"success"}, - Refresh: resourceAwsSNSUpdateRefreshFunc(meta, req), - Timeout: 1 * time.Minute, - MinTimeout: 3 * time.Second, - } - _, err := stateConf.WaitForState() - if err != nil { - return err - } + _, err := retryOnAwsCode("InvalidParameter", func() (interface{}, error) { + return conn.SetTopicAttributes(&req) + }) + return err } } } @@ -137,25 +127,6 @@ func resourceAwsSnsTopicUpdate(d *schema.ResourceData, meta interface{}) error { return resourceAwsSnsTopicRead(d, meta) } -func resourceAwsSNSUpdateRefreshFunc( - meta interface{}, params sns.SetTopicAttributesInput) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - snsconn := meta.(*AWSClient).snsconn - if _, err := snsconn.SetTopicAttributes(¶ms); err != nil { - log.Printf("[WARN] Erroring updating topic attributes: %s", err) - if awsErr, ok := err.(awserr.Error); ok { - // if the error contains the PrincipalNotFound message, we can retry - if strings.Contains(awsErr.Message(), "PrincipalNotFound") { - log.Printf("[DEBUG] Retrying AWS SNS Topic Update: %s", params) - return nil, "retrying", nil - } - } - return nil, "failed", err - } - return 42, "success", nil - } -} - func resourceAwsSnsTopicRead(d *schema.ResourceData, meta interface{}) error { snsconn := meta.(*AWSClient).snsconn diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go index 288a9a449..5f8241b00 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go @@ -4,9 +4,7 @@ import ( "fmt" "log" "regexp" - "time" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/aws/aws-sdk-go/aws" @@ -50,15 +48,10 @@ func resourceAwsSnsTopicPolicyUpsert(d *schema.ResourceData, meta interface{}) e // Retry the update in the event of an eventually consistent style of // error, where say an IAM resource is successfully created but not // actually available. See https://github.com/hashicorp/terraform/issues/3660 - log.Printf("[DEBUG] Updating SNS Topic Policy: %s", req) - stateConf := &resource.StateChangeConf{ - Pending: []string{"retrying"}, - Target: []string{"success"}, - Refresh: resourceAwsSNSUpdateRefreshFunc(meta, req), - Timeout: 3 * time.Minute, - MinTimeout: 3 * time.Second, - } - _, err := stateConf.WaitForState() + conn := meta.(*AWSClient).snsconn + _, err := retryOnAwsCode("InvalidParameter", func() (interface{}, error) { + return conn.SetTopicAttributes(&req) + }) if err != nil { return err } @@ -120,18 +113,11 @@ func resourceAwsSnsTopicPolicyDelete(d *schema.ResourceData, meta interface{}) e // error, where say an IAM resource is successfully created but not // actually available. See https://github.com/hashicorp/terraform/issues/3660 log.Printf("[DEBUG] Resetting SNS Topic Policy to default: %s", req) - stateConf := &resource.StateChangeConf{ - Pending: []string{"retrying"}, - Target: []string{"success"}, - Refresh: resourceAwsSNSUpdateRefreshFunc(meta, req), - Timeout: 3 * time.Minute, - MinTimeout: 3 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return err - } - return nil + conn := meta.(*AWSClient).snsconn + _, err = retryOnAwsCode("InvalidParameter", func() (interface{}, error) { + return conn.SetTopicAttributes(&req) + }) + return err } func getAccountIdFromSnsTopicArn(arn, partition string) (string, error) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go index 4ade2e7c8..0900eb479 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go @@ -256,6 +256,11 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Computed: true, ForceNew: true, }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + }, }, }, Set: hashLaunchSpecification, @@ -278,6 +283,12 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Default: "Default", ForceNew: false, }, + "instance_interruption_behaviour": { + Type: schema.TypeString, + Optional: true, + Default: "terminate", + ForceNew: true, + }, "spot_price": { Type: schema.TypeString, Required: true, @@ -371,6 +382,21 @@ func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{ } } + if m, ok := d["tags"].(map[string]interface{}); ok && len(m) > 0 { + tagsSpec := make([]*ec2.SpotFleetTagSpecification, 0) + + tags := tagsFromMap(m) + + spec := &ec2.SpotFleetTagSpecification{ + ResourceType: aws.String("instance"), + Tags: tags, + } + + tagsSpec = append(tagsSpec, spec) + + opts.TagSpecifications = tagsSpec + } + subnetId, hasSubnetId := d["subnet_id"] if hasSubnetId { opts.SubnetId = aws.String(subnetId.(string)) @@ -552,6 +578,7 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) ClientToken: aws.String(resource.UniqueId()), TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), + InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), } if v, ok := d.GetOk("excess_capacity_termination_policy"); ok { @@ -788,6 +815,7 @@ func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) e } d.Set("replace_unhealthy_instances", config.ReplaceUnhealthyInstances) + d.Set("instance_interruption_behaviour", config.InstanceInterruptionBehavior) d.Set("launch_specification", launchSpecsToSet(config.LaunchSpecifications, conn)) return nil @@ -872,6 +900,15 @@ func launchSpecToMap(l *ec2.SpotFleetLaunchSpecification, rootDevName *string) m m["weighted_capacity"] = strconv.FormatFloat(*l.WeightedCapacity, 'f', 0, 64) } + if l.TagSpecifications != nil { + for _, tagSpecs := range l.TagSpecifications { + // only "instance" tags are currently supported: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html + if *(tagSpecs.ResourceType) == "instance" { + m["tags"] = tagsToMap(tagSpecs.Tags) + } + } + } + return m } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go index 4c64bc448..0a0e79b9b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go @@ -78,7 +78,12 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { Optional: true, ForceNew: true, } - + s["instance_interruption_behaviour"] = &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Default: "terminate", + ForceNew: true, + } return s }(), } @@ -95,6 +100,7 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface spotOpts := &ec2.RequestSpotInstancesInput{ SpotPrice: aws.String(d.Get("spot_price").(string)), Type: aws.String(d.Get("spot_type").(string)), + InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), // Though the AWS API supports creating spot instance requests for multiple // instances, for TF purposes we fix this to one instance per request. @@ -209,8 +215,8 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{} request := resp.SpotInstanceRequests[0] - // if the request is cancelled, then it is gone - if *request.State == "cancelled" { + // if the request is cancelled or closed, then it is gone + if *request.State == "cancelled" || *request.State == "closed" { d.SetId("") return nil } @@ -229,6 +235,7 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{} d.Set("launch_group", request.LaunchGroup) d.Set("block_duration_minutes", request.BlockDurationMinutes) d.Set("tags", tagsToMap(request.Tags)) + d.Set("instance_interruption_behaviour", request.InstanceInterruptionBehavior) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go index f0a0e2a09..984f933d6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go @@ -16,19 +16,19 @@ import ( "github.com/hashicorp/terraform/helper/resource" ) -var AttributeMap = map[string]string{ - "delay_seconds": "DelaySeconds", - "max_message_size": "MaximumMessageSize", - "message_retention_seconds": "MessageRetentionPeriod", - "receive_wait_time_seconds": "ReceiveMessageWaitTimeSeconds", - "visibility_timeout_seconds": "VisibilityTimeout", - "policy": "Policy", - "redrive_policy": "RedrivePolicy", - "arn": "QueueArn", - "fifo_queue": "FifoQueue", - "content_based_deduplication": "ContentBasedDeduplication", - "kms_master_key_id": "KmsMasterKeyId", - "kms_data_key_reuse_period_seconds": "KmsDataKeyReusePeriodSeconds", +var sqsQueueAttributeMap = map[string]string{ + "delay_seconds": sqs.QueueAttributeNameDelaySeconds, + "max_message_size": sqs.QueueAttributeNameMaximumMessageSize, + "message_retention_seconds": sqs.QueueAttributeNameMessageRetentionPeriod, + "receive_wait_time_seconds": sqs.QueueAttributeNameReceiveMessageWaitTimeSeconds, + "visibility_timeout_seconds": sqs.QueueAttributeNameVisibilityTimeout, + "policy": sqs.QueueAttributeNamePolicy, + "redrive_policy": sqs.QueueAttributeNameRedrivePolicy, + "arn": sqs.QueueAttributeNameQueueArn, + "fifo_queue": sqs.QueueAttributeNameFifoQueue, + "content_based_deduplication": sqs.QueueAttributeNameContentBasedDeduplication, + "kms_master_key_id": sqs.QueueAttributeNameKmsMasterKeyId, + "kms_data_key_reuse_period_seconds": sqs.QueueAttributeNameKmsDataKeyReusePeriodSeconds, } // A number of these are marked as computed because if you don't @@ -122,6 +122,7 @@ func resourceAwsSqsQueue() *schema.Resource { Computed: true, Optional: true, }, + "tags": tagsSchema(), }, } } @@ -166,7 +167,7 @@ func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error { resource := *resourceAwsSqsQueue() for k, s := range resource.Schema { - if attrKey, ok := AttributeMap[k]; ok { + if attrKey, ok := sqsQueueAttributeMap[k]; ok { if value, ok := d.GetOk(k); ok { switch s.Type { case schema.TypeInt: @@ -190,19 +191,24 @@ func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Error creating SQS queue: %s", err) } - d.SetId(*output.QueueUrl) + d.SetId(aws.StringValue(output.QueueUrl)) return resourceAwsSqsQueueUpdate(d, meta) } func resourceAwsSqsQueueUpdate(d *schema.ResourceData, meta interface{}) error { sqsconn := meta.(*AWSClient).sqsconn + + if err := setTagsSQS(sqsconn, d); err != nil { + return err + } + attributes := make(map[string]*string) resource := *resourceAwsSqsQueue() for k, s := range resource.Schema { - if attrKey, ok := AttributeMap[k]; ok { + if attrKey, ok := sqsQueueAttributeMap[k]; ok { if d.HasChange(k) { log.Printf("[DEBUG] Updating %s", attrKey) _, n := d.GetChange(k) @@ -261,7 +267,7 @@ func resourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { attrmap := attributeOutput.Attributes resource := *resourceAwsSqsQueue() // iKey = internal struct key, oKey = AWS Attribute Map key - for iKey, oKey := range AttributeMap { + for iKey, oKey := range sqsQueueAttributeMap { if attrmap[oKey] != nil { switch resource.Schema[iKey].Type { case schema.TypeInt: @@ -292,6 +298,14 @@ func resourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { d.Set("fifo_queue", d.Get("fifo_queue").(bool)) d.Set("content_based_deduplication", d.Get("content_based_deduplication").(bool)) + listTagsOutput, err := sqsconn.ListQueueTags(&sqs.ListQueueTagsInput{ + QueueUrl: aws.String(d.Id()), + }) + if err != nil { + return err + } + d.Set("tags", tagsToMapGeneric(listTagsOutput.Tags)) + return nil } @@ -322,3 +336,39 @@ func extractNameFromSqsQueueUrl(queue string) (string, error) { return segments[2], nil } + +func setTagsSQS(conn *sqs.SQS, d *schema.ResourceData) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + create, remove := diffTagsGeneric(oraw.(map[string]interface{}), nraw.(map[string]interface{})) + + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + keys := make([]*string, 0, len(remove)) + for k, _ := range remove { + keys = append(keys, aws.String(k)) + } + + _, err := conn.UntagQueue(&sqs.UntagQueueInput{ + QueueUrl: aws.String(d.Id()), + TagKeys: keys, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + + _, err := conn.TagQueue(&sqs.TagQueueInput{ + QueueUrl: aws.String(d.Id()), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go index 9cceda4ae..c23ca0eb2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go @@ -29,29 +29,33 @@ func resourceAwsSsmActivation() *schema.Resource { Optional: true, ForceNew: true, }, - "expired": &schema.Schema{ + "expired": { Type: schema.TypeString, Computed: true, }, - "expiration_date": &schema.Schema{ + "expiration_date": { Type: schema.TypeString, Optional: true, ForceNew: true, }, - "iam_role": &schema.Schema{ + "iam_role": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "registration_limit": &schema.Schema{ + "registration_limit": { Type: schema.TypeInt, Optional: true, ForceNew: true, }, - "registration_count": &schema.Schema{ + "registration_count": { Type: schema.TypeInt, Computed: true, }, + "activation_code": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -107,6 +111,7 @@ func resourceAwsSsmActivationCreate(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("[ERROR] ActivationId was nil") } d.SetId(*resp.ActivationId) + d.Set("activation_code", resp.ActivationCode) return resourceAwsSsmActivationRead(d, meta) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go index e3f080ded..75c6ef336 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go @@ -17,6 +17,9 @@ func resourceAwsSsmAssociation() *schema.Resource { Update: resourceAwsSsmAssocationUpdate, Delete: resourceAwsSsmAssociationDelete, + MigrateState: resourceAwsSsmAssociationMigrateState, + SchemaVersion: 1, + Schema: map[string]*schema.Schema{ "association_id": { Type: schema.TypeString, @@ -129,7 +132,7 @@ func resourceAwsSsmAssociationCreate(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("[ERROR] AssociationDescription was nil") } - d.SetId(*resp.AssociationDescription.Name) + d.SetId(*resp.AssociationDescription.AssociationId) d.Set("association_id", resp.AssociationDescription.AssociationId) return resourceAwsSsmAssociationRead(d, meta) @@ -141,7 +144,7 @@ func resourceAwsSsmAssociationRead(d *schema.ResourceData, meta interface{}) err log.Printf("[DEBUG] Reading SSM Association: %s", d.Id()) params := &ssm.DescribeAssociationInput{ - AssociationId: aws.String(d.Get("association_id").(string)), + AssociationId: aws.String(d.Id()), } resp, err := ssmconn.DescribeAssociation(params) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association_migrate.go new file mode 100644 index 000000000..17821ad22 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association_migrate.go @@ -0,0 +1,38 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/hashicorp/terraform/terraform" +) + +func resourceAwsSsmAssociationMigrateState( + v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { + switch v { + case 0: + log.Println("[INFO] Found AWS SSM Association State v0; migrating to v1") + return migrateSsmAssociationStateV0toV1(is) + default: + return is, fmt.Errorf("Unexpected schema version: %d", v) + } +} + +func migrateSsmAssociationStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { + + if is.Empty() { + log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") + + return is, nil + } + + log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) + + is.Attributes["id"] = is.Attributes["association_id"] + is.ID = is.Attributes["association_id"] + + log.Printf("[DEBUG] Attributes after migration: %#v, new id: %s", is.Attributes, is.Attributes["association_id"]) + + return is, nil + +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go index ad266d2bf..7a4c0c3be 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go @@ -32,8 +32,9 @@ func resourceAwsSsmDocument() *schema.Resource { Computed: true, }, "name": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAwsSSMName, }, "content": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go index 72669bfc7..ac0692f67 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go @@ -1,7 +1,6 @@ package aws import ( - "fmt" "log" "github.com/aws/aws-sdk-go/aws" @@ -16,6 +15,9 @@ func resourceAwsSsmParameter() *schema.Resource { Read: resourceAwsSsmParameterRead, Update: resourceAwsSsmParameterPut, Delete: resourceAwsSsmParameterDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { @@ -55,7 +57,7 @@ func resourceAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error paramInput := &ssm.GetParametersInput{ Names: []*string{ - aws.String(d.Get("name").(string)), + aws.String(d.Id()), }, WithDecryption: aws.Bool(true), } @@ -66,8 +68,10 @@ func resourceAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error return errwrap.Wrapf("[ERROR] Error describing SSM parameter: {{err}}", err) } - if len(resp.InvalidParameters) > 0 { - return fmt.Errorf("[ERROR] SSM Parameter %s is invalid", d.Id()) + if len(resp.Parameters) == 0 { + log.Printf("[WARN] SSM Param %q not found, removing from state", d.Id()) + d.SetId("") + return nil } param := resp.Parameters[0] diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go index c16cc4f3e..db7edab03 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go @@ -10,6 +10,22 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) +var ssmPatchComplianceLevels = []string{ + ssm.PatchComplianceLevelCritical, + ssm.PatchComplianceLevelHigh, + ssm.PatchComplianceLevelMedium, + ssm.PatchComplianceLevelLow, + ssm.PatchComplianceLevelInformational, + ssm.PatchComplianceLevelUnspecified, +} + +var ssmPatchOSs = []string{ + ssm.OperatingSystemWindows, + ssm.OperatingSystemAmazonLinux, + ssm.OperatingSystemUbuntu, + ssm.OperatingSystemRedhatEnterpriseLinux, +} + func resourceAwsSsmPatchBaseline() *schema.Resource { return &schema.Resource{ Create: resourceAwsSsmPatchBaselineCreate, @@ -57,6 +73,13 @@ func resourceAwsSsmPatchBaseline() *schema.Resource { Required: true, }, + "compliance_level": { + Type: schema.TypeString, + Optional: true, + Default: ssm.PatchComplianceLevelUnspecified, + ValidateFunc: validation.StringInSlice(ssmPatchComplianceLevels, false), + }, + "patch_filter": { Type: schema.TypeList, Required: true, @@ -97,15 +120,15 @@ func resourceAwsSsmPatchBaseline() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - Default: "WINDOWS", - ValidateFunc: validation.StringInSlice([]string{"WINDOWS", "AMAZON_LINUX", "UBUNTU", "REDHAT_ENTERPRISE_LINUX"}, false), + Default: ssm.OperatingSystemWindows, + ValidateFunc: validation.StringInSlice(ssmPatchOSs, false), }, "approved_patches_compliance_level": { Type: schema.TypeString, Optional: true, - Default: "UNSPECIFIED", - ValidateFunc: validation.StringInSlice([]string{"CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL", "UNSPECIFIED"}, false), + Default: ssm.PatchComplianceLevelUnspecified, + ValidateFunc: validation.StringInSlice(ssmPatchComplianceLevels, false), }, }, } @@ -306,6 +329,7 @@ func expandAwsSsmPatchRuleGroup(d *schema.ResourceData) *ssm.PatchRuleGroup { rule := &ssm.PatchRule{ ApproveAfterDays: aws.Int64(int64(rCfg["approve_after_days"].(int))), PatchFilterGroup: filterGroup, + ComplianceLevel: aws.String(rCfg["compliance_level"].(string)), } rules = append(rules, rule) @@ -326,6 +350,7 @@ func flattenAwsSsmPatchRuleGroup(group *ssm.PatchRuleGroup) []map[string]interfa for _, rule := range group.PatchRules { r := make(map[string]interface{}) r["approve_after_days"] = *rule.ApproveAfterDays + r["compliance_level"] = *rule.ComplianceLevel r["patch_filter"] = flattenAwsSsmPatchFilterGroup(rule.PatchFilterGroup) result = append(result, r) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_resource_data_sync.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_resource_data_sync.go new file mode 100644 index 000000000..7426e1e22 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_resource_data_sync.go @@ -0,0 +1,169 @@ +package aws + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ssm" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSsmResourceDataSync() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSsmResourceDataSyncCreate, + Read: resourceAwsSsmResourceDataSyncRead, + Delete: resourceAwsSsmResourceDataSyncDelete, + + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "s3_destination": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "kms_key_arn": { + Type: schema.TypeString, + Optional: true, + }, + "bucket_name": { + Type: schema.TypeString, + Required: true, + }, + "prefix": { + Type: schema.TypeString, + Optional: true, + }, + "region": { + Type: schema.TypeString, + Required: true, + }, + "sync_format": { + Type: schema.TypeString, + Optional: true, + Default: ssm.ResourceDataSyncS3FormatJsonSerDe, + }, + }, + }, + }, + }, + } +} + +func resourceAwsSsmResourceDataSyncCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ssmconn + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + input := &ssm.CreateResourceDataSyncInput{ + S3Destination: expandSsmResourceDataSyncS3Destination(d), + SyncName: aws.String(d.Get("name").(string)), + } + _, err := conn.CreateResourceDataSync(input) + if err != nil { + if isAWSErr(err, ssm.ErrCodeResourceDataSyncInvalidConfigurationException, "S3 write failed for bucket") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return err + } + + d.SetId(d.Get("name").(string)) + return resourceAwsSsmResourceDataSyncRead(d, meta) +} + +func resourceAwsSsmResourceDataSyncRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ssmconn + + syncItem, err := findResourceDataSyncItem(conn, d.Get("name").(string)) + if err != nil { + return err + } + if syncItem == nil { + d.SetId("") + return nil + } + d.Set("s3_destination", flattenSsmResourceDataSyncS3Destination(syncItem.S3Destination)) + return nil +} + +func resourceAwsSsmResourceDataSyncDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ssmconn + + input := &ssm.DeleteResourceDataSyncInput{ + SyncName: aws.String(d.Get("name").(string)), + } + + _, err := conn.DeleteResourceDataSync(input) + if err != nil { + if isAWSErr(err, ssm.ErrCodeResourceDataSyncNotFoundException, "") { + return nil + } + return err + } + return nil +} + +func findResourceDataSyncItem(conn *ssm.SSM, name string) (*ssm.ResourceDataSyncItem, error) { + nextToken := "" + for { + input := &ssm.ListResourceDataSyncInput{} + if nextToken != "" { + input.NextToken = aws.String(nextToken) + } + resp, err := conn.ListResourceDataSync(input) + if err != nil { + return nil, err + } + for _, v := range resp.ResourceDataSyncItems { + if *v.SyncName == name { + return v, nil + } + } + if resp.NextToken == nil { + break + } + nextToken = *resp.NextToken + } + return nil, nil +} + +func flattenSsmResourceDataSyncS3Destination(dest *ssm.ResourceDataSyncS3Destination) []interface{} { + result := make(map[string]interface{}) + result["bucket_name"] = *dest.BucketName + result["region"] = *dest.Region + result["sync_format"] = *dest.SyncFormat + if dest.AWSKMSKeyARN != nil { + result["kms_key_arn"] = *dest.AWSKMSKeyARN + } + if dest.Prefix != nil { + result["prefix"] = *dest.Prefix + } + return []interface{}{result} +} + +func expandSsmResourceDataSyncS3Destination(d *schema.ResourceData) *ssm.ResourceDataSyncS3Destination { + raw := d.Get("s3_destination").([]interface{})[0].(map[string]interface{}) + s3dest := &ssm.ResourceDataSyncS3Destination{ + BucketName: aws.String(raw["bucket_name"].(string)), + Region: aws.String(raw["region"].(string)), + SyncFormat: aws.String(raw["sync_format"].(string)), + } + if v, ok := raw["kms_key_arn"].(string); ok && v != "" { + s3dest.AWSKMSKeyARN = aws.String(v) + } + if v, ok := raw["prefix"].(string); ok && v != "" { + s3dest.Prefix = aws.String(v) + } + return s3dest +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go index 21c53f942..adc9eeef7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go @@ -119,8 +119,9 @@ func resourceAwsVpnConnection() *schema.Resource { }, "tunnel1_preshared_key": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Sensitive: true, + Computed: true, }, "tunnel1_bgp_asn": { Type: schema.TypeString, @@ -146,8 +147,9 @@ func resourceAwsVpnConnection() *schema.Resource { }, "tunnel2_preshared_key": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Sensitive: true, + Computed: true, }, "tunnel2_bgp_asn": { Type: schema.TypeString, @@ -274,7 +276,7 @@ func resourceAwsVpnConnectionCreate(d *schema.ResourceData, meta interface{}) er Pending: []string{"pending"}, Target: []string{"available"}, Refresh: vpnConnectionRefreshFunc(conn, *vpnConnection.VpnConnectionId), - Timeout: 30 * time.Minute, + Timeout: 40 * time.Minute, Delay: 10 * time.Second, MinTimeout: 10 * time.Second, } @@ -283,7 +285,7 @@ func resourceAwsVpnConnectionCreate(d *schema.ResourceData, meta interface{}) er if stateErr != nil { return fmt.Errorf( "Error waiting for VPN connection (%s) to become ready: %s", - *vpnConnection.VpnConnectionId, err) + *vpnConnection.VpnConnectionId, stateErr) } // Create tags. diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_vpn_connection_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go similarity index 55% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_vpn_connection_route.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go index e6863f721..0f1991fe6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_vpn_connection_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go @@ -4,11 +4,13 @@ import ( "fmt" "log" "strings" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -39,9 +41,11 @@ func resourceAwsVpnConnectionRoute() *schema.Resource { func resourceAwsVpnConnectionRouteCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + cidrBlock := d.Get("destination_cidr_block").(string) + vpnConnectionId := d.Get("vpn_connection_id").(string) createOpts := &ec2.CreateVpnConnectionRouteInput{ - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - VpnConnectionId: aws.String(d.Get("vpn_connection_id").(string)), + DestinationCidrBlock: aws.String(cidrBlock), + VpnConnectionId: aws.String(vpnConnectionId), } // Create the route. @@ -54,6 +58,23 @@ func resourceAwsVpnConnectionRouteCreate(d *schema.ResourceData, meta interface{ // Store the ID by the only two data we have available to us. d.SetId(fmt.Sprintf("%s:%s", *createOpts.DestinationCidrBlock, *createOpts.VpnConnectionId)) + stateConf := resource.StateChangeConf{ + Pending: []string{"pending"}, + Target: []string{"available"}, + Timeout: 15 * time.Second, + Refresh: func() (interface{}, string, error) { + route, err := findConnectionRoute(conn, cidrBlock, vpnConnectionId) + if err != nil { + return 42, "", err + } + return route, *route.State, nil + }, + } + _, err = stateConf.WaitForState() + if err != nil { + return err + } + return resourceAwsVpnConnectionRouteRead(d, meta) } @@ -62,51 +83,11 @@ func resourceAwsVpnConnectionRouteRead(d *schema.ResourceData, meta interface{}) cidrBlock, vpnConnectionId := resourceAwsVpnConnectionRouteParseId(d.Id()) - routeFilters := []*ec2.Filter{ - &ec2.Filter{ - Name: aws.String("route.destination-cidr-block"), - Values: []*string{aws.String(cidrBlock)}, - }, - &ec2.Filter{ - Name: aws.String("vpn-connection-id"), - Values: []*string{aws.String(vpnConnectionId)}, - }, - } - - // Technically, we know everything there is to know about the route - // from its ID, but we still want to catch cases where it changes - // outside of terraform and results in a stale state file. Hence, - // conduct a read. - resp, err := conn.DescribeVpnConnections(&ec2.DescribeVpnConnectionsInput{ - Filters: routeFilters, - }) + route, err := findConnectionRoute(conn, cidrBlock, vpnConnectionId) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - d.SetId("") - return nil - } else { - log.Printf("[ERROR] Error finding VPN connection route: %s", err) - return err - } + return err } - if resp == nil || len(resp.VpnConnections) == 0 { - // This is kind of a weird edge case. I'd rather return an error - // instead of just blindly setting the ID to ""... since I don't know - // what might cause this. - return fmt.Errorf("No VPN connections returned") - } - - vpnConnection := resp.VpnConnections[0] - - var found bool - for _, r := range vpnConnection.Routes { - if *r.DestinationCidrBlock == cidrBlock { - d.Set("destination_cidr_block", *r.DestinationCidrBlock) - d.Set("vpn_connection_id", *vpnConnection.VpnConnectionId) - found = true - } - } - if !found { + if route == nil { // Something other than terraform eliminated the route. d.SetId("") } @@ -117,23 +98,76 @@ func resourceAwsVpnConnectionRouteRead(d *schema.ResourceData, meta interface{}) func resourceAwsVpnConnectionRouteDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + cidrBlock := d.Get("destination_cidr_block").(string) + vpnConnectionId := d.Get("vpn_connection_id").(string) _, err := conn.DeleteVpnConnectionRoute(&ec2.DeleteVpnConnectionRouteInput{ - DestinationCidrBlock: aws.String(d.Get("destination_cidr_block").(string)), - VpnConnectionId: aws.String(d.Get("vpn_connection_id").(string)), + DestinationCidrBlock: aws.String(cidrBlock), + VpnConnectionId: aws.String(vpnConnectionId), }) if err != nil { if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { d.SetId("") return nil - } else { - log.Printf("[ERROR] Error deleting VPN connection route: %s", err) - return err } + log.Printf("[ERROR] Error deleting VPN connection route: %s", err) + return err + } + + stateConf := resource.StateChangeConf{ + Pending: []string{"pending", "available", "deleting"}, + Target: []string{"deleted"}, + Timeout: 15 * time.Second, + Refresh: func() (interface{}, string, error) { + route, err := findConnectionRoute(conn, cidrBlock, vpnConnectionId) + if err != nil { + return 42, "", err + } + if route == nil { + return 42, "deleted", nil + } + return route, *route.State, nil + }, + } + _, err = stateConf.WaitForState() + if err != nil { + return err } return nil } +func findConnectionRoute(conn *ec2.EC2, cidrBlock, vpnConnectionId string) (*ec2.VpnStaticRoute, error) { + resp, err := conn.DescribeVpnConnections(&ec2.DescribeVpnConnectionsInput{ + Filters: []*ec2.Filter{ + &ec2.Filter{ + Name: aws.String("route.destination-cidr-block"), + Values: []*string{aws.String(cidrBlock)}, + }, + &ec2.Filter{ + Name: aws.String("vpn-connection-id"), + Values: []*string{aws.String(vpnConnectionId)}, + }, + }, + }) + if err != nil { + if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { + return nil, nil + } + return nil, err + } + if resp == nil || len(resp.VpnConnections) == 0 { + return nil, nil + } + vpnConnection := resp.VpnConnections[0] + + for _, r := range vpnConnection.Routes { + if *r.DestinationCidrBlock == cidrBlock && *r.State != "deleted" { + return r, nil + } + } + return nil, nil +} + func resourceAwsVpnConnectionRouteParseId(id string) (string, string) { parts := strings.SplitN(id, ":", 2) return parts[0], parts[1] diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go index 0c40d8c8c..af0a92e05 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go @@ -181,14 +181,11 @@ func resourceAwsVpnGatewayAttach(d *schema.ResourceData, meta interface{}) error VpcId: aws.String(d.Get("vpc_id").(string)), } - err := resource.Retry(30*time.Second, func() *resource.RetryError { + err := resource.Retry(1*time.Minute, func() *resource.RetryError { _, err := conn.AttachVpnGateway(req) if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - if "InvalidVpnGatewayID.NotFound" == ec2err.Code() { - return resource.RetryableError( - fmt.Errorf("Gateway not found, retry for eventual consistancy")) - } + if isAWSErr(err, "InvalidVpnGatewayID.NotFound", "") { + return resource.RetryableError(err) } return resource.NonRetryableError(err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go new file mode 100644 index 000000000..3bcbe8cc3 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go @@ -0,0 +1,212 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRateBasedRule() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRateBasedRuleCreate, + Read: resourceAwsWafRateBasedRuleRead, + Update: resourceAwsWafRateBasedRuleUpdate, + Delete: resourceAwsWafRateBasedRuleDelete, + + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "metric_name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateWafMetricName, + }, + "predicates": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "negated": &schema.Schema{ + Type: schema.TypeBool, + Required: true, + }, + "data_id": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 128 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 128 characters", k)) + } + return + }, + }, + "type": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if value != "IPMatch" && value != "ByteMatch" && value != "SqlInjectionMatch" && value != "SizeConstraint" && value != "XssMatch" { + errors = append(errors, fmt.Errorf( + "%q must be one of IPMatch | ByteMatch | SqlInjectionMatch | SizeConstraint | XssMatch", k)) + } + return + }, + }, + }, + }, + }, + "rate_key": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "rate_limit": &schema.Schema{ + Type: schema.TypeInt, + Required: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(int) + if value < 2000 { + errors = append(errors, fmt.Errorf("%q cannot be less than 2000", k)) + } + return + }, + }, + }, + } +} + +func resourceAwsWafRateBasedRuleCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + wr := newWafRetryer(conn, "global") + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateRateBasedRuleInput{ + ChangeToken: token, + MetricName: aws.String(d.Get("metric_name").(string)), + Name: aws.String(d.Get("name").(string)), + RateKey: aws.String(d.Get("rate_key").(string)), + RateLimit: aws.Int64(int64(d.Get("rate_limit").(int))), + } + + return conn.CreateRateBasedRule(params) + }) + if err != nil { + return err + } + resp := out.(*waf.CreateRateBasedRuleOutput) + d.SetId(*resp.Rule.RuleId) + return resourceAwsWafRateBasedRuleUpdate(d, meta) +} + +func resourceAwsWafRateBasedRuleRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + params := &waf.GetRateBasedRuleInput{ + RuleId: aws.String(d.Id()), + } + + resp, err := conn.GetRateBasedRule(params) + if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { + log.Printf("[WARN] WAF Rate Based Rule (%s) not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return err + } + + var predicates []map[string]interface{} + + for _, predicateSet := range resp.Rule.MatchPredicates { + predicate := map[string]interface{}{ + "negated": *predicateSet.Negated, + "type": *predicateSet.Type, + "data_id": *predicateSet.DataId, + } + predicates = append(predicates, predicate) + } + + d.Set("predicates", predicates) + d.Set("name", resp.Rule.Name) + d.Set("metric_name", resp.Rule.MetricName) + d.Set("rate_key", resp.Rule.RateKey) + d.Set("rate_limit", resp.Rule.RateLimit) + + return nil +} + +func resourceAwsWafRateBasedRuleUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + if d.HasChange("predicates") { + o, n := d.GetChange("predicates") + oldP, newP := o.(*schema.Set).List(), n.(*schema.Set).List() + rateLimit := d.Get("rate_limit") + + err := updateWafRateBasedRuleResource(d.Id(), oldP, newP, rateLimit, conn) + if err != nil { + return fmt.Errorf("Error Updating WAF Rule: %s", err) + } + } + + return resourceAwsWafRateBasedRuleRead(d, meta) +} + +func resourceAwsWafRateBasedRuleDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + oldPredicates := d.Get("predicates").(*schema.Set).List() + if len(oldPredicates) > 0 { + noPredicates := []interface{}{} + rateLimit := d.Get("rate_limit") + + err := updateWafRateBasedRuleResource(d.Id(), oldPredicates, noPredicates, rateLimit, conn) + if err != nil { + return fmt.Errorf("Error updating WAF Rate Based Rule Predicates: %s", err) + } + } + + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRateBasedRuleInput{ + ChangeToken: token, + RuleId: aws.String(d.Id()), + } + log.Printf("[INFO] Deleting WAF Rate Based Rule") + return conn.DeleteRateBasedRule(req) + }) + if err != nil { + return fmt.Errorf("Error deleting WAF Rate Based Rule: %s", err) + } + + return nil +} + +func updateWafRateBasedRuleResource(id string, oldP, newP []interface{}, rateLimit interface{}, conn *waf.WAF) error { + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRateBasedRuleInput{ + ChangeToken: token, + RuleId: aws.String(id), + Updates: diffWafRulePredicates(oldP, newP), + RateLimit: aws.Int64(int64(rateLimit.(int))), + } + + return conn.UpdateRateBasedRule(req) + }) + if err != nil { + return fmt.Errorf("Error Updating WAF Rate Based Rule: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go index e7d44d7be..985a277dc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go @@ -40,7 +40,7 @@ func resourceAwsWafRule() *schema.Resource { }, "data_id": &schema.Schema{ Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 128 { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go index 7e3ac7237..e836f3748 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go @@ -64,6 +64,19 @@ func resourceAwsWafWebAcl() *schema.Resource { Type: schema.TypeInt, Required: true, }, + "type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Default: waf.WafRuleTypeRegular, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if value != waf.WafRuleTypeRegular && value != waf.WafRuleTypeRateBased { + errors = append(errors, fmt.Errorf( + "%q must be one of %s | %s", k, waf.WafRuleTypeRegular, waf.WafRuleTypeRateBased)) + } + return + }, + }, "rule_id": &schema.Schema{ Type: schema.TypeString, Required: true, @@ -180,6 +193,7 @@ func updateWebAclResource(d *schema.ResourceData, meta interface{}, ChangeAction ActivatedRule: &waf.ActivatedRule{ Priority: aws.Int64(int64(aclRule["priority"].(int))), RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), Action: &waf.WafAction{Type: aws.String(action["type"].(string))}, }, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go index e7f7c8248..8de14fa3f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go @@ -22,7 +22,7 @@ func setTagsS3(conn *s3.S3, d *schema.ResourceData) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { + _, err := retryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { return conn.DeleteBucketTagging(&s3.DeleteBucketTaggingInput{ Bucket: aws.String(d.Get("bucket").(string)), }) @@ -40,7 +40,7 @@ func setTagsS3(conn *s3.S3, d *schema.ResourceData) error { }, } - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { + _, err := retryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { return conn.PutBucketTagging(req) }) if err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go index a4ab3d022..2aee465c2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go @@ -1,7 +1,6 @@ package aws import ( - "bytes" "encoding/json" "fmt" "reflect" @@ -10,6 +9,7 @@ import ( "strings" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/cloudformation" @@ -233,6 +233,24 @@ func expandIPPerms( } } + if raw, ok := m["description"]; ok { + description := raw.(string) + if description != "" { + for _, v := range perm.IpRanges { + v.Description = aws.String(description) + } + for _, v := range perm.Ipv6Ranges { + v.Description = aws.String(description) + } + for _, v := range perm.PrefixListIds { + v.Description = aws.String(description) + } + for _, v := range perm.UserIdGroupPairs { + v.Description = aws.String(description) + } + } + } + perms[i] = &perm } @@ -466,9 +484,9 @@ func flattenHealthCheck(check *elb.HealthCheck) []map[string]interface{} { return result } -// Flattens an array of UserSecurityGroups into a []*ec2.GroupIdentifier -func flattenSecurityGroups(list []*ec2.UserIdGroupPair, ownerId *string) []*ec2.GroupIdentifier { - result := make([]*ec2.GroupIdentifier, 0, len(list)) +// Flattens an array of UserSecurityGroups into a []*GroupIdentifier +func flattenSecurityGroups(list []*ec2.UserIdGroupPair, ownerId *string) []*GroupIdentifier { + result := make([]*GroupIdentifier, 0, len(list)) for _, g := range list { var userId *string if g.UserId != nil && *g.UserId != "" && (ownerId == nil || *ownerId != *g.UserId) { @@ -492,13 +510,15 @@ func flattenSecurityGroups(list []*ec2.UserIdGroupPair, ownerId *string) []*ec2. } if vpc { - result = append(result, &ec2.GroupIdentifier{ - GroupId: id, + result = append(result, &GroupIdentifier{ + GroupId: id, + Description: g.Description, }) } else { - result = append(result, &ec2.GroupIdentifier{ - GroupId: g.GroupId, - GroupName: id, + result = append(result, &GroupIdentifier{ + GroupId: g.GroupId, + GroupName: id, + Description: g.Description, }) } } @@ -595,13 +615,12 @@ func flattenEcsLoadBalancers(list []*ecs.LoadBalancer) []map[string]interface{} // Encodes an array of ecs.ContainerDefinitions into a JSON string func flattenEcsContainerDefinitions(definitions []*ecs.ContainerDefinition) (string, error) { - byteArray, err := json.Marshal(definitions) + b, err := jsonutil.BuildJSON(definitions) if err != nil { - return "", fmt.Errorf("Error encoding to JSON: %s", err) + return "", err } - n := bytes.Index(byteArray, []byte{0}) - return string(byteArray[:n]), nil + return string(b), nil } // Flattens an array of Options into a []map[string]interface{} @@ -994,6 +1013,38 @@ func expandESEBSOptions(m map[string]interface{}) *elasticsearch.EBSOptions { return &options } +func flattenESVPCDerivedInfo(o *elasticsearch.VPCDerivedInfo) []map[string]interface{} { + m := map[string]interface{}{} + + if o.AvailabilityZones != nil { + m["availability_zones"] = schema.NewSet(schema.HashString, flattenStringList(o.AvailabilityZones)) + } + if o.SecurityGroupIds != nil { + m["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(o.SecurityGroupIds)) + } + if o.SubnetIds != nil { + m["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(o.SubnetIds)) + } + if o.VPCId != nil { + m["vpc_id"] = *o.VPCId + } + + return []map[string]interface{}{m} +} + +func expandESVPCOptions(m map[string]interface{}) *elasticsearch.VPCOptions { + options := elasticsearch.VPCOptions{} + + if v, ok := m["security_group_ids"]; ok { + options.SecurityGroupIds = expandStringList(v.(*schema.Set).List()) + } + if v, ok := m["subnet_ids"]; ok { + options.SubnetIds = expandStringList(v.(*schema.Set).List()) + } + + return &options +} + func expandConfigRecordingGroup(configured []interface{}) *configservice.RecordingGroup { recordingGroup := configservice.RecordingGroup{} group := configured[0].(map[string]interface{}) @@ -1451,24 +1502,35 @@ func expandApiGatewayStageKeyOperations(d *schema.ResourceData) []*apigateway.Pa return operations } -func expandCloudWachLogMetricTransformations(m map[string]interface{}) []*cloudwatchlogs.MetricTransformation { +func expandCloudWachLogMetricTransformations(m map[string]interface{}) ([]*cloudwatchlogs.MetricTransformation, error) { transformation := cloudwatchlogs.MetricTransformation{ MetricName: aws.String(m["name"].(string)), MetricNamespace: aws.String(m["namespace"].(string)), MetricValue: aws.String(m["value"].(string)), } - return []*cloudwatchlogs.MetricTransformation{&transformation} + if m["default_value"] != "" { + transformation.DefaultValue = aws.Float64(m["default_value"].(float64)) + } + + return []*cloudwatchlogs.MetricTransformation{&transformation}, nil } -func flattenCloudWachLogMetricTransformations(ts []*cloudwatchlogs.MetricTransformation) map[string]string { - m := make(map[string]string, 0) +func flattenCloudWachLogMetricTransformations(ts []*cloudwatchlogs.MetricTransformation) []interface{} { + mts := make([]interface{}, 0) + m := make(map[string]interface{}, 0) m["name"] = *ts[0].MetricName m["namespace"] = *ts[0].MetricNamespace m["value"] = *ts[0].MetricValue - return m + if ts[0].DefaultValue != nil { + m["default_value"] = *ts[0].DefaultValue + } + + mts = append(mts, m) + + return mts } func flattenBeanstalkAsg(list []*elasticbeanstalk.AutoScalingGroup) []string { @@ -2147,3 +2209,168 @@ func flattenFieldToMatch(fm *waf.FieldToMatch) []interface{} { } return []interface{}{m} } + +// escapeJsonPointer escapes string per RFC 6901 +// so it can be used as path in JSON patch operations +func escapeJsonPointer(path string) string { + path = strings.Replace(path, "~", "~0", -1) + path = strings.Replace(path, "/", "~1", -1) + return path +} + +// Like ec2.GroupIdentifier but with additional rule description. +type GroupIdentifier struct { + // The ID of the security group. + GroupId *string + + // The name of the security group. + GroupName *string + + Description *string +} + +func expandCognitoIdentityPoolRoles(config map[string]interface{}) map[string]*string { + m := map[string]*string{} + for k, v := range config { + s := v.(string) + m[k] = &s + } + return m +} + +func flattenCognitoIdentityPoolRoles(config map[string]*string) map[string]string { + m := map[string]string{} + for k, v := range config { + m[k] = *v + } + return m +} + +func expandCognitoIdentityPoolRoleMappingsAttachment(rms []interface{}) map[string]*cognitoidentity.RoleMapping { + values := make(map[string]*cognitoidentity.RoleMapping, 0) + + if len(rms) == 0 { + return values + } + + for _, v := range rms { + rm := v.(map[string]interface{}) + key := rm["identity_provider"].(string) + + roleMapping := &cognitoidentity.RoleMapping{ + Type: aws.String(rm["type"].(string)), + } + + if sv, ok := rm["ambiguous_role_resolution"].(string); ok { + roleMapping.AmbiguousRoleResolution = aws.String(sv) + } + + if mr, ok := rm["mapping_rule"].([]interface{}); ok && len(mr) > 0 { + rct := &cognitoidentity.RulesConfigurationType{} + mappingRules := make([]*cognitoidentity.MappingRule, 0) + + for _, r := range mr { + rule := r.(map[string]interface{}) + mr := &cognitoidentity.MappingRule{ + Claim: aws.String(rule["claim"].(string)), + MatchType: aws.String(rule["match_type"].(string)), + RoleARN: aws.String(rule["role_arn"].(string)), + Value: aws.String(rule["value"].(string)), + } + + mappingRules = append(mappingRules, mr) + } + + rct.Rules = mappingRules + roleMapping.RulesConfiguration = rct + } + + values[key] = roleMapping + } + + return values +} + +func flattenCognitoIdentityPoolRoleMappingsAttachment(rms map[string]*cognitoidentity.RoleMapping) []map[string]interface{} { + roleMappings := make([]map[string]interface{}, 0) + + if rms == nil { + return roleMappings + } + + for k, v := range rms { + m := make(map[string]interface{}) + + if v == nil { + return nil + } + + if v.Type != nil { + m["type"] = *v.Type + } + + if v.AmbiguousRoleResolution != nil { + m["ambiguous_role_resolution"] = *v.AmbiguousRoleResolution + } + + if v.RulesConfiguration != nil && v.RulesConfiguration.Rules != nil { + m["mapping_rule"] = flattenCognitoIdentityPoolRolesAttachmentMappingRules(v.RulesConfiguration.Rules) + } + + m["identity_provider"] = k + roleMappings = append(roleMappings, m) + } + + return roleMappings +} + +func flattenCognitoIdentityPoolRolesAttachmentMappingRules(d []*cognitoidentity.MappingRule) []interface{} { + rules := make([]interface{}, 0) + + for _, rule := range d { + r := make(map[string]interface{}) + r["claim"] = *rule.Claim + r["match_type"] = *rule.MatchType + r["role_arn"] = *rule.RoleARN + r["value"] = *rule.Value + + rules = append(rules, r) + } + + return rules +} + +func flattenRedshiftLogging(ls *redshift.LoggingStatus) []interface{} { + if ls == nil { + return []interface{}{} + } + + cfg := make(map[string]interface{}, 0) + cfg["enabled"] = *ls.LoggingEnabled + if ls.BucketName != nil { + cfg["bucket_name"] = *ls.BucketName + } + if ls.S3KeyPrefix != nil { + cfg["s3_key_prefix"] = *ls.S3KeyPrefix + } + return []interface{}{cfg} +} + +func flattenRedshiftSnapshotCopy(scs *redshift.ClusterSnapshotCopyStatus) []interface{} { + if scs == nil { + return []interface{}{} + } + + cfg := make(map[string]interface{}, 0) + if scs.DestinationRegion != nil { + cfg["destination_region"] = *scs.DestinationRegion + } + if scs.RetentionPeriod != nil { + cfg["retention_period"] = *scs.RetentionPeriod + } + if scs.SnapshotCopyGrantName != nil { + cfg["grant_name"] = *scs.SnapshotCopyGrantName + } + + return []interface{}{cfg} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go index d69528f3d..991a7070c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go @@ -9,6 +9,7 @@ import ( "time" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/aws/aws-sdk-go/service/cognitoidentity" "github.com/aws/aws-sdk-go/service/s3" "github.com/hashicorp/terraform/helper/schema" ) @@ -51,6 +52,22 @@ func validateRdsIdentifierPrefix(v interface{}, k string) (ws []string, errors [ return } +func validateRdsEngine(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + validTypes := map[string]bool{ + "aurora": true, + "aurora-postgresql": true, + } + + if _, ok := validTypes[value]; !ok { + errors = append(errors, fmt.Errorf( + "%q contains an invalid engine type %q. Valid types are either %q or %q.", + k, value, "aurora", "aurora-postgresql")) + } + return +} + func validateElastiCacheClusterId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if (len(value) < 1) || (len(value) > 20) { @@ -745,7 +762,7 @@ func validateSQSFifoQueueName(v interface{}, k string) (errors []error) { func validateSNSSubscriptionProtocol(v interface{}, k string) (ws []string, errors []error) { value := strings.ToLower(v.(string)) - forbidden := []string{"email", "sms"} + forbidden := []string{"email"} for _, f := range forbidden { if strings.Contains(value, f) { errors = append( @@ -1026,6 +1043,10 @@ func validateAppautoscalingScalableDimension(v interface{}, k string) (ws []stri "ecs:service:DesiredCount": true, "ec2:spot-fleet-request:TargetCapacity": true, "elasticmapreduce:instancegroup:InstanceCount": true, + "dynamodb:table:ReadCapacityUnits": true, + "dynamodb:table:WriteCapacityUnits": true, + "dynamodb:index:ReadCapacityUnits": true, + "dynamodb:index:WriteCapacityUnits": true, } if !dimensions[value] { @@ -1039,6 +1060,7 @@ func validateAppautoscalingServiceNamespace(v interface{}, k string) (ws []strin namespaces := map[string]bool{ "ecs": true, "ec2": true, + "dynamodb": true, "elasticmapreduce": true, } @@ -1048,6 +1070,52 @@ func validateAppautoscalingServiceNamespace(v interface{}, k string) (ws []strin return } +func validateAppautoscalingCustomizedMetricSpecificationStatistic(v interface{}, k string) (ws []string, errors []error) { + validStatistic := []string{ + "Average", + "Minimum", + "Maximum", + "SampleCount", + "Sum", + } + statistic := v.(string) + for _, o := range validStatistic { + if statistic == o { + return + } + } + errors = append(errors, fmt.Errorf( + "%q contains an invalid statistic %q. Valid statistic are %q.", + k, statistic, validStatistic)) + return +} + +func validateAppautoscalingPredefinedMetricSpecification(v interface{}, k string) (ws []string, errors []error) { + validMetrics := []string{ + "DynamoDBReadCapacityUtilization", + "DynamoDBWriteCapacityUtilization", + } + metric := v.(string) + for _, o := range validMetrics { + if metric == o { + return + } + } + errors = append(errors, fmt.Errorf( + "%q contains an invalid metric %q. Valid metric are %q.", + k, metric, validMetrics)) + return +} + +func validateAppautoscalingPredefinedResourceLabel(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 1023 { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than 1023 characters", k)) + } + return +} + func validateConfigRuleSourceOwner(v interface{}, k string) (ws []string, errors []error) { validOwners := []string{ "CUSTOM_LAMBDA", @@ -1254,7 +1322,7 @@ func validateDbOptionGroupNamePrefix(v interface{}, k string) (ws []string, erro return } -func validateAwsAlbTargetGroupName(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupName(v interface{}, k string) (ws []string, errors []error) { name := v.(string) if len(name) > 32 { errors = append(errors, fmt.Errorf("%q (%q) cannot be longer than '32' characters", k, name)) @@ -1262,7 +1330,7 @@ func validateAwsAlbTargetGroupName(v interface{}, k string) (ws []string, errors return } -func validateAwsAlbTargetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { +func validateAwsLbTargetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { name := v.(string) if len(name) > 32 { errors = append(errors, fmt.Errorf("%q (%q) cannot be longer than '6' characters", k, name)) @@ -1393,6 +1461,19 @@ func validateIamRoleDescription(v interface{}, k string) (ws []string, errors [] return } +func validateAwsSSMName(v interface{}, k string) (ws []string, errors []error) { + // http://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#EC2-CreateDocument-request-Name + value := v.(string) + + if !regexp.MustCompile(`^[a-zA-Z0-9_\-.]{3,128}$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "Only alphanumeric characters, hyphens, dots & underscores allowed in %q: %q (Must satisfy regular expression pattern: ^[a-zA-Z0-9_\\-.]{3,128}$)", + k, value)) + } + + return +} + func validateSsmParameterType(v interface{}, k string) (ws []string, errors []error) { value := v.(string) types := map[string]bool{ @@ -1406,3 +1487,210 @@ func validateSsmParameterType(v interface{}, k string) (ws []string, errors []er } return } + +func validateBatchName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-zA-Z]{1}[0-9a-zA-Z_\-]{0,127}$`).MatchString(value) { + errors = append(errors, fmt.Errorf("%q (%q) must be up to 128 letters (uppercase and lowercase), numbers, underscores and dashes, and must start with an alphanumeric.", k, v)) + } + return +} + +func validateSecurityGroupRuleDescription(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 255 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 255 characters: %q", k, value)) + } + + // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IpRange.html + pattern := `^[A-Za-z0-9 \.\_\-\:\/\(\)\#\,\@\[\]\+\=\;\{\}\!\$\*]+$` + if !regexp.MustCompile(pattern).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q doesn't comply with restrictions (%q): %q", + k, pattern, value)) + } + return +} + +func validateServiceCatalogPortfolioName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if (len(value) > 20) || (len(value) == 0) { + errors = append(errors, fmt.Errorf("Service catalog name must be between 1 and 20 characters.")) + } + return +} + +func validateServiceCatalogPortfolioDescription(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 2000 { + errors = append(errors, fmt.Errorf("Service catalog description must be less than 2000 characters.")) + } + return +} + +func validateServiceCatalogPortfolioProviderName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if (len(value) > 20) || (len(value) == 0) { + errors = append(errors, fmt.Errorf("Service catalog provider name must be between 1 and 20 characters.")) + } + return +} + +func validateSesTemplateName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if (len(value) > 64) || (len(value) == 0) { + errors = append(errors, fmt.Errorf("SES template name must be between 1 and 64 characters.")) + } + return +} + +func validateSesTemplateHtml(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 512000 { + errors = append(errors, fmt.Errorf("SES template must be less than 500KB in size, including both the text and HTML parts.")) + } + return +} + +func validateSesTemplateText(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 512000 { + errors = append(errors, fmt.Errorf("SES template must be less than 500KB in size, including both the text and HTML parts.")) + } + + return +} + +func validateCognitoRoleMappingsAmbiguousRoleResolutionAgainstType(v map[string]interface{}) (errors []error) { + t := v["type"].(string) + isRequired := t == cognitoidentity.RoleMappingTypeToken || t == cognitoidentity.RoleMappingTypeRules + + if value, ok := v["ambiguous_role_resolution"]; (!ok || value == "") && isRequired { + errors = append(errors, fmt.Errorf("Ambiguous Role Resolution must be defined when \"type\" equals \"Token\" or \"Rules\"")) + } + + return +} + +func validateCognitoRoleMappingsRulesConfiguration(v map[string]interface{}) (errors []error) { + t := v["type"].(string) + value, ok := v["mapping_rule"] + valLength := len(value.([]interface{})) + + if (!ok || valLength == 0) && t == cognitoidentity.RoleMappingTypeRules { + errors = append(errors, fmt.Errorf("mapping_rule is required for Rules")) + } + + if (ok || valLength > 0) && t == cognitoidentity.RoleMappingTypeToken { + errors = append(errors, fmt.Errorf("mapping_rule must not be set for Token based role mapping")) + } + + return +} + +func validateCognitoRoleMappingsAmbiguousRoleResolution(v interface{}, k string) (ws []string, errors []error) { + validValues := []string{ + cognitoidentity.AmbiguousRoleResolutionTypeAuthenticatedRole, + cognitoidentity.AmbiguousRoleResolutionTypeDeny, + } + value := v.(string) + for _, s := range validValues { + if value == s { + return + } + } + errors = append(errors, fmt.Errorf( + "%q contains an invalid value %q. Valid values are %q.", + k, value, validValues)) + return +} + +func validateCognitoRoleMappingsRulesClaim(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + if !regexp.MustCompile("^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$").MatchString(value) { + errors = append(errors, fmt.Errorf("%q must contain only alphanumeric caracters, dots, underscores, colons, slashes and hyphens", k)) + } + + return +} + +func validateCognitoRoleMappingsRulesMatchType(v interface{}, k string) (ws []string, errors []error) { + validValues := []string{ + cognitoidentity.MappingRuleMatchTypeEquals, + cognitoidentity.MappingRuleMatchTypeContains, + cognitoidentity.MappingRuleMatchTypeStartsWith, + cognitoidentity.MappingRuleMatchTypeNotEqual, + } + value := v.(string) + for _, s := range validValues { + if value == s { + return + } + } + errors = append(errors, fmt.Errorf( + "%q contains an invalid value %q. Valid values are %q.", + k, value, validValues)) + return +} + +func validateCognitoRoleMappingsRulesValue(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) < 1 { + errors = append(errors, fmt.Errorf("%q cannot be less than 1 caracter", k)) + } + + if len(value) > 128 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 1 caracters", k)) + } + + return +} + +func validateCognitoRoleMappingsType(v interface{}, k string) (ws []string, errors []error) { + validValues := []string{ + cognitoidentity.RoleMappingTypeToken, + cognitoidentity.RoleMappingTypeRules, + } + value := v.(string) + for _, s := range validValues { + if value == s { + return + } + } + errors = append(errors, fmt.Errorf( + "%q contains an invalid value %q. Valid values are %q.", + k, value, validValues)) + return +} + +// Validates that either authenticated or unauthenticated is defined +func validateCognitoRoles(v map[string]interface{}, k string) (errors []error) { + _, hasAuthenticated := v["authenticated"].(string) + _, hasUnauthenticated := v["authenticated"].(string) + + if !hasAuthenticated && !hasUnauthenticated { + errors = append(errors, fmt.Errorf("%q: Either \"authenticated\" or \"unauthenticated\" must be defined", k)) + } + + return +} + +func validateDxConnectionBandWidth(v interface{}, k string) (ws []string, errors []error) { + val, ok := v.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected type of %s to be string", k)) + return + } + + validBandWidth := []string{"1Gbps", "10Gbps"} + for _, str := range validBandWidth { + if val == str { + return + } + } + + errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validBandWidth, val)) + return +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 064a32fdf..dc61e2b3a 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -261,668 +261,700 @@ "revisionTime": "2016-01-15T23:47:25Z" }, { - "checksumSHA1": "MV3UQE73DSgDj8KP2O7OvQCatNw=", + "checksumSHA1": "0hUWwavDCAEJQ4fv0WcWLSAvoRA=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "n98FANpNeRT5kf6pizdpI7nm6Sw=", + "checksumSHA1": "slpNCdnZ2JbBr94ZHc/9UzOaP5A=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "7/8j/q0TWtOgXyvEcv4B2Dhl00o=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "ZdtYh3ZHSgP/WEIaqwJHTEhpkbs=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "/EXbk/z2TWjWc1Hvb4QYs3Wmhb8=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "4nYrom/vWxOflVaFv8/E3B5jQfw=", + "checksumSHA1": "r5Ub3J7E5rzVommxsEURa7jWTJg=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "n/tgGgh0wICYu+VDYSqlsRy4w9s=", + "checksumSHA1": "86TEBLzyjsUoovbC0M1YwsKB7zo=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "SK5Mn4Ga9+equOQTYA1DTSb3LWY=", + "checksumSHA1": "HcGL4e6Uep4/80eCUI5xkcWjpQ0=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "iywvraxbXf3A/FOzFWjKfBBEQRA=", + "checksumSHA1": "iU00ZjhAml/13g+1YXT21IqoXqg=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "wk7EyvDaHwb5qqoOP/4d3cV0708=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "1QmQ3FqV37w0Zi44qv8pA1GeR0A=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "O6hcK24yI6w7FA+g4Pbr+eQ7pys=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "ZqY5RWavBLWTo6j9xqdyBEaNFRk=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "Drt1JfLMa0DQEZLWrnMlTWaIcC8=", + "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "VCTh+dEaqqhog5ncy/WTt9+/gFM=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "BXuQo73qo4WLmc+TdE5pAwalLUQ=", + "checksumSHA1": "2O+F6NwIHEgAHqLGKTJbxYwsUHs=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "yKXkhhDv9rWmn8GofXPBoN6k730=", + "checksumSHA1": "tOhN1amVVhAATGDCc4tMTubP964=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "8nby/zySa8zYFPMamvrvkk5BOUE=", + "checksumSHA1": "M1hyCwy0T28W02SWk8gFftnjXpA=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "Tl/cvRil/SnTPh7HymTSgOp38/U=", + "checksumSHA1": "1/p8oChMJW38gBTOA8AUCWkHuM8=", + "path": "github.com/aws/aws-sdk-go/service/athena", + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" + }, + { + "checksumSHA1": "ILLTTjBCwDHKcx6D/Ja5k4Nn5Ww=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "Z6mv349IWcg2A8ib0BuOiCJ6X8Q=", + "checksumSHA1": "kR7Urxv5JUC6cx3bBQ3lX1/0cEM=", + "path": "github.com/aws/aws-sdk-go/service/batch", + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" + }, + { + "checksumSHA1": "DV0NlREKdcYMrsmdJbtZyuUDK+8=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "rjq4ZWRUGvQDjnXeflafkCWYsFU=", + "checksumSHA1": "vbSfNKXjDDYLLAYafrD37T5xBFk=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "59kV70/8PuutX4eFkGfCCtdunIA=", + "checksumSHA1": "V5UO7ojp8/EuLhPIS4OOOurke3M=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "zm2qDEBdcJSJI3PGcE2UVr6Cxmc=", + "checksumSHA1": "Rx8tIQPEmYZhy1zbRpDmMBmGfvg=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "puxztE1Umuw+w1CTBmo3hsRItGE=", + "checksumSHA1": "UlNtqtd2PcKoWqqXmOj4kfu8hyc=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "0w5/i4GBC7HxyvMXax/8oiTjLQE=", + "checksumSHA1": "7SPaq0IXgoe1Cqph7ws9vFYr3zg=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "ke7ciG4pxLLU5Ohgu9PCLtBkF7A=", + "checksumSHA1": "bufH/3DIJxDr0DAskWeAXGaLSNU=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "XkyZPfxHxB3ohK+/qdF54nvMS0o=", + "checksumSHA1": "ySI/pbSD5vrnosWYB3qI6KuXH7g=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "QJYewZzcmPbuN27AWiQ6XKQ9Vrw=", + "checksumSHA1": "8T1UkQcbxF08m5xJL16lsWLdT6k=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "pL/7qVyn6qVry1uJ0Nw4/8tkGLM=", + "checksumSHA1": "EEVCD+xa8rnlVXoFULjc9fWcVzY=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "7bm1eOY2oKYSesmEOd1qXvTRH2s=", + "checksumSHA1": "GHaVqY5f85olNwlO5J4f160D+mI=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "V3QpE1495nFtpAOw24WY6AsVT1w=", + "checksumSHA1": "YONbbZXdr13qIiKYzqk4cptd2XE=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "8UoYKgC9u/gjExZe4a6ZZf4dDl8=", + "checksumSHA1": "FAIF4ppLR5URLY2m0BuQO2Gwdg0=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "HfaX42uqVu9hosilU6JwEQhgI/o=", + "checksumSHA1": "TSYWqKDCe6RaR2kYrExoDIC+7LU=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "1O8BtYGfkXglIqgl/uxunrq3Djs=", + "checksumSHA1": "2139YRKSqXN9N49CFTopzwftCDw=", + "path": "github.com/aws/aws-sdk-go/service/directconnect", + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" + }, + { + "checksumSHA1": "0T4esELn9yJKr3D7b1/apnu1ZOA=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "Qk98eGaCDibYSf0u3E2q7fAGnbY=", + "checksumSHA1": "kEGGjvoqrbTSX3Kno7GJrV7UflY=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "MAB7R9NXK1tsvGsA0qrgvODtTKY=", + "checksumSHA1": "BHB7eLK8xj7rGSvXoDyq1mXZx/I=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "YNq7YhasHn9ceelWX2aG0Cg0Ga0=", + "checksumSHA1": "tvxhxL5w10Qau4eUabsLK4L60iA=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "ybOZuEwB/cI6Ga3mjLFUGmE7qF8=", + "checksumSHA1": "vIOUiTgp58sppu4baTu5VxXKs/s=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "pBkeSL8bCEbz/6ub0Jr6NsjQPSc=", + "checksumSHA1": "9I1RdgcMUEYJlyNIqdtSgFTdWKM=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "4a4FO9D6RQluAwyYEW5H6p0Nz7I=", + "checksumSHA1": "jmTYmZVr8dw9kPDYlBhe4oG556U=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "RzBRmfKefl+oBHDzrtsuxv8ycKE=", + "checksumSHA1": "xylCApLVAqLTW6uTYCziTDxgRMI=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "wca8VaMOBpTBJUjVlfceB+RI/aw=", + "checksumSHA1": "RmVY7K2zivKjDe0ad8Grd+81J/M=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "zMFn+iotI5JIiB9HFRo6BiX6CZE=", + "checksumSHA1": "SZ7yLDZ6RvMhpWe0Goyem64kgyA=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "sp5ZmzFBI5z1+kLkRoFjfm2GWuY=", + "checksumSHA1": "i+zp7see74G8qx251yfQiTvbz4U=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "HYqIZQYXiY8gfrOJ3cIlxo0rtEg=", + "checksumSHA1": "/YIietAo4WlCdiZFayAMsqjW2TM=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "EEj7cYvIK+F25RIynBVArzedyPQ=", + "checksumSHA1": "jrndlHaS4MJcOsRIX91tFg6tbfM=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "tuK++zhf2K0RBocTCU1ZltzS8ko=", + "checksumSHA1": "eBESkYAb0koQ4a+pg5k2Ikwo/dA=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "Ewp675B6bZe/eWipwJl7OXqCJRo=", + "checksumSHA1": "+gED8OQZsY/taXgjkGbBJlx1hnY=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "H41YeQoLzuR1gQvBytlaL/gql+A=", + "checksumSHA1": "HBlNyNP2zLI589MIX82zMvANmLY=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "v0OUl6sTwF7EOmXyzk9ppc5ljLw=", + "checksumSHA1": "WoIsJOP3M2BAhZ5p46LJNd9FQPk=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "D92k3ymegRbjpgnuAy9rWjgV7vs=", + "checksumSHA1": "jWoHNr5dOtwUmlC5bi5kRcW30wE=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "fE6Lygzxvif/yfo9bncKyRUCqs8=", + "checksumSHA1": "I8rx/IBJ6NXPOQXoJs6AthfAAd0=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "wwFYsrpInh4Tow/vTI7bD+r5gBU=", + "checksumSHA1": "CqvUs/OKC5GYojf8InoQpTWUI30=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "I9kIOQqqkoWjqYSrYixJpSDWqM8=", + "checksumSHA1": "UNmVsLSjqCWcNd30lHo3T/qOHOY=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "eHMwitdHY0uOEA5kkmJ1nGHe0z0=", + "checksumSHA1": "c51LPR75+eskzYq8cj9zdKd3DXk=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "84rKGr+RvT8tjOalWGPKuNPC4T4=", + "checksumSHA1": "xkNWwN2rw+szg+zXAxCun34zxhs=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "WTV47G/M/WfY7bgwmu5OBrSiwnY=", + "checksumSHA1": "rW2FYtv/Vh+XA5UulIfiTFyCGQs=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "QTc65yhur4smpQrn9Zq2c0UboIo=", + "checksumSHA1": "BwFxr+n+xU7TOQxxONFxdtrWjG4=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "BFBST8eUZJckFLTjhhmDRto0IhQ=", + "checksumSHA1": "TNnwah4tLrh88N5wZvCeF5+9oIQ=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "SEKg+cGyOj6dKdK5ltUHsoL4R4Y=", + "checksumSHA1": "ZjWHq0sDldcDC+Zd/ZIBy5Oj3hI=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "rIBHXHWyTmY/vsqECa2PB0xT2HU=", + "checksumSHA1": "Tz5NbDa/SGUINmuFD8KQLh1HDOI=", + "path": "github.com/aws/aws-sdk-go/service/servicecatalog", + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" + }, + { + "checksumSHA1": "I/ZZixFzXbdhPrhhvAnbG26eark=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "u8xk+JtK/HwIKB2ume3or9Sstp8=", + "checksumSHA1": "PFP/uQld8X4SiwNDc98IPVMsmjE=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "hOcVb1zJiDUmafXSJQhkEascWwA=", + "checksumSHA1": "B3CgAFSREebpsFoFOo4vrQ6u04w=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "1jN0ZDW5c9QEGSQIQ+KrbTACvm8=", + "checksumSHA1": "rwSNHPn9iLEaoDx6vX0KbWefcHY=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "SXH7QxrUFaor3KaNX0xPCV3eOhU=", + "checksumSHA1": "aWWSD60GhNwldZ7mxL9Z8Q+fiXo=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "IrubgUh1G0xLdm1ISsEGE8cN5hk=", + "checksumSHA1": "U1lCM+/AZ5khvQcsgZy1c/qp86Q=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "MerduaV3PxtZAWvOGpgoBIglo38=", + "checksumSHA1": "d9vR1rl8kmJxJBwe00byziVFR/o=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "vFinPalK+r0kaIbPMaHhFbTi2QQ=", + "checksumSHA1": "sjZeBzVjWM2tWSIOr7p13Kx2iNU=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { - "checksumSHA1": "qe7HsjfCked/MaRvH2c0uJndWdM=", + "checksumSHA1": "rM51Xn6MSt2XJzSF1p51m6G4u/8=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "b79a722cb7aba0edd9bd2256361ae2e15e98f8ad", - "revisionTime": "2017-08-31T21:31:26Z", - "version": "v1.10.36", - "versionExact": "v1.10.36" + "revision": "12a4975283c52e2fa88b0ae22882f83cf048eeb4", + "revisionTime": "2017-11-14T23:58:35Z", + "version": "=v1.12.27", + "versionExact": "v1.12.27" }, { "checksumSHA1": "nqw2Qn5xUklssHTubS5HDvEL9L4=", @@ -2052,10 +2084,10 @@ "revisionTime": "2016-09-27T10:08:44Z" }, { - "checksumSHA1": "88oZlcrq2BeX4nvVWad2+Lf4WBs=", + "checksumSHA1": "BZ3/fWpZINYRkVG4KpoHgJGLqPM=", "path": "github.com/terraform-providers/terraform-provider-aws/aws", - "revision": "669207b8fee698ccc3fc47a7b99f812078b7ef87", - "revisionTime": "2017-09-01T13:33:06Z" + "revision": "248233f15947082e83b89a885d8c90ecc32f4da5", + "revisionTime": "2017-11-15T10:28:34Z" }, { "checksumSHA1": "7WDq0VsOJmABPUCEvfuerEp7mBg=",